Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Scaffold and iterate on Vite + React applications
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | 107% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 150% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 67% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 80% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 192% | 0% |
Scaffold and iteratively build Vite + React applications. Creates a complete project structure with React 19, Vite 6, and a Forge-themed dark UI out of the box.
bash# Scaffold a new project ./scripts/codegen-react-scaffold.sh '{"project_name": "my-app", "output_dir": "/tmp/my-app"}' # Install deps and start dev server (opens browser) ./scripts/codegen-react-run.sh '{"project_dir": "/tmp/my-app"}' # Read a file or list the project ./scripts/codegen-react-read.sh '{"project_dir": "/tmp/my-app", "file_path": "src/App.jsx"}' # Write/update a file (Vite hot-reloads automatically) ./scripts/codegen-react-write.sh '{"project_dir": "/tmp/my-app", "file_path": "src/App.jsx", "content": "..."}'
These rules prevent build errors. Violating them will break the app:
src/main.jsx — it is the entry point and must not be changedexport function ComponentName() {}, NEVER export defaultindex.css — it does not exist and will cause a build errorindex.html)src/App.jsx and create new component files under src/src/App.css exists for custom styles but prefer Tailwind classesuseState, useEffect, useRef, etc.)export function App() {}src/index.htmlbg-zinc-950 (bg), bg-zinc-900 (cards), border-zinc-800 (borders), text-zinc-200 (text), text-zinc-400 (muted), bg-indigo-500 (accent)const over let; never use varTailwind is loaded via CDN. Use utility classes directly in JSX className attributes:
flex, grid, gap-4, max-w-4xl, mx-auto, px-6, py-12bg-zinc-950, bg-zinc-900, text-zinc-200, text-zinc-400, bg-indigo-500border, border-zinc-800, rounded-lg, shadow-lgtext-3xl, font-bold, text-center, font-monohover:bg-indigo-400, transition-colors, cursor-pointerDo NOT write custom CSS classes when Tailwind utilities exist. Do NOT create new .css files.
$HOME or /tmpforce: true to overwrite.., absolute paths) is rejected in read/write operationscodegen_react_scaffoldcodegen_react_run — installs deps and opens the browsercodegen_react_readcodegen_react_write — Vite hot-reloads automaticallyUse codegen-react when the user wants:
For simpler needs (single HTML file, no build step), use codegen-html instead.
Create a new Vite + React project with Forge-themed dark UI.
Input:
| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | project_name | string | yes | Name for the project (used in package.json) | | output_dir | string | yes | Absolute path for the project directory | | title | string | no | Page title. Default: project_name | | force | boolean | no | Overwrite non-empty directory. Default: false |
Output: JSON object with status, output_dir, and list of files created.
json{ "status": "created", "output_dir": "/tmp/my-app", "project_name": "my-app", "files": [ "package.json", "vite.config.js", "index.html", "src/main.jsx", "src/App.jsx", "src/App.css", ".gitignore" ] }
Read a file or list the project directory.
Input:
| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | project_dir | string | yes | Absolute path to the project directory | | file_path | string | yes | Relative path to read, or "." for directory listing |
Output: JSON object with path, content (or listing), size, and modified timestamp.
json{ "path": "src/App.jsx", "content": "export function App() { ... }", "size": 245, "modified": "2025-01-15T10:30:00Z" }
json{ "path": ".", "type": "directory", "files": [ "package.json", "vite.config.js", "index.html", "src/main.jsx", "src/App.jsx", "src/App.css" ] }
Write or update a file in the project.
Input:
| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | project_dir | string | yes | Absolute path to the project directory | | file_path | string | yes | Relative path to write | | content | string | yes | Complete file content |
Output: JSON object with path, action (created/updated), and size.
json{ "path": "src/App.jsx", "action": "updated", "size": 312 }
Install dependencies and start the Vite dev server. Automatically opens the browser.
Call this tool after scaffolding to get the app running. It installs node_modules (if not already present) and starts npm run dev in the background. Vite hot-reloads on file changes, so subsequent codegen_react_write calls update the browser automatically.
Input:
| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | project_dir | string | yes | Absolute path to the project directory (must contain package.json) |
Output: JSON object with status, url, pid, and install status.
json{ "status": "running", "url": "http://localhost:3000", "pid": 12345, "project_dir": "/tmp/my-app", "install": "installed" }
codegen_react_scaffold — the server stays runningcodegen_react_write to update files — Vite hot-reloads automaticallyinstall field is "installed" on first run and "skipped" on subsequent runspid can be used to stop the server later with kill <pid>Other measured skills in the registry, with their headline benchmark lift.