html-artifacts
БесплатноБез исполняемых скриптовНе проверенAuthor the HTML for a plan artifact, dashboard iframe, or Slack attachment — structure, design plan, available runtime, theming, and craft. Read this before…
от langchain-ai★ 11 279 звёзд на GitHubОб этом скилле
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
Установить html-artifacts в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл html-artifacts?
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.
Как установить скилл html-artifacts?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл html-artifacts запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic