---
name: html-artifacts
description: Produce a self-contained HTML artifact instead of a markdown document when the content benefits from spatial layout, color, real diagrams, interactivity, or a round-trip editor. Use when the user asks for a "doc," "writeup," "plan," "spec," "report," "explainer," "comparison," "review," "PR description," "mockup," "diagram," "flowchart," "deck," "slides," "status update," "post-mortem," "dashboard," "chart," "playground," or a one-off "editor" or "tool" for triaging, reordering, or tuning something, even without saying "HTML" or "artifact." Also when asked to "explain," "compare," "explore options for," or "walk through" a non-trivial topic. Always use it when the deliverable is an .html file or a web page, even if the user names the file or asks for HTML directly; the skill is how the page gets checked, not just written. Stay in markdown for short replies, code-only answers, terminal-style instructions, and anything the reader will read once and discard.
license: Apache-2.0
metadata:
version: "2.0.0"
homepage: https://dogum.github.io/html-artifacts/
---
# HTML Artifacts
Markdown is the default agent output. For anything longer than a handful of sentences it is a poor one: it cannot put two options side by side, draw a real diagram, be interactive, or be shared as a page. When the artifact *is* the deliverable, the reader will do something with it: read it carefully, share it, hand it to an implementer, paste edits back. Make it HTML.
The skill is a judgment call, not a format switch. Most of what follows is about deciding well and then checking the result, because the model already knows how to write HTML.
## Reach for HTML when any of these hold
- **Comparison.** Two or more options the reader must weigh. Side by side beats stacked.
- **Spatial information.** Diffs, call graphs, module maps, flowcharts, timelines, before/after. Position carries meaning.
- **Interaction matters.** Easing curves, parameter tuning, state machines, simulations. Things the reader needs to *feel*.
- **Reference material.** Navigated non-linearly: tabs, collapsibles, a glossary in the margin, jump links.
- **Color or hierarchy carries meaning.** Severity, status, syntax, design tokens, data series.
- **Data.** More than a dozen numbers, a trend, a distribution. A table with sort and filter, or a chart.
- **One-off editor.** The reader manipulates a thing (drags tickets, toggles flags, tunes a prompt) and needs the result back as text.
- **It will be shared.** A spec to leadership, a PR writeup to reviewers, a report to a team. People read pages; they skim files.
- **Length.** Past roughly 100 lines of markdown, navigation and layout earn their keep.
## Stay in markdown when
- The reply is conversational, or the answer is a few sentences. One question, one answer, done.
- The output is code, a config block, a command sequence, or a diff the user will apply.
- The user is iterating fast on something disposable ("just summarize this file", "what does this function do").
- The document will live in git and be diffed in PRs over time. HTML diffs are noisy. Offer an HTML *view* alongside if review would benefit.
- The user asked for markdown, a specific format, or "no formatting."
If unsure, ask one question of yourself: *will the reader do anything with this beyond reading it once?* If not, markdown. HTML costs two to four times the tokens and takes longer; don't manufacture a use case.
## Universal rules
Every artifact must satisfy all of these.
1. **One self-contained `.html` file.** CSS in `