install

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

/install — Setup & Health Check

/install — 安装设置与健康检查

Verify your Claude Code Toolkit installation, diagnose issues, and get oriented.
验证你的Claude Code Toolkit安装情况、诊断问题并快速了解工具概况。

When to Use

使用场景

  • After cloning the repo and running
    install.sh
  • When something seems broken (hooks not firing, missing commands)
  • First time using the toolkit — to see what's available
  • After a
    git pull
    to verify nothing broke
  • 克隆仓库并运行
    install.sh
    之后
  • 工具出现异常时(钩子未触发、命令缺失等)
  • 首次使用工具时——了解可用功能
  • 执行
    git pull
    之后——验证工具是否正常运行

Instructions

操作步骤

Phase 1: DIAGNOSE

阶段1:诊断

Goal: Run deterministic health checks and report results.
Step 1: Run install-doctor.py
bash
python3 ~/.claude/scripts/install-doctor.py check
If the script is not found at
scripts/install-doctor.py
, try
~/.claude/scripts/install-doctor.py
.
Step 2: Interpret results
ResultAction
All checks passSkip to Phase 3 (Inventory)
~/.claude
missing
Guide user to run
install.sh
— go to Phase 2
Components missingGuide user to run
install.sh
— go to Phase 2
Hooks not configuredGuide user to run
install.sh
— go to Phase 2
Broken symlinksSymlink targets moved. Re-run
install.sh --symlink --force
Python deps missingRun
pip install -r requirements.txt
from the repo directory
Permissions wrongRun
chmod 755
on affected files
Step 3: Display results clearly
Show the check output to the user with a clear pass/fail summary. Use the raw script output — do not paraphrase or reformat excessively.
Gate: Health check complete. If issues found, proceed to Phase 2. If clean, skip to Phase 3.
目标:运行确定性健康检查并报告结果。
步骤1:运行install-doctor.py
bash
python3 ~/.claude/scripts/install-doctor.py check
如果未在
scripts/install-doctor.py
找到该脚本,尝试
~/.claude/scripts/install-doctor.py
步骤2:解读结果
结果操作
所有检查通过跳至阶段3(清单查看)
~/.claude
目录缺失
引导用户运行
install.sh
——进入阶段2
组件缺失引导用户运行
install.sh
——进入阶段2
钩子未配置引导用户运行
install.sh
——进入阶段2
符号链接损坏符号链接目标已移动。重新运行
install.sh --symlink --force
Python依赖缺失在仓库目录下运行
pip install -r requirements.txt
权限错误对受影响文件执行
chmod 755
步骤3:清晰展示结果
向用户展示检查输出,并提供清晰的通过/失败总结。直接使用脚本的原始输出——不要过度改写或重新格式化。
节点:健康检查完成。若发现问题,进入阶段2;若一切正常,跳至阶段3。

Phase 2: FIX (only if issues found)

阶段2:修复(仅当发现问题时)

Goal: Guide the user through fixing detected issues.
Important: This phase is interactive. Show the user what needs fixing and let them choose.
Step 1: Determine if install.sh needs to run
If
~/.claude
is missing or components are not installed, the user needs to run install.sh. Tell them:
The toolkit hasn't been installed yet. Run this from the repo directory:

  ./install.sh --symlink     # recommended: updates with git pull
  ./install.sh --dry-run     # preview first
Wait for the user to confirm they've run it, then re-run the health check.
Step 2: Fix individual issues
For fixable issues (permissions, missing deps), offer to fix them:
bash
undefined
目标:引导用户修复检测到的问题。
注意:此阶段为交互式操作。向用户展示需要修复的内容并让他们选择操作。
步骤1:判断是否需要运行install.sh
如果
~/.claude
目录缺失或组件未安装,用户需要运行install.sh。告知他们:
工具尚未完成安装。请在仓库目录下运行以下命令:

  ./install.sh --symlink     # 推荐:配合git pull更新工具
  ./install.sh --dry-run     # 先预览安装内容
等待用户确认已运行命令后,重新执行健康检查。
步骤2:修复单个问题
对于可修复的问题(权限错误、依赖缺失),提供修复命令:
bash
undefined

Fix permissions

修复权限

find ~/.claude/hooks -name ".py" -exec chmod 755 {} ; find ~/.claude/scripts -name ".py" -exec chmod 755 {} ;
find ~/.claude/hooks -name ".py" -exec chmod 755 {} ; find ~/.claude/scripts -name ".py" -exec chmod 755 {} ;

Install Python deps (from repo directory)

安装Python依赖(在仓库目录下执行)

pip install -r requirements.txt

Only run fixes the user approves.

**Step 3: Re-check**

After fixes, re-run:
```bash
python3 ~/.claude/scripts/install-doctor.py check
Gate: All checks pass. Proceed to Phase 3.
pip install -r requirements.txt

仅执行用户确认的修复操作。

**步骤3:重新检查**

修复完成后,重新运行:
```bash
python3 ~/.claude/scripts/install-doctor.py check
节点:所有检查通过。进入阶段3。

Phase 3: INVENTORY

阶段3:清单查看

Goal: Show the user what they have installed.
Step 1: Run inventory
bash
python3 ~/.claude/scripts/install-doctor.py inventory
Step 2: Display summary
Show the actual counts returned by
install-doctor.py inventory
— do not display hardcoded numbers. Present them as:
Your toolkit is ready. Here's what's installed:

  Agents:   [N] specialized domain experts
  Skills:   [N] workflow methodologies ([N] user-invocable)
  Hooks:    [N] automation hooks
  Commands: [N] slash commands
  Scripts:  [N] utility scripts
Gate: User sees their inventory. Proceed to Phase 3.5.
目标:向用户展示已安装的工具组件。
步骤1:运行清单命令
bash
python3 ~/.claude/scripts/install-doctor.py inventory
步骤2:展示汇总信息
显示
install-doctor.py inventory
返回的实际数量——不要使用硬编码数值。格式如下:
你的工具已准备就绪。已安装组件如下:

  Agents:   [N] 个专业领域专家Agent
  Skills:   [N] 个工作流方法(其中[N]个可由用户调用)
  Hooks:    [N] 个自动化钩子
  Commands: [N] 个斜杠命令
  Scripts:  [N] 个实用脚本
节点:用户查看完清单。进入阶段3.5。

Phase 3.5: MCP INVENTORY

阶段3.5:MCP清单查看

Goal: Show which MCP servers are available and their status.
Step 1: Run MCP registry check
bash
python3 ~/.claude/scripts/mcp-registry.py list
If the script is not found at
scripts/mcp-registry.py
, try
~/.claude/scripts/mcp-registry.py
.
Step 2: Display MCP status
Show the MCP inventory as:
MCP Servers:

  [✓] Chrome DevTools MCP  — Live browser debugging
      Paired skills: wordpress-live-validation
  [✓] Playwright MCP       — Automated browser testing
      Paired skills: wordpress-live-validation
  [✓] gopls MCP            — Go workspace intelligence
      Paired skills: go-code-review, go-testing, go-concurrency
  [✗] Context7 MCP         — Library documentation lookups
      Install: claude mcp add context7 -- npx @anthropic-ai/mcp-context7@latest
Use ✓ for connected MCPs and ✗ for missing ones. For missing MCPs, show the install command.
Gate: MCP inventory displayed. Proceed to Phase 4.
目标:展示可用的MCP服务器及其状态。
步骤1:运行MCP注册表检查
bash
python3 ~/.claude/scripts/mcp-registry.py list
如果未在
scripts/mcp-registry.py
找到该脚本,尝试
~/.claude/scripts/mcp-registry.py
步骤2:展示MCP状态
按以下格式展示MCP清单:
MCP服务器:

  [✓] Chrome DevTools MCP  — 实时浏览器调试
      关联Skill:wordpress-live-validation
  [✓] Playwright MCP       — 自动化浏览器测试
      关联Skill:wordpress-live-validation
  [✓] gopls MCP            — Go工作区智能分析
      关联Skill:go-code-review, go-testing, go-concurrency
  [✗] Context7 MCP         — 库文档查询
      安装命令:claude mcp add context7 -- npx @anthropic-ai/mcp-context7@latest
使用✓表示已连接的MCP,✗表示缺失的MCP。对于缺失的MCP,展示安装命令。
节点:MCP清单展示完成。进入阶段4。

Phase 4: ORIENT

阶段4:使用引导

Goal: Give the user their bearings — what to do first.
Step 1: Show the three essential commands
Getting started:

  /do [describe what you want]    — routes to the right agent + skill
  /comprehensive-review           — 20+ reviewer agents in 3 waves
  /install                        — run this again anytime to check health
Step 2: Show a few practical examples
Try these:

  /do debug this failing test
  /do review my Go code for quality
  /do write a blog post about [topic]
  /do create a voice profile from my writing samples
Step 3: Mention the docs
Documentation:
  docs/QUICKSTART.md   — 30-second overview
  docs/REFERENCE.md    — quick reference card
Gate: User is oriented. Installation complete.
目标:帮助用户快速上手——了解首次操作内容。
步骤1:展示三个核心命令
快速开始:

  /do [描述你的需求]    — 自动路由至对应的Agent + Skill
  /comprehensive-review           — 分3轮调用20+个评审Agent
  /install                        — 可随时重新运行以检查工具健康状态
步骤2:展示实用示例
尝试以下命令:

  /do debug this failing test
  /do review my Go code for quality
  /do write a blog post about [topic]
  /do create a voice profile from my writing samples
步骤3:提及文档位置
文档地址:
  docs/QUICKSTART.md   — 30秒快速概览
  docs/REFERENCE.md    — 速查手册
节点:用户完成引导。安装流程结束。

Error Handling

错误处理

Error: install-doctor.py not found

错误:install-doctor.py未找到

The script hasn't been installed yet. Check if the user is in the repo directory. If so, run it directly from
scripts/
. If not, guide them to clone and install first.
脚本尚未完成安装。检查用户是否处于仓库目录下。如果是,直接从
scripts/
目录运行脚本。如果不是,引导用户先克隆仓库并完成安装。

Error: Permission denied on install.sh

错误:install.sh权限不足

Run
chmod +x install.sh
first.
先运行
chmod +x install.sh

Error: Python not found

错误:Python未找到

The toolkit requires Python 3.10+. Guide the user to install Python for their platform.
工具要求Python 3.10及以上版本。引导用户为对应平台安装Python。