Agent skill

Single-File HTML Composer

by oaustegard in oaustegard/claude-skills

Builds self-contained single-file HTML pages such as reports, decks, postmortems, flowcharts and prototypes from a small spec using a bundled Python composer and templates.

MITAuto-check passedFrontend & Design

Install Single-File HTML Composer

skills CLI
$ npx skills add oaustegard/claude-skills --skill composing-html -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install oaustegard/claude-skills composing-html --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/oaustegard/claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/composing-html .claude/skills/composing-html && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
composing-html
GitHub stars
150
Token cost
~3.2k tokens
SKILL.md length
1,238 words
Files
25 (incl. scripts, references, assets)
Skills in repo
93
Repo updated
First seen
Licence
MIT

At a glance

Builds self-contained single-file HTML pages such as reports, decks, postmortems, flowcharts and prototypes from a small spec using a bundled Python composer and templates.

  • Works in 5 steps: Never write , , , , or . The → Don't restate design tokens. Reuse the… → body_html is HTML, not a JSON dialect.… → …
  • Turning a code review or incident into a shareable HTML writeup
  • SKILL.md covers Default workflow: freeform, Inventory, Output rules and Checking output, plus 3 more sections
  • Runs Python and JavaScript scripts from its folder; calls python

What it does

The skill produces single-file HTML artifacts without hand-writing the page chrome. A composer supplies the doctype, head, inlined CSS, base.js, design tokens, masthead and colophon, and you provide a title and the body content. The default freeform workflow has one content slot, body_html. The recommended way to fill it is to write the HTML to a file and pass metadata with scripts/build.py build freeform and --set, which avoids JSON-escaping problems with multi-line HTML.

For repeated shapes there are templates for a PR review, status report, slide deck, design reference, diagram, editor and exploration, each with typed slots such as findings, slides or metrics. The describe command prints a template's required keys and skeleton, and you build from a spec.json with --spec and --out. The bundle also holds a palette reference, a checker script and a changelog. It is not meant for ad-hoc snippets such as forms, emails or embedded widgets.

When your agent uses it

  • Turning a code review or incident into a shareable HTML writeup
  • Producing a status report, slide deck or design reference as one HTML file
  • Drawing a flowchart or module map as a self-contained page
  • Comparing options side by side in an interactive HTML page

Example prompts

  • “Write up this pull request review as a single HTML file with findings grouped by severity.”
  • “Make a status report page with metrics for the weekly update.”
  • “Draw a flowchart of our deploy pipeline as a self-contained HTML artifact.”

Requirements

  • Python to run scripts/build.py

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Never write , , , , or . The
  2. Don't restate design tokens. Reuse the inventory above — var(--clay),
  3. body_html is HTML, not a JSON dialect. Write , ,
  4. Anything in an _html field is inserted verbatim — escape any
  5. One artifact per build. Browser tabs are free.

What it can do on your machine

Read from SKILL.md and the folder at commit 559a6cd. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 9 files in scripts/ (Python and JavaScript, from the files we listed), which the agent can run.

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Single-File HTML Composer loads about 3.2k tokens when it runs, and up to ~7.4k if it reads all its reference files. Until then it costs about 172 tokens; SKILL.md has 1,238 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~172
When it runs · the whole SKILL.md, loaded when a task matches
~3.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~7.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from oaustegard/claude-skills at commit 559a6cd, republished under its MIT licence (© oaustegard). 1,238 words, ~3,163 tokens.

Download SKILL.mdSave it as .claude/skills/composing-html/SKILL.md (or your agent's skills folder). This skill also uses 24 other files; get the full folder from GitHub.
name
composing-html
description
Composes single-file HTML artifacts (PR review writeups, status reports, incident postmortems, slide decks, design systems, prototypes, flowcharts, module maps, feature explainers, kanban boards, prompt tuners) from a small JSON spec instead of hand-written HTML/CSS/JS. Use when the user asks to "compare options side-by-side", requests an HTML version of a report or review or deck, asks for a flowchart, status update, postmortem, design system reference, interactive prototype, custom editor — or explicitly says "HTML artifact", "single HTML file", "self-contained HTML". Skip for ad-hoc HTML snippets (forms, emails, embedded widgets) where there's no template fit.
metadata.version
0.5.0

composing-html

Produce single-file HTML artifacts without hand-writing the page chrome. The composer supplies <!DOCTYPE>, <head>, inlined CSS, base.js, design tokens, masthead, and colophon. You supply a title and the body content.

The product is the chrome and inventory below — primitives you can drop into any artifact without re-deriving what a card, badge, or eyebrow looks like. Templates are shortcuts on top of this, useful when the same artifact shape repeats; see Templates near the end.

Default workflow: freeform

freeform gives you the whole chrome with one content slot — body_html — for the page body. Reach for it first. Reach for a template only when the structure repeats across artifacts (see Templates near the end).

There are two ways to invoke it. Use the --set flow for anything with a substantial body — it sidesteps the JSON-string escaping that bites heredoc-style spec writing (newlines, quotes, </& inside multi-line HTML).

1. Write the body to a .html file directly (no JSON, no escaping).
2. python scripts/build.py build freeform \
       --set title='My Page' \
       --set subtitle='Optional subhead' \
       --set body_html=@body.html \
       --out artifact.html

--set KEY=VALUE assigns a literal string; --set KEY=@FILE loads the file contents verbatim into that spec field. Repeat for any field. Works for body_html, extra_css, extra_js, eyebrow, page_class, and the same *_html fields in any other template (summary_html, intro_html, details_html, …).

Spec-file workflow (best for structured templates)
1. python scripts/build.py describe <template>     # required keys + skeleton
2. write spec.json
3. python scripts/build.py build <template> --spec spec.json --out artifact.html

For templates with typed slots (pr_review.findings[], slide_deck.slides[], status_report.metrics[]), the spec file is the right shape — the template reasons over the structure. For freeform, the spec is mostly a thin config wrapper around one HTML string; the --set flow above is usually less friction.

You can mix both: small spec.json for metadata, --set body_html=@body.html for the heavy bit. --set overrides any matching field from --spec.

Pitfall: don't inline multi-line HTML into a JSON heredoc

cat > spec.json <<EOF { "body_html": "<multi\nline>\n..." } EOF does not produce valid JSON — JSON strings can't contain raw newlines or unescaped quotes. Either:

  • use --set body_html=@body.html (recommended), or
  • assemble the spec in Python with json.dump(spec, f) so escaping is automatic.

Inventory

Everything in this section is loaded into every artifact via inlined CSS and base.js. Use these tokens and classes inside body_html (or any template's *_html field) without re-declaring them.

Color tokens
TokenHexUse
--ivory#FAF9F5Page background
--paper#FFFFFFCard background
--slate#141413Headings, inverted background
--clay#D97757Brand accent (lines, primary actions)
--clay-d#B85C3EHover/dark variant
--oat#E3DACCSoft contrast surface
--olive#788C5DSuccess, secondary accent
--rust#B04A3FErrors, destructive
--moss#4A6B3ASuccess text
--g100 … --g700graysSurfaces, borders, body text

Semantic aliases: --ok, --warn, --err, --info.

Type stacks
  • --serif — display headings (h1, h2, big numerics).
  • --sans — body text (default).
  • --mono — code, eyebrows, badges, captions.
Geometry

--radius-sm (6px) · --radius (10px) · --radius-lg (16px) · --border · --border-soft · --shadow-card · --shadow-pop.

Layout primitives
  • .page — main column (1080px max). Variants: .page--wide (1280px), .page--narrow (720px). Set via the page_class spec key.
  • .masthead — header strip with .eyebrow + <h1> + .subtitle (auto-rendered from title/subtitle/eyebrow unless show_masthead is false).
  • .grid .grid--2|3|4|auto — responsive CSS grid.
  • .stack, .row — vertical / horizontal flex.
  • .card, .card--soft, .card--elev — content containers.
  • .rule — <hr> underline below <h2>.
  • .colophon — optional footer strip; pass colophon="text" to page() to show it (off by default).
Components
  • Eyebrow: <div class="eyebrow">SECTION</div> — small all-caps label with a leading clay rule.
  • Badge: <span class="badge badge--ok|warn|err|info|clay">v1.0</span>.
  • Kbd: <span class="kbd">⌘K</span>.
  • Bullets: <ul class="bullets"><li>…</li></ul> — clay dots.
  • Code: inline <code> and block <pre><code>. Block code gets a copy button automatically via base.js.
  • Details: native <details><summary>…</summary>…</details> styled.
Tabs
html
<div class="tabgroup">
  <div class="tabs">
    <button data-target="a">Tab A</button>
    <button data-target="b">Tab B</button>
  </div>
  <div class="tab-panel" data-id="a">…</div>
  <div class="tab-panel" data-id="b">…</div>
</div>

base.js wires this automatically and selects the first tab by default.

Drag-to-reorder
html
<div data-sortable="true">
  <div draggable="true">…</div>
  <div draggable="true">…</div>
</div>

Optional cross-zone drops: add data-zone="<id>" to each container.

Live parameter bindings
html
<input type="range" data-bind="size" min="0" max="100" value="50" data-format="number" data-unit="px">
<span data-out="size"></span>
<style>.box { width: var(--bind-size, 50px); }</style>

The CSS custom property --bind-<name> is updated on every input event, and any [data-out="<name>"] element receives the formatted value.

Output rules

Spend output tokens on content, not chrome:

  1. Never write <html>, <head>, <style>, <script>, or <link>. The composer adds all of them. If you find yourself writing a complete page, you missed the skill. <!-- rule:chrome-leak -->
  2. Don't restate design tokens. Reuse the inventory above — var(--clay), .card, .badge--warn, .bullets, etc. are already loaded. Don't hardcode hex/rgb() colours, inline font-family/font-size, or reference tokens that aren't in the palette.
    <!-- rule:hardcoded-color rule:inline-typography rule:undefined-token -->
  3. body_html is HTML, not a JSON dialect. Write <section>, <h2>, <ul class="bullets"> directly. No translation layer.
  4. Anything in an _html field is inserted verbatim — escape any user-supplied content yourself. All other string values are HTML-escaped automatically.
  5. One artifact per build. Browser tabs are free.
Show full SKILL.md (545 more words)Show less

Checking output

After building, lint the artifact before presenting it:

python scripts/build.py check artifact.html

The checker is deterministic — no model call, stdlib only. It doesn't grade taste (the fixed chrome already prevents the usual AI tells); it flags content that breaks out of the design system or wires base.js hooks to nothing — the failure modes the chrome can't prevent on its own:

rulecatchesseverity
chrome-leak<html>/<head>/<link> (and top-level <style>/<script>) in body_htmlerror
undefined-tokenvar(--typo) — a token not in the palette or declared hereerror
broken-tabsdata-target with no matching .tab-panel[data-id]error
hardcoded-color#hex / rgb() literals instead of palette tokenswarn
inline-typographyfont-family / font-size overriding the type stackswarn
undefined-token for --bind-*(allowed — created by data-bind)—
nested-card.card inside .cardwarn
broken-binddata-bind with no consumer, or orphan data-outwarn
broken-sortabledata-sortable with no draggable childrenwarn
heading-skipheading levels that jump (h1 → h3)warn
img-no-alt<img> without an alt attributewarn

Exit code is non-zero when any error-severity rule fires. The output rules above carry <!-- rule:ID --> anchors tying each guidance line to its check, so the teaching and the enforcement stay in sync. Full-artifact vs body fragment is auto-detected; force with --full / --fragment. --json emits machine-readable findings. Contrast ratios are intentionally not checked — the token pairs are pre-vetted and regex can't judge author-introduced pairs without false positives.

Iteration

Edit the spec, re-run build, open in a browser. If a layout pattern repeats across multiple artifacts, that's when a template earns its keep — otherwise stay in freeform.

Templates: shortcuts for repeat structure

When the same artifact shape recurs (status reports week after week, PR reviews across many PRs, slide decks with consistent navigation), a template's fixed slot map is worth the translation cost. It enforces cross-artifact consistency and skips the layout decisions you'd otherwise re-derive each time.

Use a template only when:

  1. You're producing the same artifact shape repeatedly.
  2. The repeat structure justifies a fixed slot map.
  3. Cross-artifact consistency matters more than per-artifact flexibility.

Otherwise: freeform.

1. python scripts/build.py list                    # all templates, one-line summaries
2. python scripts/build.py describe <template>     # required keys + JSON skeleton
3. write spec.json                                  # only your content + parameters
4. python scripts/build.py build <template> --spec spec.json --out artifact.html

describe prints a valid-JSON starter skeleton you can edit in place. For worked examples, see references/templates.md — but only after picking a template; reading it cold wastes context.

For templates with prose-heavy *_html slots (e.g. summary_html, intro_html, details_html), the same --set KEY=@FILE mechanism from the freeform workflow applies — load the prose from a .html file rather than escaping it into the JSON spec.

There are 21 templates, grouped into 9 categories plus freeform:

  • report.* — status_report, incident_report
  • review.* — pr_review, code_walkthrough, module_map
  • editor.* — triage_board, flag_editor, prompt_tuner
  • deck.* — slide_deck (arrow-key + space navigation)
  • design.* — design_system, component_variants
  • exploration.* — comparison_grid, design_directions, implementation_plan
  • research.* — feature_explainer, concept_explainer
  • diagram.* — svg_figure_sheet, flowchart
  • prototype.* — animation_sandbox, click_flow

Some templates with prose-heavy slots take raw HTML in keys ending with _html (e.g. summary_html, intro_html, details_html). Same rules as freeform.body_html: use the inventory above, escape user-supplied content.

Tests

tests/test_smoke.py covers every template with a representative spec plus explicit security regressions (table escaping, script-tag breakout in prompt_tuner, attribute injection in flag_editor, CSS-color injection, spec mutation in module_map). tests/test_checker.py covers the check linter — one assertion per rule (fires on the violation, silent on the clean case). Run with:

python composing-html/tests/test_smoke.py        # no pytest required
python composing-html/tests/test_checker.py      # no pytest required
python -m pytest composing-html/tests -q          # if pytest is available

When adding or changing a template, add a spec entry and any regression asserts before merging. When adding a checker rule, add it to both scripts/checker.py and a <!-- rule:ID --> anchor in the relevant guidance line, plus a test assertion.

© oaustegard, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 24 other files (scripts, references, assets) in composing-html of oaustegard/claude-skills.

  • SKILL.md
  • .gitignore
  • CHANGELOG.md
  • README.md
  • assets/base.css
  • assets/base.js
  • references/palette.md
  • references/templates.md
  • scripts/build.py
  • scripts/checker.py
  • scripts/composer.py
  • scripts/templates/__init__.py
  • scripts/templates/deck.py
  • scripts/templates/design.py
  • scripts/templates/diagram.py
  • scripts/templates/editor.py
  • scripts/templates/exploration.py
  • … and 8 more

Open the folder on GitHubat commit 559a6cd

Compare with similar skills

Single-File HTML Composer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Single-File HTML Composer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Single-File HTML Composer this skilloaustegard/claude-skills150—~3.2kAutomated safety check: PassMIT
Ky Markdown RebuilderKyrieCheungYep/ky-markdown-rebuilder117—~5.7kAutomated safety check: PassNone
Visualizedisplay-dev/visualize131—~7.4kAutomated safety check: PassMIT
Openkb Deck NeonVectifyAI/OpenKB4.7k1 repos~4.3kAutomated safety check: PassApache-2.0
Opendesignmanalkaff/opendesign261—~2.3kAutomated safety check: PassMIT
Swiss Creative Mode Templatenexu-io/open-design100k—~563Automated safety check: PassApache-2.0

Similar skills

  • Ky Markdown Rebuilder

    KyrieCheungYep/ky-markdown-rebuilder

    Rebuild visual documents into reliable Markdown by combining text extraction with page or screenshot alignment.

    117 GitHub stars~5.7k tokensUpdated 2 mo ago
    Documents & OfficeAuto-check passed
  • Visualize

    display-dev/visualize

    Generate beautiful, on-brand HTML artifacts — reports, diagrams, diff reviews, slide decks, plans, recaps, dashboards.

    131 GitHub stars~7.4k tokensUpdated 21 days ago
    Frontend & DesignAuto-check passed
  • Openkb Deck Neon

    VectifyAI/OpenKB

    A skill your agent uses when the user asks the openkb chat to make a deck / slide presentation / PPT / slides / 演示稿 / 幻灯片 from their compiled KB content AND wants a dark, high-tech, neon / glow /…

    4.7k GitHub starsUsed in 1 repo~4.3k tokens
    Frontend & DesignAuto-check passed
  • Opendesign

    manalkaff/opendesign

    A skill your agent uses when starting any design task — HTML pages, slide decks, interactive prototypes, UI kits, brand systems.

    261 GitHub stars~2.3k tokensUpdated 3 mo ago
    Frontend & DesignAuto-check passed
  • Swiss Creative Mode Template

    nexu-io/open-design

    Swiss-inspired creative-mode presentation template skill with bold editorial typography, high-contrast geometric cards, interactive slide navigation, theme switching, hotspot overlays, and palette…

    100k GitHub stars~563 tokensUpdated today
    Frontend & DesignAuto-check passed
  • Frontend Slides

    zarazhangrui/frontend-slides

    Builds animated HTML slide decks that run in the browser with no dependencies, or converts PowerPoint files to the web, starting from visual style previews.

    30k GitHub starsUsed in 16 repos~7k tokens
    Documents & OfficeAuto-check passed

More from oaustegard/claude-skills

All 93 skills in this repo
  • Bluesky Zeitgeist Sampler

    oaustegard/claude-skills

    Deprecated sampler that captures short windows of the Bluesky firehose, clusters trending terms and builds an HTML report; replaced by the browsing-bluesky skill.

    150 GitHub starsUsed in 1 repo~1.4k tokens
    Auto-check passed
  • Vega-Lite Interactive Charts

    oaustegard/claude-skills

    Builds interactive Vega-Lite charts from uploaded data: analyzes the fields, picks five to ten fitting chart types, and produces a React artifact with the data embedded inline.

    150 GitHub stars~2.1k tokensUpdated 5 days ago
    Auto-check passed
  • Declauding

    oaustegard/claude-skills

    Rewrites model-sounding prose into plain technical writing and checks that every claim survives, for PR text, docs, commit messages and similar drafts.

    150 GitHub stars~5.1k tokensUpdated 5 days ago
    Auto-check passed
  • Forecasting Reverso

    oaustegard/claude-skills

    Zero-shot univariate time series forecasting using the Reverso foundation model (NumPy/Numba CPU-only inference).

    150 GitHub starsUsed in 1 repo~1.5k tokens
    Auto-check passed
  • Preact Developer

    oaustegard/claude-skills

    Guides building standards-based Preact apps with native-first choices, HTM syntax, import maps and vendored ESM, from single-file demos to larger builds.

    150 GitHub stars~4.6k tokensUpdated 5 days ago
    Auto-check passed
  • Adversarial Review Before Shipping

    oaustegard/claude-skills

    Has a fresh-context adversary attack a blog post, recommendation, analysis brief or piece of code before you ship it, using a profile suited to that kind of artifact.

    150 GitHub stars~3.4k tokensUpdated 5 days ago
    Auto-check passed

Questions about Single-File HTML Composer

What does Single-File HTML Composer do?

Builds self-contained single-file HTML pages such as reports, decks, postmortems, flowcharts and prototypes from a small spec using a bundled Python composer and templates. The skill produces single-file HTML artifacts without hand-writing the page chrome.js, design tokens, masthead and colophon, and you provide a title and the body content.

When should I use Single-File HTML Composer?

Single-File HTML Composer fits situations like: turning a code review or incident into a shareable HTML writeup; producing a status report, slide deck or design reference as one HTML file; drawing a flowchart or module map as a self-contained page; comparing options side by side in an interactive HTML page.

How do I install Single-File HTML Composer in Claude Code?

Run `npx skills add oaustegard/claude-skills --skill composing-html -a claude-code`. Or copy the skill folder (composing-html in oaustegard/claude-skills) into .claude/skills/composing-html in your project. Claude Code loads it when a task matches its description.

How do I install Single-File HTML Composer in Codex?

Run `npx skills add oaustegard/claude-skills --skill composing-html -a codex`. Or copy the skill folder (composing-html in oaustegard/claude-skills) into .agents/skills/composing-html in your project. Codex loads it when a task matches its description.

Can I use Single-File HTML Composer in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add oaustegard/claude-skills --skill composing-html -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/composing-html, .gemini/skills/composing-html, .github/skills/composing-html and .opencode/skills/composing-html in your project.

What does Single-File HTML Composer need to run?

Going by SKILL.md and its folder, Single-File HTML Composer needs Python and JavaScript for the scripts in its folder and the command-line tools its instructions call (python). Our summary lists: Python to run scripts/build.py.

Does Single-File HTML Composer access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Single-File HTML Composer safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Single-File HTML Composer use?

Single-File HTML Composer is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Single-File HTML Composer use?

About 3.2k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 4.2k tokens, read only when the agent opens those files.

What are the alternatives to Single-File HTML Composer?

Skills that share tags, products or a category with Single-File HTML Composer: Ky Markdown Rebuilder (KyrieCheungYep/ky-markdown-rebuilder, 117 stars), Visualize (display-dev/visualize, 131 stars), Openkb Deck Neon (VectifyAI/OpenKB, 4.7k stars) and Opendesign (manalkaff/opendesign, 261 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Single-File HTML Composer?

oaustegard (a GitHub user) maintains it in oaustegard/claude-skills, which has 150 GitHub stars. The repository holds 93 skills in this directory. The repository was last updated on October 2, 2026.

Source: oaustegard/claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.