--- name: html-prototypes description: "Build a quick HTML page instead of a long chat answer: a review page for a deck or a document, options to compare side by side, a small tool, a plan, an explainer, a diagram, a tracker, or an editor that exports its result. One self-contained file, no build step, checked at desktop and phone width, then published where the user's agent can host it (a Claude artifact, a ChatGPT site, or a local file). Use for any request for a page, review page, prototype, mockup, tool or visual explainer in HTML." --- # HTML Prototypes How to build quick, custom HTML pages for the user, whichever agent builds them and wherever they are published. The page is the same single file on every host; only the publishing step changes. A good page is one the user can react on, and whose result comes back to the agent without retyping. > Start from this file, then make it yours: every time you correct the agent, it logs the correction in `FEEDBACK.md`, and corrections you repeat become rules here. **Credits.** Most of these practices come from two public sources. Read them; they are short and full of examples: - Thariq, "The unreasonable effectiveness of HTML": https://thariqs.github.io/html-effectiveness/ - Simon Willison, "Useful patterns for building HTML tools" (December 10, 2025): https://simonwillison.net/2025/Dec/10/html-tools/ When you update this skill from those pages, read the pages themselves, not a tool's summary of them. ## Load first 1. `FEEDBACK.md` in this folder: the user's past corrections. 2. An earlier page the user approved, if one exists. Start from its look and structure (rule 14). 3. The host's own instructions (Hosts, below). They win over this file. ## When a page beats Markdown Make an HTML page instead of a Markdown answer when one of these is true: - **Several options to choose from.** Lay them side by side so the user can point at one. "Reacting is easier than imagining." (Thariq) - **The information is spatial.** A room, a board, a diff, a call graph, a timeline. Markdown flattens them. - **Motion or interaction is the question.** "Motion and interaction can't be described, only felt." (Thariq) - **A recurring document should get read.** Status updates and post-mortems gain from a little structure and color. - **A new topic needs navigating.** Collapsible sections, tabs and a glossary read differently from the same words in one long column. - **The user has to decide or edit something** and hand the result back (review pages and editors, below). Anything that must keep running, update itself or carry real users is no longer a prototype: give it its own repo. ## How to build the page - **Nothing external by default.** No external scripts, stylesheets or web fonts. The file opens straight from disk. - **System font stacks as tokens** on `:root`: a serif, a sans and a mono stack. Mono for code, paths, labels and numbers. - **A small palette as tokens** on `:root` (one accent, one success color, a ladder of neutrals), named by role, never hard-coded in rules. - **A viewport meta tag, CSS grid, a reading column of about 640 to 980 px, and one or two breakpoints** so the page reflows on a phone. `clamp()` for type that scales. - **Native elements first:** `
` for collapsible steps, `position: sticky` for an "On this page" list, real `