agentleFS
abduelhamitabduelhamit/html-skill/skills/html/SKILL.md

html

Skill0 starsChanged 5 days agoMITView on GitHub

Writes a requested HTML page — report, explainer, plan, review, deck, prototype or throwaway editor — as one self-contained file instead of a Markdown answer, in Anthropic (default) or GitHub Primer style, light and dark.

19 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use variants, thermo-nuclear-code-quality-review and 5 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • Pawel-KicaSkill

    variants

    3-5 variants of anything as a tabbed HTML page. Trigger /variants.

    Also in 3 projects that use this

  • jaydubya818Skill

    thermo-nuclear-code-quality-review

    Use when the user requests an intentionally strict maintainability review.

    Also in 3 projects that use this

  • GoogleSkill

    prototype

    Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.

    Also in 4 projects that use this

  • GoogleSkill

    to-spec

    Turn the current conversation into a spec and publish it to the project issue tracker — no interview, just synthesis of what you've already discussed.

    Also in 3 projects that use this

  • MicrosoftSkill

    handoff

    Compact the current conversation into a handoff document for another agent to pick up.

    Also in 4 projects that use this

  • +2 more from google

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 0 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 18 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If the arguments start with anthropic or primer (any case), that word is the style and the rest is the request.

    line 21
  2. Very specific:

    If its structure or interactions would help, read it without its CSS, two at most: python3 ${CLAUDE_SKILL_DIR}/build.py --example <name>, …

    line 49
  3. Very specific:

    Write <dir>/<slug>.src.html, where <dir> is the session's scratchpad directory (or the system temp directory if there is none) and <slug> a …

    line 57
  4. Very specific:

    Nothing is loaded: All CSS and JS inline. No CDN, web font, image file, @import, fetch or other request.

    line 61
  5. Very specific:

    Every text token reaches 4.5:1 against --bg, --surface and --wash in both styles and both schemes.

    line 112

“Common” is measured: kept by at least 6 in 10 of the 18 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

HTML output

Answer with one .html file the user opens in a browser: tables, diagrams, colour, layout and live controls where Markdown would give a long text that gets skimmed.

Arguments: $ARGUMENTS

1. Pick the style

If the arguments start with anthropic or primer (any case), that word is the style and the rest is the request. Otherwise the arguments are the request, or the user's message when the skill was triggered without any. Use anthropic, or primer if the user asked for a GitHub or Primer look. If there is no request at all, ask what to make.

2. Gather, then pick the pattern

First read what the page is about: the code, git history, files, documents, and any connected tools such as issue trackers or chat. That context is what the page is for. Never invent figures, quotes or results; where data is missing, say so on the page or ask.

Then decide what the page has to do and pick the closest of the bundled examples:

PageIn examples/, each .html
Options side by side01-exploration-code-approaches implementations with trade-offs; 02-exploration-visual-designs live layouts and palettes; unknowns/03-design-directions four rival designs, steal/skip chips
Plan16-implementation-plan timeline, data flow, mockups, risk table; unknowns/08-implementation-plan decisions most likely to change first, with alternatives
Code review, PR write-up03-code-review-pr diff with margin notes and severity; 17-pr-writeup motivation, before/after, file-by-file tour
Explainer04-code-understanding modules as boxes and arrows; 14-research-feature-explainer TL;DR, collapsible steps, tabbed snippets, FAQ; 15-research-concept-explainer live model, comparison, hover glossary; unknowns/02-color-grading-explainer vocabulary ladder, before/after sliders
Design system05-design-system token swatches; 06-component-variants every size, state and intent
Prototype, mock07-prototype-animation timing and easing sliders; 08-prototype-interaction linked screens; unknowns/04-toolbar-mock toggleable placements, A/B questions
Diagrams10-svg-illustrations copyable SVG figures; 13-flowchart-diagram clickable flowchart
Deck09-slide-deck arrow-key slides
Report, log11-status-report shipped and slipped, small chart; 12-incident-report timeline, logs, follow-ups; unknowns/09-implementation-notes deviations from the plan
Editor with export18-editor-triage-board drag across columns; 19-editor-feature-flags toggles, dependency warnings, copy diff; 20-editor-prompt-tuner template with live previews
Unknowns before buildingunknowns/01-blindspot-pass blindspot cards, better prompt; unknowns/05-churn-brainstorm options cheap to ambitious, checkboxes build the reply; unknowns/06-interview one question at a time, decisions table
Port, pitch, quizunknowns/07-reference-port semantics map, edge-case tables; unknowns/10-pitch-doc demo first, objections answered; unknowns/11-change-quiz merge report ending in a quiz

If its structure or interactions would help, read it without its CSS, two at most: python3 ${CLAUDE_SKILL_DIR}/build.py --example <name>, <name> as in the table. Copy none of its colours, fonts or custom properties such as --mono or --clay: they mean other things there. reference.md is the gallery's background and prompts, for people; picking needs none of it.

3. Write the draft

Write <dir>/<slug>.src.html, where <dir> is the session's scratchpad directory (or the system temp directory if there is none) and <slug> a short kebab-case name for the topic. Use absolute paths from here on. A complete page, following these rules:

  • Nothing is loaded. All CSS and JS inline. No CDN, web font, image file, @import, fetch or other request. Images are inline SVG or data: URIs. Links are fine.
  • <meta charset="utf-8"> and <meta name="viewport" content="width=device-width, initial-scale=1"> first in <head>, and lang on <html>. Write the page in the language the user writes in.
  • The page's own colours, fonts and corners come only from the tokens below. Tints are color-mix(in srgb, var(--token) N%, transparent). Never set a token: a page that does pins its light value in dark mode too, so the build refuses it. The one exception is content that is colour or another product's look — swatches, mockups, design directions, chart series beyond the status colours — which may use its own values, scoped to that demo under custom properties named --demo-*. Custom properties of your own for other values, such as spacing or sizes, are fine.
  • Documents lead with the answer. For reports, plans, explainers and reviews: a short eyebrow label, the title, a lede of a sentence or two, then the TL;DR or decision before the detail; depth behind tabs, <details> or a sticky table of contents; prose lines around 70 characters and the page at most about 1100 px wide. Boards, grids, decks and side-by-side comparisons may use the full width.
  • Every page reflows on a phone without scrolling sideways. Grid columns as minmax(0, 1fr), not 1fr, which a long line of code stretches; wide code, diffs and tables scroll inside their own box.
  • Use the medium. A table for anything tabular. Inline SVG for diagrams, flows, timelines and charts — never ASCII art or Unicode blocks. A rendered diff with notes on its lines for code changes. Swatches for colours. Live controls for anything tunable. For charts, follow a charting or data-visualisation skill if one is available.
  • Interactive pages end in an export. Wherever the reader decides, tunes, sorts or edits, add a button that copies the result — as a prompt to paste back into Claude Code, or as JSON, Markdown or a diff of only what changed — and show that it was copied.
  • Accessible. Real <button>s, a <label> for every control, everything usable by keyboard (arrow keys in a deck), visible focus, and animations that respect prefers-reduced-motion.
  • Code goes in <pre><code>, escaped, highlighted with spans coloured by the --code-* tokens where that helps.

Tokens

TokenUse
--bgpage background
--surfacecards, panels, popovers, inputs
--washcode blocks, table headers, wells, hover fills
--fgbody text
--fg-mutedsecondary text
--fg-subtlecaptions, metadata, eyebrows
--bordercard and panel outlines; a colour, so 1px solid var(--border)
--border-softdividers, table rows
--border-controloutlines of inputs and other controls
--accentbrand marks, highlights, focus rings, chart emphasis — not for text
--accent-fglinks and accent text; the fill of a primary button, labelled in --bg
--accent-washselected or highlighted backgrounds, the TL;DR box
--success, --attention, --dangerstatus text and marks, diff additions and deletions
--success-wash, --attention-wash, --danger-washtheir backgrounds
--code-keyword, --code-function, --code-string, --code-constant, --code-commentsyntax highlighting
--font-heading, --font-body, --font-monoheadings, buttons and labels / running text / code
--radiuscorner radius

Every text token reaches 4.5:1 against --bg, --surface and --wash in both styles and both schemes. The style already sets color-scheme, the body's margin (0), background, colour, font and line height, inherited font and colour in form controls, the heading font, weight and line height, monospace for code, scrolling <pre>, and the link colour; nothing else, and no classes. For a contrast check, print its values with python3 ${CLAUDE_SKILL_DIR}/build.py --tokens <style>.

4. Build and open

python3 ${CLAUDE_SKILL_DIR}/build.py --open <style> <dir>/<slug>.src.html

It writes <dir>/<slug>.html. If the user asked for the page to go elsewhere, copy it there with cp after every build, so the user approves where it goes.

(Python 3.9 or later; python on Windows if there is no python3.) It puts the style in front of the draft's CSS, inlines the fonts, puts a Content-Security-Policy at the start of <head> and opens the page in the default browser. The CSP lets through only images, media and fetch from data: or blob:, and fonts from data:; frames, plugins, workers, scripts and stylesheets are blocked whatever their URL, so a live preview uses srcdoc. The build refuses any such load it finds in the draft's tags, CSS or JS imports, a meta refresh, speculation rules, setting a token and a late charset, and names what it found: fix the draft and run it again. Text on the page is never scanned, so code shown in any markup is safe. Requests from script, or from markup that script adds, pass the build; the browser blocks them and shows the violation only in the console. Size is not checked. If it says no browser could be opened, just give the path.

Screenshots pay off only for diagrams and tight layouts, and every turn re-sends the whole session. So capture every view you need (light, dark, phone width) in one command, read them all in one turn, and after fixes re-check once, only what changed.

For changes, edit the .src.html and rebuild, without --open if the page is already open, and ask the user to reload it. Never read or edit the built page: the inlined fonts add about 200 KB (Anthropic) or 75 KB (Primer) of base64.

Reply with the path and one sentence on what the page shows. If the page is in <dir>, say that the path is temporary, out of reach of later sessions and possibly deleted at reboot, and offer to copy it wherever the user says. Do not repeat its content in Markdown.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.