web-artifacts-builder
БесплатноЗапускает вложенные скриптыНе проверенBuild elaborate, multi-component web artifacts using React 18 + TypeScript + Tailwind CSS + shadcn/ui. Produces a single self-contained HTML file with all…
от oimiragieo★ 48 звёзд на GitHubОб этом скилле
Web Artifacts Builder
"Build powerful, multi-component web artifacts deployable directly in Claude conversations."
Overview
This skill enables building elaborate React applications that bundle into a single self-contained HTML file. The output is deployable as a Claude artifact or shared as a standalone file with all JavaScript, CSS, and dependencies inlined.
Stack: React 18 + TypeScript + Vite + Parcel (bundling) + Tailwind CSS 3.4.1 + shadcn/ui
When to Invoke
Use this skill when:
- Building an interactive tool, calculator, dashboard, or form
- The artifact needs React state management (not a static page)
- The artifact uses shadcn/ui components (buttons, dialogs, tables, etc.)
- Multiple components with routing or complex interactions
- User says "build me an artifact" or "create a React app"
Do NOT use for simple single-file HTML artifacts — just write the HTML directly.
Five-Step Workflow
Step 1: Initialize Project
bash scripts/init-artifact.sh <project-name>
cd <project-name>
The scripts/init-artifact.sh script creates a fully configured project:
- React 18 + TypeScript (via Vite)
- Tailwind CSS 3.4.1 with shadcn/ui theming
- Path aliases (
@/) configured - 40+ shadcn/ui components pre-installed
- All Radix UI dependencies included
- Parcel configured for bundling via
.parcelrc - Node 18+ compatibility (auto-pins Vite version)
After init, project structure:
<project-name>/
├── src/
│ ├── App.tsx # Main application component
│ ├── main.tsx # Entry point
│ └── components/ # Your components here
├── index.html # Entry HTML (required for bundling)
├── package.json
├── tailwind.config.js
└── tsconfig.json
Step 2: Develop the Artifact
Edit the generated files. Key patterns:
Using shadcn/ui Components
All 40+ components are pre-installed. Import directly:
import { Button } from '@/components/ui/button';
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
import { Input } from '@/components/ui/input';
import { Badge } from '@/components/ui/badge';
import {
Dialog,
DialogContent,
DialogHeader,
DialogTitle,
DialogTrigger,
} from '@/components/ui/dialog';
export function MyArtifact() {
return (
<Card>
<CardHeader>
<CardTitle>My Tool</CardTitle>
</CardHeader>
<CardContent>
<Input placeholder="Enter value..." />
<Button className="mt-2">Submit</Button>
</CardContent>
</Card>
);
}
State Management Pattern
import { useState } from 'react';
interface AppState {
items: string[];
input: string;
loading: boolean;
}
export function App() {
const [state, setState] = useState<AppState>({
items: [],
input: '',
loading: false,
});
const addItem = () => {
if (!state.input.trim()) return;
setState(prev => ({
...prev,
items: [...prev.items, prev.input],
input: '',
}));
};
return <div className="min-h-screen bg-background p-8">{/* ... */}</div>;
}
Available shadcn/ui Components
accordion, alert, alert-dialog, aspect-ratio, avatar,
badge, breadcrumb, button, calendar, card, carousel,
chart, checkbox, collapsible, command, context-menu,
dialog, drawer, dropdown-menu, form, hover-card,
input, input-otp, label, menubar, navigation-menu,
pagination, popover, progress, radio-group, resizable,
scroll-area, select, separator, sheet, sidebar,
skeleton, slider, sonner, switch, table, tabs,
textarea, toast, toggle, toggle-group, tooltip
Design Guidelines
Avoid AI slop patterns:
- No
font-family: Interorfont-sansas primary (use a distinctive font) - No purple gradient headers
- No centered-everything layout
- No uniform
rounded-lgon every element
Use intentional design:
// Good: distinctive typography + intentional colors
<h1 className="text-4xl font-black tracking-tight text-slate-900">
Tool Title
</h1>
// Good: purposeful layout with breathing room
<div className="grid grid-cols-[300px_1fr] gap-8 min-h-screen">
<aside className="border-r border-slate-200 p-6">...</aside>
<main className="p-8">...</main>
</div>
Step 3: Bundle to Single HTML File
bash scripts/bundle-artifact.sh
Requirements: index.html must exist in the project root.
What the script does:
- Installs bundling dependencies (parcel, @parcel/config-default, parcel-resolver-tspaths, html-inline)
- Creates
.parcelrcconfig with path alias support - Builds with Parcel (no source maps, optimized)
- Inlines all assets (JS, CSS, fonts, images) into
bundle.html
Output: bundle.html — a single self-contained file, shareable as a Claude artifact.
Step 4: Share Artifact
Display bundle.html in the Claude conversation. The artifact renders directly in the conversation interface.
For file system access, the artifact is at:
<project-name>/bundle.html
Step 5: Test (Opt
Установить web-artifacts-builder в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadWriteEditBashGlobGrepВложенные файлы
FAQ
Что делает скилл web-artifacts-builder?
Build elaborate, multi-component web artifacts using React 18 + TypeScript + Tailwind CSS + shadcn/ui. Produces a single self-contained HTML file with all assets inlined. Use for complex artifacts requiring state management, routing, or shadcn/ui components. NOT for simple single-file HTML/JSX.
Как установить скилл web-artifacts-builder?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл web-artifacts-builder запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic