Agent skill
这个 skill 让编程 agent 先读取实时注册表,选出最接近的 items[].name 安装名,查看条目内容,再用 shadcn-vue 安装,并基于生成的源码组合界面。希望 agent 选用现成的 beui-vue 组件、而不是自己发明动效控件时,就用它。
npx skills add stickerwu/beui-vue --skill beui-vue
MCP 服务
最快的方式:连接 beui-vue 的 MCP 服务,agent 就能直接列出、搜索和安装组件。服务地址是 https://beui.stickerwu.net/mcp。
# Claude Code
claude mcp add --transport http beui-vue https:
# Codex
codex mcp add beui-vue --url https:
# Amp
amp mcp add beui-vue https:
其他客户端:手动加入 MCP 配置。
{
"mcpServers": {
"beui-vue": {
"type": "http",
"url": "https://beui.stickerwu.net/mcp"
}
}
}
工具:list_components、search_components、get_component、get_install_command。服务读取实时注册表,新增组件不需要重新部署就能查到。
端点
/llms.txtllms.txt
llmstxt.org 格式的 Markdown 索引。
打开 /r/index.json注册表索引
所有可安装组件的 JSON 目录。
打开 /r/{slug}.jsonshadcn-vue 条目
安装条目,包含每个文件的内容、npm 依赖和用法说明。
Agent 流程
两次请求,然后安装。每个条目都带着它需要的全部文件。
const index = await fetch('https://beui.stickerwu.net/r/index.json').then((r) => r.json());
const item = await fetch(`https://beui.stickerwu.net/r/${slug}.json`).then((r) => r.json());
for (const file of item.files) {
await writeFile(`src/${file.target}`, file.content);
}
await runShell(['npm', 'install', ...item.dependencies]);
shadcn-vue 流程
shadcn-vue 条目会安装源码文件和依赖包。@beui-vue 已收录进 shadcn-vue 的注册表目录,项目里有 components.json 就能直接用短名称。
# Registry namespace (shadcn-vue directory)
npx shadcn-vue@latest add @beui-vue/animated-toast-stack
# Direct URL, no namespace needed
npx shadcn-vue@latest add https:
条目结构
共享的辅助文件(例如 core/motion.ts 和共享的 styles.css)作为额外文件随条目一起提供,docs 字段说明该导入哪个文件。
{
"name": "button-base",
"type": "registry:item",
"title": "Button",
"description": "Spring-pressed Button plus StatefulButton, MagneticButton, and MetallicButton variants.",
"categories": ["motion"],
"dependencies": ["@vueuse/core@^14.0.0", "[email protected]"],
"files": [
{ "path": "components/beui/ButtonBase.vue", "type": "registry:file", "content": "..." },
{ "path": "components/beui/core/motion.ts", "type": "registry:file", "content": "..." },
{ "path": "components/beui/styles.css", "type": "registry:file", "content": "..." }
],
"meta": { "page": "https://beui.stickerwu.net/components/motion/button/button-base" },
"docs": "Use it with: import ButtonBase from '@/components/beui/ButtonBase.vue'"
}