Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Scaffold and iterate on standalone Preact + HTM applications with zero build dependencies
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-06 | ✗→✓ | ▲ Improved | 27% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 145% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 31% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 17% | 0% |
| case-15 | ✗→✓ | ▲ Improved | 317% | 0% |
Scaffold and iteratively build standalone HTML applications using Preact + HTM via CDN. Zero local dependencies — no Node.js, no npm, no build step. Just open the HTML file in a browser.
bash# Scaffold a single-file app ./scripts/codegen-html-scaffold.sh '{"project_name": "my-app", "output_dir": "/tmp/my-app", "mode": "single-file"}' # Scaffold a multi-file app ./scripts/codegen-html-scaffold.sh '{"project_name": "my-app", "output_dir": "/tmp/my-app", "mode": "multi-file"}' # Read a file or list the project ./scripts/codegen-html-read.sh '{"project_dir": "/tmp/my-app", "file_path": "."}' # Write/update a file ./scripts/codegen-html-write.sh '{"project_dir": "/tmp/my-app", "file_path": "index.html", "content": "..."}'
These rules prevent runtime errors:
class (not className) — HTM maps directly to DOM attributesindex.html)<style> blocks or .css files — use Tailwind classes insteadexport function ComponentName() {}class (not className) — HTM maps directly to DOM attributes html<div class="app">${content}</div> useState, useEffect, useRef from Preact hooks html... template literalsesm.sh), pinned to specific versionsindex.htmlbg-zinc-950 (bg), bg-zinc-900 (cards), border-zinc-800 (borders), text-zinc-200 (text), text-zinc-400 (muted), bg-indigo-500 (accent)Tailwind is loaded via CDN. Use utility classes directly in class 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 when Tailwind utilities exist.
$HOME or /tmpforce: true to overwrite.., absolute paths) is rejected in read/write operationscodegen_html_scaffoldcodegen_html_readcodegen_html_writeAfter scaffolding, the user can simply open index.html in a browser. No install or build step needed.
Use codegen-html when the user wants:
For full React apps with build tooling and npm packages, use codegen-react instead.
Create a new Preact + HTM project with Forge-themed dark UI.
Input:
| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | project_name | string | yes | Name for the project | | output_dir | string | yes | Absolute path for the project directory | | title | string | no | Page title. Default: project_name | | mode | string | no | single-file (one index.html) or multi-file (separate JS/CSS). Default: single-file | | force | boolean | no | Overwrite non-empty directory. Default: false |
Output: JSON object with status, output_dir, mode, and list of files created.
json{ "status": "created", "output_dir": "/tmp/my-app", "project_name": "my-app", "mode": "single-file", "files": ["index.html"] }
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": "index.html", "content": "<!DOCTYPE html>...", "size": 2048, "modified": "2025-01-15T10:30:00Z" }
json{ "path": ".", "type": "directory", "files": ["index.html", "app.js", "styles.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": "index.html", "action": "updated", "size": 2150 }
Other measured skills in the registry, with their headline benchmark lift.