Skills/web-artifacts-builder-v2/SKILL.md
Suite of tools for creating elaborate, multi-component claude.ai HTML artefacts using modern frontend web technologies (React 19, Tailwind CSS v4, shadcn/ui). Use for complex artefacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artefacts.
npx skillsauth add sammcj/agentic-coding web-artifacts-builder-v2Install this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
To build a frontend claude.ai artefact, follow these steps:
scripts/init-artifact.shresources/themes.css and apply it (see "Themes" below)scripts/bundle-artifact.shStack: React 19 + TypeScript + Vite 8 + Tailwind CSS v4 + shadcn/ui (new-york style) + lucide-react. Bundling via vite-plugin-singlefile. Requires Node 20.19+ or 22.12+.
These principles are adapted from the html-design-examples skill. Load that skill alongside this one when you need patterns for specific artefact intents (status report, code review, PR write-up, design system page, editor, etc.); its rendered catalogue at resources/index.html indexes 20 single-file references.
18-editor-triage-board.html example in html-design-examples for the pattern.Use visual accents (coloured border stripes, tinted-background callout boxes, accent bars on cards) only when the colour or treatment encodes specific information - status, category, severity, or priority that I've explicitly defined. Don't apply visual accents decoratively, don't rotate through palette colours across sibling items for variety, and don't reach for the tinted-callout-with-coloured-bar pattern as a default way to mark asides. If you're about to add an accent, ask whether removing it would lose information; if not, remove it and rely on plain typographic hierarchy instead.
Other things to avoid because they read as AI-default output: excessive centred layouts, purple gradients, uniformly rounded corners on everything, glassmorphism, emoji bullets, and three-card-grid hero sections with identical icons.
resources/themes.css ships five named themes. Pick one before you start writing components - retrofitting a palette is much more work than choosing one up front.
| Theme | Mood | Good for | |-------|------|----------| | Editorial paper | Warm paper, ink, ochre accent | Longform writeups, plans, reports, post-mortems | | Technical mono | Near-monochrome, single green accent | Code reviews, system diagrams, status pages, debugging | | Warm desaturated | Sand, clay-brown, muted terracotta | Brand-adjacent artefacts, design pages, anything that wants warmth without volume | | Cool muted | Quiet slate, low-chroma teal | Dashboards, status reports, technical docs | | Nordic dark | Polar-night greys, frost-blue | Incident write-ups, debug dumps, dark-mode-first developer tooling |
To apply a theme:
resources/themes.css and copy the :root { ... } and .dark { ... } blocks for the chosen theme.:root and .dark blocks in your project's src/index.css. Leave the @theme inline and @layer base blocks alone - they wire the variables into Tailwind utilities.<link rel="stylesheet"> tag in index.html from Google Fonts, or by setting body { font-family: ... } in src/index.css.If the user has an existing brand or design system, defer to it rather than picking from the gallery.
bash scripts/init-artifact.sh <project-name>
cd <project-name>
This creates a configured project with:
src/index.css, no tailwind.config.js)src/components/ui/radix-ui umbrella package and lucide-react@/ configured in both tsconfig.json and vite.config.tsApp.tsx placeholder ready for you to editSee "Themes" above.
Edit src/App.tsx and add components as needed. Components are imported from @/components/ui/<name>. The cn() helper lives at @/lib/utils.
To preview during development:
pnpm dev
bash scripts/bundle-artifact.sh
This produces bundle.html - a single self-contained file with all JS, CSS, and assets inlined. The script:
vite-plugin-singlefile as a dev dependencyvite.config.bundle.ts that extends your config with the single-file plugin and inlining optionsvite build --config vite.config.bundle.tsdist/index.html to bundle.htmlThe artefact requires nothing at runtime - hand it to the user directly.
Pass bundle.html back to the user as the artefact.
Only test before sharing if the user has asked, or if the artefact has interactive logic that you don't want to ship broken. Use Playwright or open the file locally. Otherwise prefer shipping fast and iterating on feedback.
html-design-examplestools
Provides tools for managing MarkEdit, a macOS markdown editor
tools
Provides knowledge on using the `glean` CLI tool to access company knowledge and documents through Glean. Use when the user asks you to use Glean to search, read or otherwise access knowledge from their company's Confluence, Slack, Google Drive Files (Slides, Documents, Sheets) etc.
development
Applies the Diataxis framework to create or improve technical documentation. Use when being asked to write high quality tutorials, how-to guides, reference docs, or explanations, when reviewing documentation quality, or when deciding what type of documentation to create. Helps identify documentation types using the action/cognition and acquisition/application dimensions.
development
Use when answering questions from this machine-learning knowledge base. Triggers: questions about transformers, attention cost and efficiency, and long-context scaling; 'what do we know about attention', 'check the ML wiki'. Read-only querying of compiled knowledge; to add, update, supersede, lint, audit, or critique, use the llm-wiki skill instead.