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

html-artifacts

Skill11k starsChanged 16 days 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 publish_artifact, output_iframe, or slack_attach_html.

12 other projects use a version of this.

Adopted by

Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data

Week of Sep 13: 0 new projectsWeek of Sep 20: 0 new projectsWeek of Sep 27: 0 new projectsWeek of Oct 4: 0 new projectsWeek of Oct 11: 0 new projectsWeek of Oct 18: 0 new projectsWeek of Oct 25: 0 new projectsWeek of Nov 1: 0 new projects
Sep 2026Oct 2026Nov 2026
New projects taking a version of this file each week, over the 8 weeks our latest run read: only 0 in all, so this is a hint, not a trend.

Most recently taken up by

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

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

See all 75

Talked about on GitHub, YouTube, Bluesky, Hacker News and the web (75 times).

On GitHub · 50

45 more on GitHub

On YouTube · 9

4 more on YouTube

On Bluesky · 9

4 more on Bluesky

On Hacker News · 4

On the web · 3

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 4 are distinctive, and 6 are very specific to this project.

  • 0

    Common

    Most of the 12 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 6

    Very specific

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

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

    Write the page content directly.

    line 10
  2. Very specific:

    When you omit <html>, <head>, and <body>, the tool wraps your content in that skeleton with a minimal CSS reset.

    line 11
  3. Very specific:

    Write a <title> yourself — a specific 2–4 word name for this page, not a summary or a category label.

    line 12
  4. Very specific:

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

    line 38
  5. Distinctive:

    Only a user-requested single-theme artifact may omit both dark layers, and every background and foreground must still be explicit.

    line 57
  6. Very specific:

    Keep running text near 65 characters, set a type scale and stay on it, give headings text-wrap: balance, uppercase labels a touch of …

    line 62
  7. Very specific:

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

    line 67
  8. Distinctive:

    When the artifact is a tool or dashboard rather than a document, the craft shifts to information design.

    line 69
  9. Distinctive:

    Avoid generic AI defaults: cream/terracotta serif pages, black with one neon accent, purple-blue gradient heroes, broadsheet hairlines over …

    line 77
  10. Distinctive:

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

    line 83

“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

publish_artifact, 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.