agentleFS
liush2yuxjtuliush2yuxjtu/html-artifacts/SKILL.md

html-artifacts

Skill2 starsChanged 52 days agoApache-2.0View on GitHub

Build a single self-contained, interactive HTML artifact and pop it open in the browser. Covers reports, slide decks, flowcharts/diagrams, design systems, component sheets, clickable prototypes, animation sandboxes, code-review / PR writeups, module maps, research explainers, status / incident reports, and throwaway editor UIs (triage board, feature-flag toggler, prompt tuner). Reach for this WHENEVER the user wants to SEE something instead of reading prose about it — phrases like "make an HTML page/artifact", "build me a deck / report / diagram / mockup / dashboard / prototype", "show me this as a webpage", "visualize this", "render this", "pop it open / 弹开看看", "做成一页 HTML", or any time the answer lands better as a spatial, interactive page than as markdown. Output is one self-contained .html saved to ~/.claude/artifacts/ and opened in the browser, styled with the Claude editorial design system and modeled on the bundled reference/*.html pattern library ("the unreasonable effectiveness of HTML"). NOT for shippable production UI / React components, and NOT a replacement for /talk-html when the user specifically wants a shareable gist recap link.

12 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 3 are distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 12 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

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

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

    reacts to the thing: instead of imagining it from a description.

    line 27
  2. Very specific:

    Save to ~/.claude/artifacts/ and pop it open: Use the helper:

    line 59
  3. Very specific:

    Every file is a full, self-contained example.

    line 72
  4. Distinctive:

    Spatial beats linear: If the content has a shape — a graph, a timeline, a before/after — draw the shape.

    line 172
  5. Distinctive:

    Earn every interaction: Add a slider, toggle, drag, or live-rerender only where the human's *decision* improves by playing with it (tuning …

    line 174
  6. Very specific:

    Default path: ~/.claude/artifacts/<slug>.html (the dir already exists).

    line 188
  7. Distinctive:

    After opening, report the path so the user knows where it lives.

    line 198

“Common” is measured: kept by at least 6 in 10 of the 12 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 Artifacts — the unreasonable effectiveness of HTML

Markdown flattens things that are inherently spatial or interactive: a diff, a module graph, a set of design options, a four-screen flow, a 30-ticket backlog. A single self-contained HTML file renders them as themselves — the human reacts to the thing instead of imagining it from a description. That tighter feedback loop is the whole point. This skill builds that file, drops it in ~/.claude/artifacts/, and pops it open.

The bundled reference/*.html is a library of 20 worked examples (from Thariq Shihab's "The unreasonable effectiveness of HTML"). They are the source of truth for how good these should look and feel — read the one closest to the task before writing, then adapt. Don't reinvent; the references already solved layout, interaction, and polish for each genre.

When to reach for this

  • The user asks for an HTML page / artifact / "one-pager" / webpage to look at.
  • The answer is a report, plan, deck, diagram, design, prototype, explainer, or a small editing UI — anything in the index below.
  • The content is spatial (diffs, maps, timelines, flowcharts) or wants interaction (toggles, sliders, drag, live-rerender, arrow-key nav).
  • The user says "pop it open", "弹开看看", "做成一页", "show me", "visualize".

Skip it for: production UI / React components (build those for real), pure data files, or when the user explicitly wants /talk-html to publish a shareable gist recap.

Workflow

  1. Pick the genre → open the matching reference. Map the request to a row in the index, then actually Read that reference/<file>.html. It shows the layout, the interaction model, and the quality bar to match.
  2. Build ONE self-contained .html. Everything inline — no CDN fonts, no external scripts, no build step. Vanilla HTML + CSS + a little JS; inline <svg> for diagrams. It must open correctly from a file:// path with no network. Use the house design system below.
  3. Save to ~/.claude/artifacts/ and pop it open. Use the helper:

    bash ~/.claude/skills/html-artifacts/scripts/open-artifact.sh <slug> [source.html]

    It writes ~/.claude/artifacts/<slug>.html (from a file arg or stdin), opens it in the default browser, and prints the absolute path. Then tell the user the path. Reuse-friendly slugs: status-report-w24, deploy-flowchart, triage-board. Add a date suffix (-2026-06-29) when versions matter.

Reference library — index

Every file is a full, self-contained example. Read the closest match before building. Live versions: https://thariqs.github.io/html-effectiveness/<file>.

Exploration & Planning

#reference filebuild this when you need…
0101-exploration-code-approaches.htmlThree code approaches side-by-side, trade-offs called out inline — for "which way should we solve this?"
0202-exploration-visual-designs.htmlVisual design directions — a few layout/palette options rendered live so the user reacts instead of imagining.
1616-implementation-plan.htmlImplementation plan to hand off — milestone timeline, data-flow diagram, inline mockups, the risky code, a risk table.

Code Review & Understanding

#reference filebuild this when you need…
0303-code-review-pr.htmlAnnotated pull request — a diff with margin notes, severity tags, jump links. Scans better than a terminal.
1717-pr-writeup.htmlPR writeup for reviewers — author's side: motivation, before/after, file-by-file tour with the why, where to focus.
0404-code-understanding.htmlModule map — an unfamiliar package as boxes + arrows, hot path highlighted, entry points listed.

Design

#reference filebuild this when you need…
0505-design-system.htmlLiving design system — colors, type scale, spacing tokens as copy-able swatches.
0606-component-variants.htmlComponent variants — every size / state / intent of one component on a single review sheet.

Prototyping

#reference filebuild this when you need…
0707-prototype-animation.htmlAnimation sandbox — a transition in isolation with duration / easing sliders to tune before wiring in.
0808-prototype-interaction.htmlClickable flow — a few screens linked together; enough fidelity to feel whether the interaction is right.

Illustrations & Diagrams

#reference filebuild this when you need…
1010-svg-illustrations.htmlSVG figure sheet — diagrams for a post, drawn inline so each can be tweaked and copied out.
1313-flowchart-diagram.htmlAnnotated flowchart — a pipeline as a real flowchart; click a step for what runs, timings, failure paths.

Decks

#reference filebuild this when you need…
0909-slide-deck.htmlArrow-key slide deck — a short presentation as one HTML file, ←/→ to navigate, no build step.

Research & Learning

#reference filebuild this when you need…
1414-research-feature-explainer.html"How a feature works" — TL;DR box, collapsible request-path steps, tabbed config snippets, FAQ.
1515-research-concept-explainer.htmlConcept explainer — a concept taught with a live interactive widget, a comparison table, a hover-linked glossary.

Reports

#reference filebuild this when you need…
1111-status-report.htmlWeekly status — what shipped, what slipped, a small chart, formatted for a Monday skim.
1212-incident-report.htmlIncident timeline — post-mortem with a minute-by-minute timeline, log excerpts, follow-up checklist.

Custom Editing Interfaces (throwaway tools that keep a human in the loop)

#reference filebuild this when you need…
1818-editor-triage-board.htmlTicket triage board — drag tickets across Now / Next / Later / Cut, then copy the ordering out as markdown.
1919-editor-feature-flags.htmlFeature-flag editor — toggles grouped by area, dependency warnings, a "copy diff" button for changed keys.
2020-editor-prompt-tuner.htmlPrompt tuner — editable template with highlighted variable slots; sample inputs re-render live as you type.

House design system (Claude editorial)

The references share one look: warm ivory paper, a clay accent, serif display headings over a sans body, mono for labels and code. Reusing it makes new artifacts feel native. Drop this in <head> and build on it:

<style>
:root{
  --ivory:#FAF9F5; --paper:#FFFFFF; --slate:#141413;
  --clay:#D97757; --clay-d:#B85C3E; --oat:#E3DACC; --olive:#788C5D;
  --g100:#F0EEE6; --g200:#E6E3DA; --g300:#D1CFC5; --g500:#87867F; --g700:#3D3D3A;
  --serif:ui-serif,Georgia,"Times New Roman",Times,serif;
  --sans:system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  --mono:ui-monospace,"SF Mono",Menlo,Monaco,Consolas,monospace;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--ivory);color:var(--slate);font-family:var(--sans);
  line-height:1.55;-webkit-font-smoothing:antialiased}
.wrap{max-width:1120px;margin:0 auto;padding:0 32px 140px}
h1,h2,h3{font-family:var(--serif);font-weight:500;letter-spacing:-.018em}
h1{font-size:clamp(38px,5.4vw,62px);line-height:1.06}
h1 em{font-style:italic;color:var(--clay)}
.eyebrow{font-family:var(--mono);font-size:12px;letter-spacing:.12em;
  text-transform:uppercase;color:var(--g500)}
code,kbd,.mono{font-family:var(--mono)}
a{color:var(--clay)}
</style>

Type roles: serif = display headings (italic + clay for emphasis); mono = eyebrows, labels, tags, code, numbers; sans = body. The clay #D97757 is the only loud color — use it sparingly for the one thing the eye should land on. Greys (--g100…g700) carry structure.

Principles that make these work

  • Self-contained, always. One file, no network. It must open from file:// with fonts, styles, scripts, and SVG all inline. This is why the user can keep it, mail it, and reopen it next month.
  • Spatial beats linear. If the content has a shape — a graph, a timeline, a before/after — draw the shape. That's the edge over markdown.
  • Earn every interaction. Add a slider, toggle, drag, or live-rerender only where the human's decision improves by playing with it (tuning an easing, ordering a backlog). Static content stays static — don't bolt on motion.
  • Include the exit. Editing UIs (18–20) end in a copy-out button — markdown, a diff, a JSON blob — so the human's decisions flow back into the real workflow. An interface with no export is a dead end.
  • Skim-first hierarchy. Lead with the TL;DR / the chart / the headline number. Collapsible sections and tabs hold the detail. Respect the Monday- morning skim.
  • Quiet, confident polish. Generous whitespace, one accent color, real type hierarchy. Match the reference's restraint — no gradients-on-everything.

Saving & popping open

  • Default path: ~/.claude/artifacts/<slug>.html (the dir already exists).
  • Helper does write + open + prints the path:
    # from an existing file:
    bash ~/.claude/skills/html-artifacts/scripts/open-artifact.sh deploy-flowchart /tmp/draft.html
    # or pipe content in:
    cat <<'HTML' | bash ~/.claude/skills/html-artifacts/scripts/open-artifact.sh status-report-w24
    <!doctype html>...
    HTML
  • After opening, report the path so the user knows where it lives. Popping open is the deliverable — the user reads the page in the browser, not in chat.

Anti-patterns

  • ❌ Linking external CSS/JS/fonts (breaks offline, breaks file://). Inline it.
  • ❌ Pulling in React / Vue / a bundler for a throwaway artifact. Vanilla only.
  • ❌ Writing a prose document and calling it HTML. If it's just paragraphs, it should have been markdown — this skill is for things prose can't hold.
  • ❌ Building without reading the closest reference first. The reference is the quality bar; skipping it produces generic output.
  • ❌ Saving somewhere other than ~/.claude/artifacts/, or forgetting to open it. The user expects it on screen.

Credits & license

The 20 reference/*.html files are from ThariqS/html-effectiveness ("The unreasonable effectiveness of HTML"), © 2026 Anthropic PBC, Apache-2.0, bundled here unmodified with their original per-file copyright headers. See NOTICE. The skill scaffolding is © 2026 Liu Shiyu, Apache-2.0 (LICENSE).

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.