关于 doctor
用于开发项目冷启动检查的技能,可在征得用户同意后修复问题。它会盘点工具和项目文件、执行冒烟测试,并列出可用命令与技能。
主要功能
- 01检查已安装工具和项目文件
- 02报告缺失依赖与目录
- 03经用户同意后提供修复
- 04运行冒烟测试
- 05列出可用命令和技能
适用场景
- 01冷启动后检查项目是否就绪
- 02开发前查找缺失工具
- 03经同意安装所选依赖
- 04验证生成幻灯片的工作流
MCP 相关
检查 Chrome DevTools MCP 是否已连接,并在缺失时提供通过 Claude Code 添加它的命令。安装生效需要重启。
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ bluzir/ claude-code-design --skill doctor安装后在 Claude Code 中输入/doctor确认已加载。
详细介绍
Doctor
冷启动健康检查 + 可选自动安装。可安全地多次运行。
阶段 1 — 清点
尽可能并行运行:
Bash(claude mcp list)— 解析输出,查找chrome-devtools: ✓ ConnectedBash(which monolith)— 检查是否存在Bash(which node)— 必需Bash(which gh)— 用于/ingest-githubBash(test -f package.json && echo yes || echo no)Bash(test -d starters && echo yes || echo no)— 预期为 yesBash(test -d artifacts && echo yes || echo no)Bash(test -d .claude/skills && echo yes || echo no)— 预期为 yes
阶段 2 — 报告
打印结构化报告:
Chrome DevTools MCP: ✓ / ✗ (if ✗, show install command)
monolith CLI: ✓ / ✗ (optional; needed for /export-standalone)
Node: ✓ / ✗ (required)
gh CLI: ✓ / ✗ (needed for /ingest-github)
package.json: exists / missing
starters/ dir: exists / missing
artifacts/ dir: will create
.claude/skills/: N skills found
FIGMA_TOKEN env: set / not set (only needed for /ingest-figma)
阶段 3 — 修复(需征得用户同意)
对于每个缺失项,使用 AskUserQuestion 询问用户:“现在安装 X 吗?”(yes/skip/all)。
修复命令(仅在用户选择 yes 时运行):
- Chrome DevTools MCP:
Bash(claude mcp add chrome-devtools -s user -- npx chrome-devtools-mcp@latest)— 注意:需要重启 Claude Code 才能生效 - monolith:
Bash(brew install monolith)(macOS);Linux 用户请自行安装 - pptxgenjs + puppeteer:
Bash(test -f package.json || npm init -y) Bash(npm install -D pptxgenjs puppeteer) - artifacts/ 目录:
Bash(mkdir -p artifacts assets/thumbs test)
阶段 4 — 冒烟测试
如果所有项目均正常(且用户没有刚刚运行安装,即需要重启):
- 写入
test/smoke-deck.html:<!doctype html> <html><head><meta charset="utf-8"/><title>Smoke</title> <script src="../starters/deck_stage.js"></script></head> <body><deck-stage width="1920" height="1080"> <section style="padding:60px;font:48px/1.2 Georgia"><h1>One</h1></section> <section style="padding:60px;font:48px/1.2 Georgia;background:#f4e4d7"><h1>Two</h1></section> <section style="padding:60px;font:48px/1.2 Georgia;background:#4a5d2e;color:#fff"><h1>Three</h1></section> </deck-stage></body></html> - 运行
/done test/smoke-deck.html - 如果 Chrome DevTools MCP 已连接 — 检查截图
.claude/last-preview.png是否存在,并确认控制台无错误 - 报告通过/失败
阶段 5 — 提示单
打印单行提示:
Available commands & skills:
/make-deck <brief> — build a slide deck
/interactive-prototype <brief> — clickable React prototype
/wireframe <thing> — low-fi variants
/create-design-system <src> — extract style guide
/ingest-github <url> — pull tokens from repo
/ingest-screenshot <path> — extract tokens from image
/ingest-figma <url> — pull from Figma (needs FIGMA_TOKEN)
/make-tweakable <html> — add live tweak panel
/apply-tweaks <html> — persist panel changes
/register-asset <html> — add to assets.html overview
/verify-artifact <html> — vision-based QA
/export-pdf /export-pptx /export-standalone /handoff
/preview /done /screenshot — operational atomics
评论
支持 Markdown