anthropics/skills

web-artifacts-builder

把多组件 React 原型打包成可分享的单个 HTML

  • SKILL.md 已保存
  • 中文用法已整理
  • 安装与运行未实测
先判断是否解决你的问题

web-artifacts-builder 是什么?

web-artifacts-builder 用 React、TypeScript、Tailwind CSS 和 shadcn/ui 制作较复杂的 Claude HTML 工件,再把代码和依赖打包到单个 bundle.html。它适合有状态、多个组件或路由的交互原型。

中文说明由本站依据来源整理;英文原文保留在页面下方。

适合用在

  • 需要筛选、状态切换或多个界面的交互演示,且希望以一个HTML文件交付。

这些情况不适合

  • 只有简单静态内容的单文件HTML/JSX;来源明确说不必为这类任务使用完整工具链。
按客户端选择安装入口

怎么接入你的 Agent?

  1. 定位完整 Skill 目录

    打开本项目来源,核对 SKILL.md 及其引用的脚本和资料。

  2. 交给你正在用的 Agent

    在下面选择客户端,展开并复制安装指令,让 Agent 读取来源后选择安装方式。

  3. 确认识别,再做具体任务

    让 Agent 回报安装目录和识别到的名称 web-artifacts-builder,然后按本页使用示例提供材料。

展开并复制给 Codex 的安装指令
发送给 Codex

安装并检查 web-artifacts-builder

请在 Codex 的当前工作环境中安装并检查 web-artifacts-builder 这个 Skill。

项目身份:anthropics/skills / web-artifacts-builder
来源:https://github.com/anthropics/skills/blob/e4bb5d960d87126ff3b3a8af1a104b7db67560ba/skills/web-artifacts-builder/SKILL.md
已定位的源文件:skills/web-artifacts-builder/SKILL.md

1. 先阅读真实 SKILL.md 和它引用的必要文件,确认触发条件、安装方式、依赖与权限;尊重源文件要求的审批步骤。
2. 按当前客户端支持的方式安装完整 Skill 目录,保留已有配置,不只复制一段提示词。涉及缺失凭证、目标目录或权限时先列出缺项并向我确认。
3. 安装后回读实际目录、Skill 名称和识别结果,说明哪些步骤已完成,哪些只是文档检查,不得把安装成功当作任务已经实测。
4. 如来源提供了可安全验证的示例,在我提供所需输入后做一个最小任务;创建、修改、删除、部署或发送内容前,按源文件和我的授权执行。
准备输入,再按步骤执行

装好以后,具体怎么用?

准备哪些材料

  • 需要可执行 Bash、Node.js 和安装 npm 依赖的环境;保留 Skill 附带的 scripts/init-artifact.sh 与 scripts/bundle-artifact.sh。项目根目录应有 index.html。

会得到什么

  • 单个 bundle.html,以及需要继续修改时可保留的项目源文件。

实际使用顺序

  1. 从 Skill 实际安装目录定位初始化脚本,按来源运行 bash scripts/init-artifact.sh <project-name>,再进入新项目。
  2. 修改生成的 React/TypeScript 文件,实现实际需要的组件和状态;模板带有 Tailwind、路径别名和 shadcn/ui 组件。
  3. 在项目目录按安装位置定位并运行打包脚本。来源说明该步骤安装 Parcel 等打包依赖,将 JS、CSS 与资源内联到 bundle.html。
  4. 交付生成的HTML文件;需要验证或遇到问题时,再通过可用浏览器工具检查交互与显示。
使用示例

从一个具体任务开始

本站根据源文件编写的使用示例,未在本站实际运行。示例中的文件由你提供。

安装并识别 Skill 后发送

复制一个具体任务

用 web-artifacts-builder 制作一个本地产品对比原型:三项产品A/B/C,各有价格、适用人数和是否支持导出三个字段;提供“仅看支持导出”的筛选和重置按钮。不接外部API。保留项目源码,并打包为 bundle.html 交付;如未实际测试浏览器交互,请明确说明。
预期结果

预期交付具有本地筛选状态的React工件及单文件HTML;打包失败或依赖缺失应列出实际错误。本站未执行本例。

使用前先看这些限制

使用条件与边界

  • 这是 Claude HTML 工件的构建流程,来源没有把生成 bundle.html 等同于已经部署到公网。
  • 打包会安装额外依赖;生成脚本和应用目录各有位置,不能假设 scripts 位于当前项目。
针对这个 Skill 的疑问

常见问题

最终需要把 node_modules 一起发给别人吗?

来源的交付物是内联代码和依赖的 bundle.html;如果对方需要继续开发,再另行提供项目源文件。

打包成功就代表交互没有问题吗?

不代表。来源把浏览器检查列为可选后续步骤,打包结果与交互验证应分别说明。

需要核对时再展开原文

来源原文与资料状态

源文件
已保存 SKILL.md,抓取于 2026-11-17T10:48:39.922Z
中文使用说明
已针对下方源文件版本整理用途、用法和常见问题
安装与任务测试
本站未执行安装或任务测试
来源复核
本页中文用法已对照保存版本的完整 SKILL.md 阅读整理
展开 SKILL.md 原文、章节与历史收录资料

skills/web-artifacts-builder/SKILL.md · 抓取时间 2026-11-17T10:48:39.922Z

以下保留源文件的 description、章节及摘录,供核对中文说明;完整文件通过上方链接打开。

抓取成功不代表已完成安装或任务测试。

来源 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.

查看源文件章节 / Source sections
  • 原文:Web Artifacts Builder
  • 原文: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
  • 原文:Step 5: Testing/Visualizing the Artifact (Optional)
  • 参考 / Reference
原文: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.

原文: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**: - 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.

文件 SHA256:81c5002c6643b0de7b8710b00e7a9038daa6fb9b68d59870ee6adb12da8d10f8

仓库许可证记录:未提供;skill-declaration-captured-not-interpreted,查看来源。

Skills.sh收录简介 · 2026-07-28

Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…

查看历史简介来源

这份历史简介在采集时已截断;完整用途和触发条件需打开来源核对。

历史收录数据

Skill标识web-artifacts-builder
来源仓库anthropics/skills
榜单快照2026-07-28
榜单口径Skills.sh累计安装量
快照名次245
快照累计安装量85714

历史资料说明

  • 所保留的来源简介在采集时已截断;完整触发条件、依赖及排除项须阅读源文件,本站不补写缺失部分。
  • 安装量用于说明当时的收录次序,不是效果、可信度或当前可用性的证明。

此页用于识别项目与来源。安装入口可在该Skill的Skills.sh页面查看;当前目录是否仍存在、附带脚本和账户依赖尚需按具体版本确认。

返回 Skills 目录,按任务继续筛选 · MCP与Skills教程与资源