codegen-html

codegen-html is a skill for Claude Code, Codex from initializ/forge. It costs 20 tokens per session (1,594 once invoked), scanned A, original, Apache-2.0.

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

Written for no agent in particular: nothing here depends on one.

Good fit Use it to scaffold and update single-file or multi-file HTML apps with Tailwind CSS styling and the required Preact/HTM structure.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/initializ/forge/codegen-html
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.

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.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for codegen-html

README.md
[![agentmods](https://agentmods.dev/badge/skills/initializ/forge/codegen-html/github.svg)](https://agentmods.dev/skills/initializ/forge/codegen-html)
Your own site
<a href="https://agentmods.dev/skills/initializ/forge/codegen-html"><img src="https://agentmods.dev/badge/skills/initializ/forge/codegen-html/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for codegen-html

Your own site · 80×15
<a href="https://agentmods.dev/skills/initializ/forge/codegen-html"><img src="https://agentmods.dev/badge/skills/initializ/forge/codegen-html.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00020 $0.01594
Opus 5.5 $0.00008 $0.00638
Sonnet 5.5 $0.00004 $0.00319
Haiku 4.5 $0.00002 $0.00159

Measured 3mo ago against content hash 0945dcc769ff, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 3mo ago.

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. 3mo ago 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 (223 stars, last pushed 9d 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.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

codegen-html compared with skills from other repositories

codegen-html next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
codegen-htmlinitializ/forgeSkill2239d agoApache-2.0A20Claude Code, Codex
popular-web-designsariffazil/AAASkill028d agoAGPL-3.0A23Claude Code, Codex
popular-web-designsNousResearch/hermes-agentSkill267ktodayMITA23Claude Code, Codex
quality-looptrpc-group/trpc-agent-goSkill1.9kyesterdayApache-2.0A32Claude Code, Codex
mcportertrpc-group/trpc-agent-goSkill1.9kyesterdayApache-2.0A51Claude Code, Codex
plan_routetrpc-group/trpc-agent-goSkill1.9kyesterdayApache-2.0A17Claude Code, Codex
recommend_poitrpc-group/trpc-agent-goSkill1.9kyesterdayApache-2.0A17Claude Code, Codex