Web Artifacts Builder logo

Web Artifacts Builder

Community
LeastBit
web-artifacts-builder

用于使用现代前端 Web 技术(React、Tailwind CSS、shadcn/ui)创建复杂的、多组件的 claude.ai HTML artifact 的工具套件。适用于需要状态管理、路由或 shadcn/ui 组件的复杂 artifact - 不适用于简单的单文件 HTML/JSX artifact。

Overview

PublisherLeastBit
RepositoryClaude_skills_zh-CN
Skill nameweb-artifacts-builder
Stars
590
Forks
95
Bundled files
3
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by LeastBit on GitHub. Read the source before you install it.

Installation

Install the Web Artifacts Builder AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/LeastBit/Claude_skills_zh-CN/tree/main/skills/web-artifacts-builder
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/LeastBit/Claude_skills_zh-CN.git /tmp/Claude_skills_zh-CN
mkdir -p .claude/skills
cp -r /tmp/Claude_skills_zh-CN/skills/web-artifacts-builder .claude/skills/web-artifacts-builder
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Web Artifacts Builder in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Web Artifacts Builder on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Web Artifacts Builder is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Web Artifacts 生成器 (Web Artifacts Builder)

要构建强大的前端 claude.ai artifact,请遵循以下步骤:

  1. 使用 scripts/init-artifact.sh 初始化前端仓库
  2. 通过编辑生成的代码来开发你的 artifact
  3. 使用 scripts/bundle-artifact.sh 将所有代码打包成单个 HTML 文件
  4. 向用户展示 artifact
  5. (可选) 测试 artifact

技术栈: React 18 + TypeScript + Vite + Parcel (打包) + Tailwind CSS + shadcn/ui

设计与风格指南

非常重要:为了避免通常被称为“AI 废话 (AI slop)”的设计,请避免过度使用居中布局、紫色渐变、统一的圆角和 Inter 字体。

快速上手

第 1 步:初始化项目

运行初始化脚本以创建一个新的 React 项目:

bash
bash scripts/init-artifact.sh <项目名称>
cd <项目名称>

这将创建一个配置齐全的项目,包含:

  • ✅ React + TypeScript (通过 Vite)
  • ✅ 带有 shadcn/ui 主题系统的 Tailwind CSS 3.4.1
  • ✅ 已配置路径别名 (@/)
  • ✅ 预装了 40 多个 shadcn/ui 组件
  • ✅ 包含所有 Radix UI 依赖项
  • ✅ 配置了 Parcel 用于打包 (通过 .parcelrc)
  • ✅ Node 18+ 兼容性 (自动检测并固定 Vite 版本)

第 2 步:开发你的 Artifact

要构建 artifact,请编辑生成的文件。请参阅下面的常见开发任务获取指导。

第 3 步:打包为单个 HTML 文件

要将 React 应用打包成单个 HTML artifact:

bash
bash scripts/bundle-artifact.sh

这将创建 bundle.html —— 一个包含所有内联 JavaScript、CSS 和依赖项的自包含 artifact。此文件可以直接作为 artifact 在 Claude 对话中分享。

要求: 你的项目根目录下必须有一个 index.html。

脚本作用:

  • 安装打包依赖项 (parcel, @parcel/config-default, parcel-resolver-tspaths, html-inline)
  • 创建支持路径别名的 .parcelrc 配置
  • 使用 Parcel 构建 (不包含 source maps)
  • 使用 html-inline 将所有资产内联到单个 HTML 中

第 4 步:与用户分享 Artifact

最后,在对话中与用户分享打包好的 HTML 文件,以便他们将其作为 artifact 查看。

第 5 步:测试/预览 Artifact (可选)

注意:这是一个完全可选的步骤。仅在必要或有要求时执行。

要测试/预览 artifact,请使用可用工具(包括其他 Skill 或内置工具如 Playwright 或 Puppeteer)。通常情况下,避免预先测试 artifact,因为这会增加请求与看到成品 artifact 之间的延迟。如果用户要求或出现问题,请在展示 artifact 后再进行测试。

参考资料

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Web Artifacts Builder AI skill do?

用于使用现代前端 Web 技术(React、Tailwind CSS、shadcn/ui)创建复杂的、多组件的 claude.ai HTML artifact 的工具套件。适用于需要状态管理、路由或 shadcn/ui 组件的复杂 artifact - 不适用于简单的单文件 HTML/JSX artifact。

Why use Web Artifacts Builder on TypingMind?

Because you install it once and use it with any model. Web Artifacts Builder is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Web Artifacts Builder in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/LeastBit/Claude_skills_zh-CN/tree/main/skills/web-artifacts-builder. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Web Artifacts Builder?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Web Artifacts Builder?

As many as you like. As long as a model supports skills, you can use Web Artifacts Builder with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Web Artifacts Builder AI skill free?

It is published on GitHub by LeastBit. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇