anthropics/skills · skills/web-artifacts-builder/SKILL.md
web-artifacts-builder
“Anthropic's React-to-single-HTML artifact kit: lean and useful, but cites a section that doesn't exist”
What it does
Scaffolds a React + TypeScript + Tailwind + shadcn/ui project with a script, has the agent edit it, then bundles everything into one self-contained bundle.html to show as a claude.ai artifact.
- When the agent uses it
- When a user wants a complex claude.ai HTML artifact that needs state management, routing or shadcn/ui components, not a simple single-file page.
- Who it is for
- For people building rich multi-component artifacts in claude.ai. Skip it if your artifacts are simple single-file HTML or JSX.
- What it costs
- 51 lines, about 831 tokens once the agent loads it.
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.
What it tells the agent to do
- Run bash scripts/init-artifact.sh <project-name> and cd into the new project
- Edit the generated React files to build the artifact, avoiding 'AI slop' styling
- Run bash scripts/bundle-artifact.sh to inline everything into bundle.html
- Share bundle.html with the user as an artifact
- Optionally test it with Playwright, Puppeteer or other tools, but only after presenting it or if asked
Lines worth reading
Straight from the file, with why each one matters.
line 3not for simple single-file HTML/JSX artifacts
A description that says when not to use it. That is rare and helps the agent route requests well.
line 20avoid using excessive centered layouts, purple gradients, uniform rounded corners, and Inter font
A blunt, specific list of the default AI look. Far more usable than 'make it look good'.
line 70avoid testing the artifact upfront as it adds latency
This puts speed ahead of verification on purpose: ship first, test if issues arise. Bold, and debatable.
line 43See **Common Development Tasks** below for guidance.
There is no such section below. Step 2, the actual work, points at nothing.
Watch out for
- Medium
The agent runs two bash scripts whose contents could not be reviewed here. What they actually do rests on the file's description alone.
line 28bash scripts/init-artifact.sh <project-name>
- Low
The bundle script installs npm packages from the registry, so it needs network access and pulls in third-party code.
line 57Installs bundling dependencies (parcel, @parcel/config-default, parcel-resolver-tspaths, html-inline)
The scorecard
- TriggerSays when to use it8/10
Says what, when, and when not. 'Suite of tools' is a vague opener.
- FocusOne clear job8/10
One job: build and bundle rich artifacts. Clear scope.
- LeanLight to load9/10
About 830 tokens, with the work pushed into scripts.
- ConcreteSteps you can follow6/10
Exact commands, but step 2 is vague and its guidance section is missing.
- SafeSafe to run7/10
Nothing destructive in view. Unseen scripts install npm packages.
What it does well
- Pushes setup and bundling into scripts, so the agent runs them instead of reading them.
- Explains exactly what the bundle script does and requires (index.html in the root).
- Gives a concrete anti-slop style list instead of generic design advice.
How it could be better
Add the missing Common Development Tasks section
Step 2 points to guidance that does not exist, so the core editing work has no direction.
Add## Common Development Tasks - Add a page: create `src/pages/<Name>.tsx` and register it in `<router file>`. - Use a component: `import { Button } from "@/components/ui/button"`. - Shared state: <how state is managed in the template>.Say how to check the bundle worked
There is no done-check, so a broken bundle could be shared without anyone noticing.
AddAfter bundling, confirm `bundle.html` exists and is non-empty, and that it contains no external `<script src=` or `<link href=` references except <allowed CDNs>.
Disclose network and install side effects
The user should know that both scripts fetch and install packages before running them.
AddNote: `init-artifact.sh` and `bundle-artifact.sh` install npm packages and need network access. <list what init-artifact.sh installs and where>.
Lead the description with the action
'Suite of tools' wastes the first words. Requests sound like 'build a React artifact'.
Adddescription: Builds complex claude.ai HTML artifacts with React, Tailwind CSS and shadcn/ui, bundled into a single HTML file. Use when an artifact needs state management, routing, multiple components or shadcn/ui - not for simple single-file HTML/JSX artifacts.
Kin reviews against Anthropic’s Extend Claude with skills and agentskills.io’s the Agent Skills standard. It reads SKILL.md only, so a script beside it can still do things the file does not say.