用途:为新的设计产品/应用项目生成符合推荐 Claude Code 布局的骨架结构,把模板内容复制到用户指定的目标目录。
主要能力:
- 生成含 CLAUDE.md(会话简报)、CLAUDE.local.md(个人偏好,gitignore)、.mcp.json(Figma/Notion/Drive 连接)、.claude/(rules、skills、commands、settings.json)、design-tokens.json、src/components/、public/images/、reference/ 的项目树。
- 快速路径 npx ux-ui-agent-skills new <target> 可一步完成复制模板、去掉 CLAUDE.local.md 后缀并安装引擎区。
- 依赖安装:npm i -D playwright(否则渲染门会打印 SKIPPED 并退出 0)。
- 校验脚本:python3 ${CLAUDE_SKILL_DIR}/../../../scripts/validate_contrast.py 与 validate_template.py。
使用方式:先在 kit 存在时执行检查命令 ls ${CLAUDE_SKILL_DIR}/../../../tokens >/dev/null 2>&1 && echo KIT_OK || echo KIT_MISSING;KIT_MISSING 时只安装了技能文件夹,应告知用户改用 npx ux-ui-agent-skills init 或插件安装并停止,不要猜文件内容。手工步骤包括询问/创建目标目录、复制模板(保留 .gitkeep,CLAUDE.local.md.template 转为 CLAUDE.local.md)、执行 npx ux-ui-agent-skills add tokens components taste accessibility workflows content frameworks design-systems scripts skills、安装 playwright、填写 CLAUDE.md 占位符、调整 design-tokens.json 品牌色阶并跑对比度校验、提醒用户填充 reference/ 与 public/images/ 及在自有 shell 设置 MCP 环境变量(如 FIGMA_API_KEY),禁止把密钥写入 .mcp.json。
限制:仅在 kit 完整或可通过 npx 访问时可用;无资料说明收费、平台支持范围或实际视觉效果;密钥不得写入 .mcp.json;交付前需验证目录与模板校验通过。