web-artifacts-builder
- 作者仓库星标 0
- 许可证 Complete terms in LICENSE.txt
- 作者更新于 2026年8月22日 01:10
- 作者仓库 skills
Web Artifacts Builder
To build powerful frontend claude.ai artifacts, follow these steps:
- Initialize the frontend repo using
scripts/init-artifact.sh - Develop your artifact by editing the generated code
- Bundle all code into a single HTML file using
scripts/bundle-artifact.sh - Display artifact to user
- (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 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 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
.parcelrcconfig 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/components
- 流狐分类
- 通用
- 作者声明 Agent
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 94 / 100 · 启发式扫描,不代表运行安全
- 作者 / 版本 / 许可
- @anthropics · Complete terms in LICENSE.txt
- 流狐 Token 估算
- 低消耗
- 流狐接入估算
- 即装即用
- 是否需要外部 API Key
- 未发现要求
- 检测到的系统要求
- macOS · Linux · Windows
- 底层运行要求
- Node.js
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 检测到的网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
作者没有在当前 SKILL.md 中定义固定输出样例。 Quick Start
Run the initialization script to create a new React project: This creates a fully configured project with: ✅ React + TypeScript (via Vite)
To build the artifact, edit the generated files. See Common Development Tasks below for guidance.
To bundle the React app into a single HTML artifact: 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.
Finally, share the bundled HTML file in conversation with the user so they can view it as an artifact.
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…
# 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**:
… 作者原文负责流程事实;流狐只索引当前章节、要点、文件与命令。
章节 -> Design & Style Guidelines → Quick Start → Step 1: Initialize Project → Step 2: Develop Your Artifact → Step 3: Bundle to Single HTML File → Step 4: Share Artifact with User
要点 -> Stack · Common Development Tasks · Requirements · What the script does · shadcn/ui components
文件/命令 -> scripts/init-artifact.sh · scripts/bundle-artifact.sh · bundle.html · index.html · .parcelrc
内容 SHA-256 -> 89f8b412c2cd
web-artifacts-builder 是给 claude.ai artifact 造单文件 HTML React app 的脚手架:React 18 + TypeScript + Vite + Parcel 打包 + Tailwind CSS + shadcn/ui,最终通过
bundle-artifact.sh把所有 JS / CSS / 依赖内联到一个bundle.html里,可以直接当 artifact 分享。设计思路
作者的目标:让你「写 React 代码 + 一键导出单 HTML」,省去 Claude artifact 单文件、不能引外部 CDN 的纠结。脚手架默认装好 40+ shadcn/ui 组件、Radix UI 全套依赖、
@/path alias、Vite + Parcel + html-inline 全链路,Node 18+ 自动检测并 pin Vite 版本。设计与样式守则(重要)
作者特别点出反「AI slop」:少用过度居中布局、紫色渐变、统一圆角、Inter 字体——这些是一眼能认出 AI 模板的视觉特征,要刻意避开。
工作流
Step 1 Initialize:
bash scripts/init-artifact.sh <project-name>建仓 →cd <project-name>;自动装好 React + TS(via Vite)/ Tailwind 3.4.1 + shadcn/ui theme /@/alias / 40+ shadcn 组件 / 全套 Radix UI / Parcel + .parcelrc / Node 18+ pin。Step 2 Develop:编辑生成的代码,对照 "Common Development Tasks"。Step 3 Bundle:bash scripts/bundle-artifact.sh跑出bundle.html——单文件 self-contained。要求项目根有index.html。脚本内做的事:装parcel/@parcel/config-default/parcel-resolver-tspaths/html-inline;写 .parcelrc 含 alias;Parcel 构建无 source map;用 html-inline 把 asset 全内联。Step 4 Share 把bundle.html当 artifact 给用户。Step 5 Test/Visualize(可选):用 Playwright / Puppeteer / 其他 skill 跑一下。适合的场景
不适合
配套
theme-factory(统一视觉主题)、prototype(更通用的 prototype 脚手架)、webapp-testing(Playwright 跑通 artifact 验证)、pdf/make-pdf(同样面向「成品 artifact」的另一类)。