HTML Cabinet
Essay · ~10 min · 7 living figures
Using Claude Code

The unreasonable effectiveness of HTML.

An argument for retiring the markdown plan and letting agents reach for the format that can actually carry the weight.

Markdown has become the dominant file format used by agents to communicate with us. It's simple, portable, has some rich text capability, and is easy for you to edit. Claude has even gotten surprisingly good at using ASCII to make diagrams inside of markdown files.

But as agents have become more and more powerful, I have felt that markdown has become a restricting format. I find it difficult to read a markdown file of more than a hundred lines. I want richer visualizations, color and diagrams, and I want to be able to share them easily.

I'm also increasingly not editing these files myself, but using them as specs, reference files, brainstorming outputs. When I do make edits, I'm usually prompting Claude to edit them, which removes one of markdown's largest benefits.

I've started preferring HTML as an output format instead of Markdown, and increasingly see this being used by others on the Claude Code team. This is why.

If you want to start with examples, you can see a bunch at thariqs.github.io/html-effectiveness — but come back and read more about why.

Why HTML?

Information Density

HTML can convey much richer information compared to markdown. It can do simple document structure like headers and formatting, but it can also represent all sorts of other information:

I would go so far as to say there is almost no set of information Claude can read that you cannot fairly efficiently represent with HTML.

Tabular data native
Color & design native
Diagrams (SVG) native
Layout & structure native
Interaction native
In markdown ASCII only
Click any row to see HTML's native version of that data.
What each format can natively represent. Click a row to see HTML's version of that data type — and what markdown reaches for instead.

In the absence of being able to do this, the model may do more inefficient things in markdown — like ASCII diagrams or, my favorite, estimating colors with unicode characters:

In markdown
██red ██green ██blue ██yellow
In HTML
Top: Claude Code estimating colors with unicode block characters. Bottom: actual CSS, doing what unicode was never meant to.

Visual Clarity & Ease of Reading

As Claude is able to do more complex work, it's also writing larger and larger specs and plans. In practice, I've found I tend not to actually read more than a 100-line markdown file, and I certainly am not able to get anyone else in my organization to read it.

HTML documents are much easier to read. Claude can organize the structure visually to be ideal to navigate — with tabs, illustrations, links. It can even be mobile-responsive, so you can read it differently based on your form factor.

same content, two formats
# Brand palette A warm, editorial set inspired by cream paper and vermillion ink. | Name | Hex | Use | |-------------|---------|--------------------| | Cream | #f6efde | page background | | Paper | #fdfaf0 | surface, cards | | Ink | #161108 | body text | | Vermillion | #b03a14 | accent, links | | Sage | #5a8048 | "yes" / additions | - Cream: warm enough to feel printed - Vermillion: 5% of the page max
Same brand-palette spec. Markdown gets a table; HTML shows the actual color.

Ease of Sharing

Markdown files are fairly hard to share since most browsers don't render them natively well. You often have to add them as attachments to emails or messages.

With HTML, as long as you upload the file (for example to S3), you can share the link easily. Your colleagues can open it wherever they wish and easily reference it.

your file paste.html /d/<slug> browser
Save once, share a link. The chance someone reads your spec, report, or PR writeup is much higher.

Two-way Interaction

HTML can let you interact with the document. You might ask Claude to add sliders or knobs to adjust a design, or let you tweak different options in an algorithm to see what happens. You can also ask it to give you a button that copies these changes back into a prompt to paste into Claude Code.

Angle
Length100%
Copy as prompt
Make the arrow rotate with length 100%.
A real slider, adjusting a real arrow. The bottom strip is the prompt you'd paste back into Claude.

Read more about my playgrounds post to see examples of this kind of two-way interaction.

Data Ingestion

Why use Claude Code to make HTML files instead of Claude.ai or Claude Design? One of the biggest reasons is all the context Claude Code can ingest.

For example, when writing this article, I asked Claude Code to read through my code folder, find all the HTML files I've generated, group and categorize them, then make an HTML file with diagrams representing each type. The diagrams you see in this article are a direct result.

Besides the file system, Claude Code can find additional context using your MCPs (like Slack, Linear), your web browser (with Claude in Chrome), your git history, and more.

repo/ slack linear git browser files Claude Code
The agent ingests across surfaces — code, Slack, Linear, git, browser — and renders them all into one HTML artifact.

It's Joyful

Making HTML documents with Claude is just more fun, and makes me feel more involved and invested in the creation. That, by itself, is enough.

(Try clicking the heading.)


How to get started

I'm a little bit afraid people will read this and turn it into a /html skill. While there might be value in that, I want to emphasize that you don't need to do much to get Claude to do this. You can just ask it to "make an HTML file" or "make an HTML artifact."

The trick is knowing what you want the artifact to do and how you might use it. You may over time make a skill, but for now I'd suggest just prompting from scratch to get a hang of how to use it in different cases.

Use cases

To make this more concrete, I've made many different HTML files for different use cases. Here's an overview.

Specs, planning & exploration

HTML is a rich canvas for Claude to dive into a problem. When I start working on something, instead of a simple markdown plan I expect to make a web of HTML files. I might start by asking Claude to brainstorm and create explorations of different options. I'd then ask it to expand on one — make mockups, code snippets. Finally, when I feel good, I'll ask it to write an implementation plan. When I'm happy, I'll create a new session and pass in all of these files for it to implement.

When verifying I'll also ask the verification agent to read the files; it has much broader context on what's needed.

I'm not sure what direction to take the onboarding screen. Generate 6 distinctly different approaches — vary layout, tone, and density — and lay them out as a single HTML file in a grid so I can compare them side by side. Label each with the tradeoff it's making.
Create a thorough implementation plan in an HTML file. Include some mockups, show data flow, and add important code snippets I might want to review. Make it easy to read and digest.
Exploring optionsdifferent ways to implement the same thing
Visual designsmultiple mockups side-by-side

Code review & understanding

Code can be difficult to read in a markdown file. With HTML we can render diffs, annotations, flowcharts, modules. Use this to understand code an agent has written, to get code review, or to explain a PR to a reviewer. I find this often works better than the default GitHub diff view, and I attach an HTML code explainer to every PR I make now.

Help me review this PR by creating an HTML artifact that describes it. I'm not very familiar with the streaming/backpressure logic, so focus on that. Render the actual diff with inline margin annotations, color-code findings by severity, and whatever else might be needed to convey the concept well.
Creating a PRannotated diff your reviewers will read
Reviewing a PRrender the change in your own way
Understanding codewalk through how a system works

Design & prototypes

Claude Design is based on HTML because HTML is incredibly expressive at design — even if your end surface is not HTML. Claude can sketch a design in HTML and then write it in your language of choice (React, Swift, etc.).

You can also prototype interactions: animations, actions. Consider asking Claude to make sliders and knobs to tune in exactly what you're looking for.

I want to prototype a new checkout button — when clicked, it does a play animation and then turns purple quickly. Create an HTML file with several sliders and options for me to try different versions of this animation. Give me a copy button to copy the parameters that worked well.
Design system artifactstokens, components, the lot
Adjusting componentsknobs for visual params
Component librariesbrowse what you have
Joyful animationsfind the right easing live

Reports, research & learning

Claude Code is incredibly good at synthesizing information across multiple data sources and converting it into a report. You can prompt it to search Slack, the codebase, git history, the web, and use that to generate extremely readable reports for yourself, leadership, or your team.

You could assemble this as a long HTML document, an interactive explainer, or even a slideshow. Ask Claude to use SVG for diagrams.

For my posts on prompt caching, I asked Claude to prepare an in-depth research file in HTML for me to read after reading the git history.

I don't understand how our rate limiter actually works. Read the relevant code and produce a single HTML explainer page: a diagram of the token-bucket flow, the 3–4 key code snippets annotated, and a "gotchas" section at the bottom. Optimize it for someone reading it once.
Feature explainerhow something works, end to end
Concept walkthroughso you actually understand it
Status reportsweekly to your boss
Incident reportsto leadership, with the timeline
Diagrams & flowchartsSVG that travels
Slides & decksself-contained, shareable

Custom editing interfaces

Sometimes it's hard to describe what you want purely in a text box. In that case, I'll ask Claude to build me a throwaway editor for the exact thing I'm working on. Not a product, or a reusable tool — a single HTML file, purpose-built for this one piece of data.

The trick is always to end with an export: a "copy as JSON" or "copy as prompt" button that turns whatever I did in the UI back into something I can paste into Claude Code.

I need to reprioritize these 30 Linear tickets. Make me an HTML file with each ticket as a draggable card across Now / Next / Later / Cut columns. Pre-sort them by your best guess. Add a "copy as markdown" button that exports the final ordering with a one-line rationale per bucket.
Here's our feature flag config. Build a form-based editor for it — group flags by area, show dependencies between them, warn me if I enable a flag whose prerequisite is off. Add a "copy diff" button that gives me just the changed keys.
I'm tuning this system prompt. Make a side-by-side editor: editable prompt on the left with the variable slots highlighted, three sample inputs on the right that re-render the filled template live. Add a character/token counter and a copy button.
Reordering & triagingtickets, test cases, feedback
Editing structured configflags, env, JSON / YAML with constraints
Prompt tuninglive preview, copy button
Curating datasetsapprove/reject, tag, export
Annotatingdocs, transcripts, diffs
Picking finicky valuescolors, easing, regions, regexes

Frequently asked questions

I've been telling many people I've switched to HTML, and a few questions repeat.

Isn't it less token-efficient?

Markdown often uses fewer tokens, but I've found the added expressiveness of HTML and the much higher likelihood of me actually reading it means I get overall better output. With the 1MM context window in Opus 4.7, the increased token usage isn't really noticeable.

When do you use markdown for now?

Honestly I've mostly stopped using markdown for almost everything, but I'm probably far on the HTML-maximalist side of things.

How do I view the HTML file?

I tend to just open it in a browser locally (you can ask Claude to open it), or upload to S3 if you want a shareable link.

Doesn't this take longer to generate than markdown?

It does! HTML can take 2–4× longer than markdown, but I've found the results are worth it.

What about version control?

Honestly one of the biggest downsides of HTML — diffs are noisy and hard to review compared to markdown.

How do I get Claude to match my taste / not make it ugly?

The frontend-design plugin helps Claude make good HTML files. To match your company's style, you can create a single design-system HTML file by pointing Claude at your codebase, then use that file as a reference for other HTML files.

Stay in the loop

All of the above is to say: I think the real reason I use HTML is that I feel much more in the loop with Claude. I had begun to fear that because I had stopped reading plans in depth, I would simply have to leave Claude to make its choices.

But I'm happy to say I feel more in the loop than ever before when using HTML. I hope you do too.

You prompt Claude render
The loop. The whole point of HTML is making this circle smaller.
Originally posted on X · @trq212 · rendered as the kind of HTML it argues for.