Codegen Html logo

Codegen Html

Organization
initializ
codegen-html

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

Overview

Publisherinitializ
Repositoryforge
Skill namecodegen-html
Stars
242
Forks
14
Bundled files
3
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by initializ on GitHub. Read the source before you install it.

Installation

Install the Codegen Html AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/initializ/forge/tree/main/forge-skills/local/embedded/codegen-html
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
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
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Codegen Html in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Codegen Html on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Codegen Html is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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
  • 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:

  • Layout: flex, grid, gap-4, max-w-4xl, mx-auto, px-6, py-12
  • Colors: bg-zinc-950, bg-zinc-900, text-zinc-200, text-zinc-400, bg-indigo-500
  • Borders: border, border-zinc-800, rounded-lg, shadow-lg
  • Typography: text-3xl, font-bold, text-center, font-mono
  • Interactive: hover:bg-indigo-400, transition-colors, cursor-pointer

Do NOT write custom CSS when Tailwind utilities exist.

Safety Constraints

  • Output directory must be under $HOME or /tmp
  • Non-empty directories require force: true to overwrite
  • Path traversal (.., absolute paths) is rejected in read/write operations
  • No local tooling required — files can be opened directly in a browser

Iteration Workflow

  1. Scaffold the project with codegen_html_scaffold
  2. Read files to understand current state with codegen_html_read
  3. Write updated files with codegen_html_write
  4. Repeat steps 2-3 to iterate on the UI

After scaffolding, the user can simply open index.html in a browser. No install or build step needed.

When to Use

Use codegen-html when the user wants:

  • A quick UI prototype with no setup
  • A single HTML file they can share or open directly
  • Zero-dependency frontend (no Node.js required)
  • Simple interactive apps, dashboards, or demos

For full React apps with build tooling and npm packages, use codegen-react instead.

Tool: codegen_html_scaffold

Create a new Preact + HTM project with Forge-themed dark UI.

Input:

ParameterTypeRequiredDescription
project_namestringyesName for the project
output_dirstringyesAbsolute path for the project directory
titlestringnoPage title. Default: project_name
modestringnosingle-file (one index.html) or multi-file (separate JS/CSS). Default: single-file
forcebooleannoOverwrite non-empty directory. Default: false

Output: JSON object with status, output_dir, mode, and list of files created.

Response Format

json
{
  "status": "created",
  "output_dir": "/tmp/my-app",
  "project_name": "my-app",
  "mode": "single-file",
  "files": ["index.html"]
}

Tool: codegen_html_read

Read a file or list the project directory.

Input:

ParameterTypeRequiredDescription
project_dirstringyesAbsolute path to the project directory
file_pathstringyesRelative path to read, or "." for directory listing

Output: JSON object with path, content (or listing), size, and modified timestamp.

Response Format (file)

json
{
  "path": "index.html",
  "content": "<!DOCTYPE html>...",
  "size": 2048,
  "modified": "2025-01-15T10:30:00Z"
}

Response Format (directory listing)

json
{
  "path": ".",
  "type": "directory",
  "files": ["index.html", "app.js", "styles.css"]
}

Tool: codegen_html_write

Write or update a file in the project.

Input:

ParameterTypeRequiredDescription
project_dirstringyesAbsolute path to the project directory
file_pathstringyesRelative path to write
contentstringyesComplete file content

Output: JSON object with path, action (created/updated), and size.

Response Format

json
{
  "path": "index.html",
  "action": "updated",
  "size": 2150
}

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Codegen Html AI skill do?

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

Why use Codegen Html on TypingMind?

Because you install it once and use it with any model. Codegen Html is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Codegen Html in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/initializ/forge/tree/main/forge-skills/local/embedded/codegen-html. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Codegen Html?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Codegen Html?

As many as you like. As long as a model supports skills, you can use Codegen Html with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Codegen Html AI skill free?

Yes. It is published on GitHub by initializ under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇