用于使用现代前端 Web 技术(React、Tailwind CSS、shadcn/ui)创建复杂的、多组件的 claude.ai HTML artifact 的工具套件。适用于需要状态管理、路由或 shadcn/ui 组件的复杂 artifact - 不适用于简单的单文件 HTML/JSX artifact。
npx skills add https://github.com/LeastBit/Claude_skills_zh-CN --skill web-artifacts-builder
要构建强大的前端 claude.ai artifact,请遵循以下步骤:
scripts/init-artifact.sh 初始化前端仓库scripts/bundle-artifact.sh 将所有代码打包成单个 HTML 文件技术栈: React 18 + TypeScript + Vite + Parcel (打包) + Tailwind CSS + shadcn/ui
非常重要:为了避免通常被称为“AI 废话 (AI slop)”的设计,请避免过度使用居中布局、紫色渐变、统一的圆角和 Inter 字体。
运行初始化脚本以创建一个新的 React 项目:
bash scripts/init-artifact.sh <项目名称>
cd <项目名称>
这将创建一个配置齐全的项目,包含:
@/)要构建 artifact,请编辑生成的文件。请参阅下面的常见开发任务获取指导。
要将 React 应用打包成单个 HTML artifact:
bash scripts/bundle-artifact.sh
这将创建 bundle.html —— 一个包含所有内联 JavaScript、CSS 和依赖项的自包含 artifact。此文件可以直接作为 artifact 在 Claude 对话中分享。
要求: 你的项目根目录下必须有一个 index.html。
脚本作用:
.parcelrc 配置最后,在对话中与用户分享打包好的 HTML 文件,以便他们将其作为 artifact 查看。
注意:这是一个完全可选的步骤。仅在必要或有要求时执行。
要测试/预览 artifact,请使用可用工具(包括其他 Skill 或内置工具如 Playwright 或 Puppeteer)。通常情况下,避免预先测试 artifact,因为这会增加请求与看到成品 artifact 之间的延迟。如果用户要求或出现问题,请在展示 artifact 后再进行测试。
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.
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 colors or style guidelines, visual formatting, or company design standards apply.
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.
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.
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.
Set up Tailwind CSS v4 in Expo with react-native-css and NativeWind v5 for universal styling
Use Expo DOM components to run web code in a webview on native and as-is on web. Migrate web code to native incrementally.
Take leastbit/web-artifacts-builder from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.