codegen-html

A toolkit for creating standalone browser applications with Preact and HTM, using libraries loaded from a content-delivery network instead of a local build setup. Preact is a small user-interface library, and HTM lets you write its markup in HTML-like form.

In plain words
What is it for?
Use it to scaffold and update single-file or multi-file HTML apps with Tailwind CSS styling and the required Preact/HTM structure.
Why use it?
It removes the need for Node.js, npm, and a build step, so the generated application can be opened directly in a browser.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/initializ/forge/codegen-html
Any agent
npx skills add initializ/forge --skill codegen-html
Clone the repo
git clone --depth 1 https://github.com/initializ/forge

Made for: Claude Code, Codex.

Per session 20 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,594 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00020 $0.01594
Opus 5 $0.00010 $0.00797
Sonnet 5 $0.00004 $0.00319
Haiku 4.5 $0.00002 $0.00159

Measured yesterday against content hash 0945dcc769ff, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

codegen-html scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/codegen-html-read.sh, scripts/codegen-html-scaffold.sh, scripts/codegen-html-write.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

forge-skills/local/embedded/codegen-html/SKILL.md · 192 lines

How it starts

The opening of the file, as written. The whole thing — 192 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

# 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
  • Template literal syntax: html`<div class="app">${content}</div>`
  • Use useState, useEffect, useRef from Preact hooks
  • Components are plain functions returning html`...` template literals
  • All imports via CDN (esm.sh), pinned to specific versions
  • Use Tailwind CSS utility classes — the CDN is pre-loaded in index.html
  • Forge dark theme colors: bg-zinc-950 (bg), bg-zinc-900 (cards), border-zinc-800 (borders), text-zinc-200 (text), text-zinc-400 (muted), bg-indigo-500 (accent)

Tailwind CSS Reference

Tailwind is loaded via CDN. Use utility classes directly in class attributes:

Read the full file on GitHub · 192 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 192 lines · 20 tokens per session scan A 0945dcc769ff

Subscribe to this mod's changes

codegen-html is a skill published in the GitHub repository initializ/forge (156 stars, last pushed 4d ago), licensed Apache-2.0. It adds 20 tokens to every session and 1,594 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

popular-web-designs

54 real design systems (Stripe, Linear, Vercel) as HTML/CSS.

ariffazil/AAA · 23 tokens

frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI).…

desirecore/market · 142 tokens

electron-chromium-upgrade

Guide for performing Chromium version upgrades in the Electron project. Use when working on the roller/chromium/main branch to fix patch conflicts during e sync --3. Covers the patch application workflow, conflict resolution, analyzing upstream Chromium changes, and proper commit formatting for patch fixes.

electron/electron · 62 tokens

talking-head-recut

Package an existing talking-head / interview / podcast video with timed, designed GRAPHIC OVERLAY cards — kinetic titles, lower-thirds, data callouts, quotes, side panels, picture-in-picture — synced to the transcript, on a 16:9 / 9:16 / 4:5 canvas of your choice; the clip plays untouched underneath. Trigger on…

heygen-com/hyperframes · 112 tokens

embedded-captions

Add captions or subtitles to an existing single-subject talking-head video without editing the footage. Use for plain verbatim captions, cinematic captions embedded behind the subject, VFX captions, “炸/特效/酷炫字幕,” or a named identity from the 35-style catalog. Route by visual identity, not by backend engine. The quiet…

heygen-com/hyperframes · 120 tokens

slideshow

Author a HyperFrames slideshow — a presentation, pitch deck, or interactive deck with discrete slides, fragment reveals, branching, hotspot navigation, and built-in presenter mode with speaker notes; also converts an existing page into a deck. Output is a navigable deck, not a rendered MP4. If the user didn't…

heygen-com/hyperframes · 83 tokens