Agent Skill
Web artifacts builder
Anthropic's skill that builds multi-component React, Tailwind and shadcn/ui apps and bundles them into one HTML file that works as a claude.ai artifact.
Bookmark
Bookmarks are kept in your free account, so you can find this page again on any device.
Sign in to bookmarkInstall
Commands are pinned to commit e4bb5d9, the version we read, wherever the install method supports it.
npx skills
npx skills add anthropics/skills@e4bb5d960d87126ff3b3a8af1a104b7db67560ba --skill web-artifacts-builder -a claude-codeCopies the skill into .claude/skills/ in this project, pinned to the reviewed commit.
Plugin marketplace
/plugin marketplace add anthropics/skills
/plugin install example-skills@anthropic-agent-skillsRun inside Claude Code. Installs the whole example-skills plugin from its default branch, not the pinned commit.
Upload
git clone https://github.com/anthropics/skills.git
cd skills && git checkout e4bb5d960d87126ff3b3a8af1a104b7db67560ba
cd skills && zip -r ~/web-artifacts-builder.zip web-artifacts-builderThen in Claude open Customize > Skills, choose + > Upload a skill and pick the zip. Code execution must be enabled in Settings > Capabilities.
npx skills
npx skills add anthropics/skills@e4bb5d960d87126ff3b3a8af1a104b7db67560ba --skill web-artifacts-builderPinned to the commit we reviewed. The CLI asks which agents to install for; add -g to install for your user instead of this project.
What it does
For artifacts too complex for a single JSX file. scripts/init-artifact.sh scaffolds a React and Tailwind project with shadcn/ui components unpacked from a bundled archive, you build as normal, and scripts/bundle-artifact.sh inlines everything into one HTML file. The SKILL.md includes design guidance to avoid the generic look of default component libraries.
When to use it
Claude artifacts that outgrow a single file: multi-page tools, dashboards with several components, apps that need routing or shadcn/ui components. The scaffold and bundle scripts handle the build so the result is still one HTML file you can share.
When to skip it
Simple artifacts, which a single JSX file handles, and real applications you plan to deploy, which deserve a normal project with tests rather than a bundled artifact.
Try it
Build an artifact for tracking our team's on-call rota: a calendar
view, a list of swaps and a form to request one, using shadcn/ui
components. Bundle it into one HTML file.
What it can touch
- Bundles scripts
- Yes
- Pre-approved tools
- None declared
- Needs
- Node.js; Bash
- Client-specific fields
- None, spec fields only
Its scripts run with your permissions, and it may have changed since the commit we read. How to check a skill.
The init script installs pnpm globally with npm if it is missing, creates a Vite project, installs packages from npm and unpacks shadcn-components.tar.gz, a binary archive you cannot read on GitHub without downloading it. If that matters to you, inspect the archive before running the script.
At commit e4bb5d9 the SKILL.md is 74 lines long. Alongside it:
scripts/(3 entries)LICENSE.txt
Alternatives
Frontend design for the visual direction, shadcn for component details, and build dashboard for data dashboards that need no build step.
SKILL.md
The file exactly as published at the reviewed commit, reproduced under its Apache-2.0 licence.
---
name: web-artifacts-builder
description: 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.
license: Complete terms in LICENSE.txt
---
# Web Artifacts Builder
To build powerful frontend claude.ai artifacts, follow these steps:
1. Initialize the frontend repo using `scripts/init-artifact.sh`
2. Develop your artifact by editing the generated code
3. Bundle all code into a single HTML file using `scripts/bundle-artifact.sh`
4. Display artifact to user
5. (Optional) Test the artifact
**Stack**: React 18 + TypeScript + Vite + Parcel (bundling) + Tailwind CSS + shadcn/ui
## Design & Style Guidelines
VERY IMPORTANT: To avoid what is often referred to as "AI slop", avoid using excessive centered layouts, purple gradients, uniform rounded corners, and Inter font.
## Quick Start
### Step 1: Initialize Project
Run the initialization script to create a new React project:
```bash
bash scripts/init-artifact.sh <project-name>
cd <project-name>
```
This creates a fully configured project with:
- ✅ React + TypeScript (via Vite)
- ✅ Tailwind CSS 3.4.1 with shadcn/ui theming system
- ✅ Path aliases (`@/`) configured
- ✅ 40+ shadcn/ui components pre-installed
- ✅ All Radix UI dependencies included
- ✅ Parcel configured for bundling (via .parcelrc)
- ✅ Node 18+ compatibility (auto-detects and pins Vite version)
### Step 2: Develop Your Artifact
To build the artifact, edit the generated files. See **Common Development Tasks** below for guidance.
### Step 3: Bundle to Single HTML File
To bundle the React app into a single HTML artifact:
```bash
bash scripts/bundle-artifact.sh
```
This creates `bundle.html` - a self-contained artifact with all JavaScript, CSS, and dependencies inlined. This file can be directly shared in Claude conversations as an artifact.
**Requirements**: Your project must have an `index.html` in the root directory.
**What the script does**:
- Installs bundling dependencies (parcel, @parcel/config-default, parcel-resolver-tspaths, html-inline)
- Creates `.parcelrc` config with path alias support
- Builds with Parcel (no source maps)
- Inlines all assets into single HTML using html-inline
### Step 4: Share Artifact with User
Finally, share the bundled HTML file in conversation with the user so they can view it as an artifact.
### Step 5: Testing/Visualizing the Artifact (Optional)
Note: This is a completely optional step. Only perform if necessary or requested.
To test/visualize the artifact, use available tools (including other Skills or built-in tools like Playwright or Puppeteer). In general, avoid testing the artifact upfront as it adds latency between the request and when the finished artifact can be seen. Test later, after presenting the artifact, if requested or if issues arise.
## Reference
- **shadcn/ui components**: https://ui.shadcn.com/docs/componentsRelated skills
Frontend design
Steers UI work away from template defaults toward a deliberate visual direction, with a plan, review and self-critique loop before and after building.
shadcn/ui
Official shadcn/ui skill: adds, searches, fixes and styles components using the CLI and your components.json, with rules for forms, icons and composition.
DESIGN.md from Stitch (Google Labs)
Reads a Google Stitch project through the Stitch MCP server and writes a DESIGN.md that describes its colours, type, shapes and layout in plain words.