agentleFS
LangChainKnown publisherlangchain-ai/open-swe/agent/bundled_skills/html-artifacts/SKILL.md

html-artifacts

Skill11k starsChanged 2 months agoMITView on GitHub

Author the HTML for a plan artifact, dashboard iframe, or Slack attachment — structure, design plan, available runtime, theming, and craft. Read this before writing HTML for save_plan, output_iframe, or slack_attach_html.

9 other projects use a version of this.

Trending

More talk lately.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 22 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 1 mentionJul 2026: 2 mentionsAug 2026: 0 mentionsSep 2026: 9 mentionsOct 2026: 4 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the langchain-ai/open-swe repository that our weekly crawl found. There is no adoption data for this file yet.

Most recently taken up by

Who's talking about langchain-ai/open-swe

The biggest 5 of 48 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 48

Talked about on GitHub, Bluesky and Hacker News (48 times).

On GitHub · 35

30 more on GitHub

On Bluesky · 9

4 more on Bluesky

On Hacker News · 4

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 9 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

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

    Default user-facing HTML to the viewer's system light/dark preference using prefers-color-scheme.

    line 30
  2. Very specific:

    Keep keyboard focus visible, honor prefers-reduced-motion, close every non-void element, and watch selector specificity: classes that …

    line 52
  3. Distinctive:

    Write copy as design material: active voice, from the reader's side of the screen, specific over clever.

    line 64

“Common” is measured: kept by at least 6 in 10 of the 9 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

save_plan, output_iframe, and slack_attach_html all publish a self-contained HTML artifact, and one contract covers all three.

Write the page content directly. When you omit <html>, <head>, and <body>, the tool wraps your content in that skeleton with a minimal CSS reset. Write a <title> yourself — a specific 2–4 word name for this page, not a summary or a category label. A Slack attachment is opened as a standalone file, so include the full skeleton there.

Design plan first

Sketch a compact plan before writing HTML, then follow it:

  • Color: 4–6 named hex values grounded in the subject, including deliberately tinted neutrals. A pure mid-grey reads as unconsidered; a grey biased toward the accent reads as chosen.
  • Type: at least a display and a body role, plus a utility/data face when useful. Google Fonts may be linked directly; every face needs a real fallback stack.
  • Layout: the layout concept in one or two sentences. A plan or memo is polished and utilitarian — most pages need no oversized landing-page hero.

Derive every color and type decision in the page from that plan.

Runtime

Inline CSS and JavaScript, Canvas, WebGL, and inline SVG all run — prefer Canvas or WebGL over hand-authored SVG path data for generative graphics. Google Fonts stylesheets are the only permitted external resource; inline or data-URI every other asset.

Assume no network at runtime: no CDN scripts, fetch, or XHR. The viewer frames have an opaque origin, so localStorage, sessionStorage, and cookies throw on access — wrap any use in try/catch and render correctly with no stored value.

Theming

Default user-facing HTML to the viewer's system light/dark preference using prefers-color-scheme; provide both palettes unless the user explicitly requests a single theme. Honor an explicit viewer theme supplied by the dashboard over the system preference.

The dashboard stamps data-theme="light" or data-theme="dark" on <html>, so :root[data-theme="dark"] is the authoritative dark layer and must be complete on its own.

:root { /* the full light palette, as tokens */ }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { /* redefine only the tokens */ }
}
:root[data-theme="dark"] { /* redefine them again — this layer wins */ }

Declare color-scheme in each layer too (light on :root, dark in both dark layers) so scrollbars, form controls, and UA defaults follow the artifact instead of staying light under a dark palette. The dashboard seeds it from the viewer's theme; your own declaration wins.

The media-query layer covers surfaces that stamp nothing, such as a downloaded file or a Slack attachment. Paint body with an explicit token background and style components only through tokens: a color whose only definition sits inside a media or [data-theme] block is the classic unreadable-artifact bug. Give the second theme the same care as the first — don't naively invert; keep contrast legible and the accent working on both grounds. Only a user-requested single-theme artifact may omit both dark layers, and every background and foreground must still be explicit.

Craft

Semantic structure and real content, never lorem. Keep running text near 65 characters, set a type scale and stay on it, give headings text-wrap: balance, uppercase labels a touch of letter-spacing, and columns of digits font-variant-numeric: tabular-nums.

Space sibling groups with flex or grid gap rather than per-element margins that collapse or double. Wide content — tables, code, diagrams — gets its own overflow-x: auto container so the body never scrolls sideways.

Keep keyboard focus visible, honor prefers-reduced-motion, close every non-void element, and watch selector specificity: classes that cancel each other out silently undo your spacing.

When the artifact is a tool or dashboard rather than a document, the craft shifts to information design. Surface the summary before the detail and encode state in form as well as number — a pill, a chip, a severity stripe — so what needs attention reads at a glance. Semantic color (good / warning / critical) is separate from the accent hue and does not count as your accent.

Point of view

Ground visual choices in the task's subject and audience, and honor any design system already in the repo (AGENTS.md, a tokens or theme file, existing component styles) over your own choices.

Avoid generic AI defaults: cream/terracotta serif pages, black with one neon accent, purple-blue gradient heroes, broadsheet hairlines over dense columns, centered-everything layouts, ubiquitous rounded cards, decorative numbering, emoji section markers, and defaulting to Inter or Space Grotesk. Where the user names a visual direction, follow it exactly — including when they ask for one of these.

Structural devices — numbering, eyebrows, dividers, labels — must encode something true about the content. Numbered markers belong on a real sequence, not on an unordered list of points.

Write copy as design material: active voice, from the reader's side of the screen, specific over clever. A control says exactly what happens; an error says what went wrong and how to fix it.

For an editorial request — something the user will keep or share — review the design plan for choices you would produce for any similar page, revise at least one of them, spend boldness in one place, and keep everything around it quiet.

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.