Codegen HTML

Scaffold and iterate on standalone Preact + HTM applications with zero build dependencies

230 stars 17 forksSoftware Development

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add initializ/forge --skill codegen-html
Manual install
git clone --depth 1 https://github.com/initializ/forge.git /tmp/forge
mkdir -p ~/.claude/skills
cp -r /tmp/forge/forge-skills/local/embedded/codegen-html ~/.claude/skills/codegen-html

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# 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 `<style>` blocks or `.css` files** — use Tailwind classes instead
4. **Keep Preact/HTM imports unchanged** — do not change CDN URLs or versions
5. **Use named exports** for components: `export function ComponentName() {}`

## Code Style Guide

- Use **Preact** with **HTM** (tagged template literals instead of JSX)
- Use `class` (not `className`) — HTM maps directly to DOM attributes
Read the full skill on GitHub

Details

Skill name
codegen-html
Path
forge-skills/local/embedded/codegen-html/SKILL.md
License
Apache-2.0
Repo updated
17 November 2026

FAQ

What does the Codegen HTML skill do?

Scaffold and iterate on standalone Preact + HTM applications with zero build dependencies

How do I install the Codegen HTML skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add initializ/forge --skill codegen-html. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Codegen HTML popular?

It lives in initializ/forge, which has 230 GitHub stars and 17 forks.

Related skills

Browse the most popular Claude skills, all software development skills, or write your own with the skills generator.