| name | 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. |
| trigger | when_needed |
| language | zh-TW |
| adapted_from | openskills/artifacts-builder |
| version | 1.0.0-antigravity |
| original_license | Complete terms in LICENSE.txt |
ARTIFACTS-BUILDER 處理指南
技能版本: v1.0 (Antigravity 適配版)
原始來源: openskills/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 for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.
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.
快速開始
Step 1: Initialize Project
Run the initialization script to create a new React project:
bash scripts/init-artifact.sh <project-name>
cd <project-name>
詳細內容請參閱:[example_1.txt](examples/example_1.txt)
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.
**需求**: 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
Finally, share the bundled HTML file in conversation with the user so they can view it as an artifact.
注意: 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.
- **shadcn/ui components**: https://ui.shadcn.com/docs/components
---
此技能已適配 Antigravity 系統:
- 遵循 `skills/_base/coding_style.md` 編碼規範
- 與 `skills/_base/architecture.md` 架構模式一致
- 符合 Constitution v3.1 語言規範 (繁體中文)
可搭配以下技能使用:
- `systematic-debugging` - 系統化除錯
- `verification-before-completion` - 完成前驗證