Artifacts Builder

作者: Anthropic

用于创建复杂、多组件claude.ai HTML工件的一套工具,采用现代前端Web技术(React、Tailwind CSS、shadcn/ui)。适用于需要状态管理、路由或shadcn/ui组件的复杂工件,而非简单的单文件HTML/JSX工件。 许可:完整条款见LICENSE.txt

npx skills add https://github.com/anthropics/skills --skill web-artifacts-builder

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 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 .parcelrc config 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

来自 Anthropic 的更多技能

Algorithmic Art
Anthropic
使用p5.js创建算法艺术,包含种子随机性和交互式参数探索。当用户请求使用代码创作艺术、生成艺术、算法艺术、流场或粒子系统时使用此功能。创作原创算法艺术,而非复制现有艺术家的作品以避免版权侵权。 许可:完整条款见LICENSE.txt
creative
Internal Comms
Anthropic
一套帮助我撰写各类内部沟通内容的资源,使用公司偏好的格式。每当需要撰写内部沟通内容(如状态报告、领导层更新、第三方更新、公司通讯、常见问题解答、事件报告、项目更新等)时,Claude应使用此技能。 许可证:完整条款见LICENSE.txt
Webapp Testing
Anthropic
使用Playwright与本地Web应用交互和测试的工具包。支持验证前端功能、调试UI行为、捕获浏览器截图以及查看浏览器日志。 许可:完整条款见LICENSE.txt
development
XLSX
Anthropic
全面的电子表格创建、编辑与分析,支持公式、格式化、数据分析及可视化。当Claude需要处理电子表格(.xlsx、.xlsm、.csv、.tsv等格式)时,可用于:(1)创建包含公式和格式的新电子表格,(2)读取或分析数据,(3)在保留公式的前提下修改现有电子表格,(4)在电子表格中进行数据分析与可视化,或(5)重新计算公式。 许可证:专有。LICENSE.txt包含完整条款。
document
Skill Creator
Anthropic
创建有效技能的指南。当用户想要创建新技能(或更新现有技能)以扩展Claude在专业知识、工作流程或工具集成方面的能力时,应使用此技能。 许可:完整条款见LICENSE.txt
Slack Gif Creator
Anthropic
用于创建针对Slack优化的动画GIF的工具包,包含大小限制验证器和可组合的动画原语。当用户提出类似“给我做一个X做Y的Slack GIF”的描述时,此技能将应用于生成动画GIF或表情动画。 许可证:完整条款见LICENSE.txt
creative
Theme Factory
Anthropic
用于为制品(如幻灯片、文档、报告、HTML落地页等)应用主题样式的工具包。内置10套预设主题(含配色/字体),可应用于已创建的任意制品,或即时生成全新主题。 许可协议:完整条款见LICENSE.txt
creative
Brand Guidelines
Anthropic
将Anthropic官方品牌色彩与字体应用于任何需要体现Anthropic视觉风格的制品中。当涉及品牌色彩、样式指南、视觉格式或公司设计标准时使用此技能。 许可:完整条款见LICENSE.txt
creative