--- name: codegen-html icon: 🌐 category: developer tags: - code-generation - frontend - html - preact - ui - zero-dependency description: Scaffold and iterate on standalone Preact + HTM applications with zero build dependencies metadata: forge: requires: bins: - jq env: required: [] one_of: [] optional: [] egress_domains: - cdn.tailwindcss.com - esm.sh timeout_hint: 60 --- # Codegen HTML Skill 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. ## Quick Start ```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": "..."}' ``` ## CRITICAL: Scaffold Conventions (DO NOT VIOLATE) These rules prevent runtime errors: 1. **Use `class` (not `className`)** — HTM maps directly to DOM attributes 2. **Use Tailwind CSS utility classes** for all styling (loaded via CDN in `index.html`) 3. **Do NOT create `