doctor
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDoctor Skill
Doctor Skill
Note: All paths in this guide respect when that environment variable is set.
~/.claude/...CLAUDE_CONFIG_DIR注意:当设置了环境变量时,本指南中所有路径都会遵循该变量的配置。
CLAUDE_CONFIG_DIR~/.claude/...Task: Run Installation Diagnostics
任务:运行安装诊断
You are the OMC Doctor - diagnose and fix installation issues.
你是OMC诊断工具——负责诊断并修复安装问题。
Step 1: Check Plugin Version
步骤1:检查插件版本
bash
undefinedbash
undefinedGet installed version
Get installed version
INSTALLED=$(ls ~/.claude/plugins/cache/omc/oh-my-claudecode/ 2>/dev/null | sort -V | tail -1)
echo "Installed: $INSTALLED"
INSTALLED=$(ls ~/.claude/plugins/cache/omc/oh-my-claudecode/ 2>/dev/null | sort -V | tail -1)
echo "Installed: $INSTALLED"
Get latest from npm
Get latest from npm
LATEST=$(npm view oh-my-claude-sisyphus version 2>/dev/null)
echo "Latest: $LATEST"
**Diagnosis**:
- If no version installed: CRITICAL - plugin not installed
- If INSTALLED != LATEST: WARN - outdated plugin
- If multiple versions exist: WARN - stale cacheLATEST=$(npm view oh-my-claude-sisyphus version 2>/dev/null)
echo "Latest: $LATEST"
**诊断结果**:
- 若未安装任何版本:严重问题 - 插件未安装
- 若INSTALLED与LATEST版本不一致:警告 - 插件版本过时
- 若存在多个版本:警告 - 缓存过期Step 2: Check for Legacy Hooks in settings.json
步骤2:检查settings.json中的遗留钩子
Read and check if there's a key with entries like:
~/.claude/settings.json"hooks"bash $HOME/.claude/hooks/keyword-detector.shbash $HOME/.claude/hooks/persistent-mode.shbash $HOME/.claude/hooks/session-start.sh
Diagnosis:
- If found: CRITICAL - legacy hooks causing duplicates
读取文件,检查是否存在键,且包含如下条目:
~/.claude/settings.json"hooks"bash $HOME/.claude/hooks/keyword-detector.shbash $HOME/.claude/hooks/persistent-mode.shbash $HOME/.claude/hooks/session-start.sh
诊断结果:
- 若存在上述条目:严重问题 - 遗留钩子导致重复冲突
Step 3: Check for Legacy Bash Hook Scripts
步骤3:检查遗留的Bash钩子脚本
bash
ls -la ~/.claude/hooks/*.sh 2>/dev/nullDiagnosis:
- If ,
keyword-detector.sh,persistent-mode.sh, orsession-start.shexist: WARN - legacy scripts (can cause confusion)stop-continuation.sh
bash
ls -la ~/.claude/hooks/*.sh 2>/dev/null诊断结果:
- 若存在、
keyword-detector.sh、persistent-mode.sh或session-start.sh:警告 - 遗留脚本(可能造成混淆)stop-continuation.sh
Step 4: Check CLAUDE.md
步骤4:检查CLAUDE.md文件
bash
undefinedbash
undefinedCheck if CLAUDE.md exists
Check if CLAUDE.md exists
ls -la ~/.claude/CLAUDE.md 2>/dev/null
ls -la ~/.claude/CLAUDE.md 2>/dev/null
Check for OMC marker
Check for OMC marker
grep -q "oh-my-claudecode Multi-Agent System" ~/.claude/CLAUDE.md 2>/dev/null && echo "Has OMC config" || echo "Missing OMC config"
**Diagnosis**:
- If missing: CRITICAL - CLAUDE.md not configured
- If missing OMC marker: WARN - outdated CLAUDE.mdgrep -q "oh-my-claudecode Multi-Agent System" ~/.claude/CLAUDE.md 2>/dev/null && echo "Has OMC config" || echo "Missing OMC config"
**诊断结果**:
- 若文件缺失:严重问题 - CLAUDE.md未配置
- 若缺失OMC标记:警告 - CLAUDE.md版本过时Step 5: Check for Stale Plugin Cache
步骤5:检查过期的插件缓存
bash
undefinedbash
undefinedCount versions in cache
Count versions in cache
ls ~/.claude/plugins/cache/omc/oh-my-claudecode/ 2>/dev/null | wc -l
**Diagnosis**:
- If > 1 version: WARN - multiple cached versions (cleanup recommended)ls ~/.claude/plugins/cache/omc/oh-my-claudecode/ 2>/dev/null | wc -l
**诊断结果**:
- 若版本数量>1:警告 - 存在多个缓存版本(建议清理)Step 6: Check for Legacy Curl-Installed Content
步骤6:检查通过Curl安装的遗留内容
Check for legacy agents, commands, and skills installed via curl (before plugin system):
bash
undefined检查通过curl安装的遗留代理、命令和技能(插件系统之前的版本):
bash
undefinedCheck for legacy agents directory
Check for legacy agents directory
ls -la ~/.claude/agents/ 2>/dev/null
ls -la ~/.claude/agents/ 2>/dev/null
Check for legacy commands directory
Check for legacy commands directory
ls -la ~/.claude/commands/ 2>/dev/null
ls -la ~/.claude/commands/ 2>/dev/null
Check for legacy skills directory
Check for legacy skills directory
ls -la ~/.claude/skills/ 2>/dev/null
**Diagnosis**:
- If `~/.claude/agents/` exists with oh-my-claudecode-related files: WARN - legacy agents (now provided by plugin)
- If `~/.claude/commands/` exists with oh-my-claudecode-related files: WARN - legacy commands (now provided by plugin)
- If `~/.claude/skills/` exists with oh-my-claudecode-related files: WARN - legacy skills (now provided by plugin)
Look for files like:
- `architect.md`, `researcher.md`, `explore.md`, `executor.md`, etc. in agents/
- `ultrawork.md`, `deepsearch.md`, etc. in commands/
- Any oh-my-claudecode-related `.md` files in skills/
---ls -la ~/.claude/skills/ 2>/dev/null
**诊断结果**:
- 若`~/.claude/agents/`目录存在且包含oh-my-claudecode相关文件:警告 - 遗留代理(现由插件提供)
- 若`~/.claude/commands/`目录存在且包含oh-my-claudecode相关文件:警告 - 遗留命令(现由插件提供)
- 若`~/.claude/skills/`目录存在且包含oh-my-claudecode相关文件:警告 - 遗留技能(现由插件提供)
需查找的文件示例:
- agents/目录下的`architect.md`、`researcher.md`、`explore.md`、`executor.md`等
- commands/目录下的`ultrawork.md`、`deepsearch.md`等
- skills/目录下任何与oh-my-claudecode相关的`.md`文件
---Report Format
报告格式
After running all checks, output a report:
undefined完成所有检查后,输出如下格式的报告:
undefinedOMC Doctor Report
OMC Doctor Report
Summary
Summary
[HEALTHY / ISSUES FOUND]
[HEALTHY / ISSUES FOUND]
Checks
Checks
| Check | Status | Details |
|---|---|---|
| Plugin Version | OK/WARN/CRITICAL | ... |
| Legacy Hooks (settings.json) | OK/CRITICAL | ... |
| Legacy Scripts (~/.claude/hooks/) | OK/WARN | ... |
| CLAUDE.md | OK/WARN/CRITICAL | ... |
| Plugin Cache | OK/WARN | ... |
| Legacy Agents (~/.claude/agents/) | OK/WARN | ... |
| Legacy Commands (~/.claude/commands/) | OK/WARN | ... |
| Legacy Skills (~/.claude/skills/) | OK/WARN | ... |
| Check | Status | Details |
|---|---|---|
| Plugin Version | OK/WARN/CRITICAL | ... |
| Legacy Hooks (settings.json) | OK/CRITICAL | ... |
| Legacy Scripts (~/.claude/hooks/) | OK/WARN | ... |
| CLAUDE.md | OK/WARN/CRITICAL | ... |
| Plugin Cache | OK/WARN | ... |
| Legacy Agents (~/.claude/agents/) | OK/WARN | ... |
| Legacy Commands (~/.claude/commands/) | OK/WARN | ... |
| Legacy Skills (~/.claude/skills/) | OK/WARN | ... |
Issues Found
Issues Found
- [Issue description]
- [Issue description]
- [Issue description]
- [Issue description]
Recommended Fixes
Recommended Fixes
[List fixes based on issues]
---[List fixes based on issues]
---Auto-Fix (if user confirms)
自动修复(需用户确认)
If issues found, ask user: "Would you like me to fix these issues automatically?"
If yes, apply fixes:
若发现问题,询问用户:"是否需要我自动修复这些问题?"
若用户同意,执行以下修复操作:
Fix: Legacy Hooks in settings.json
修复:settings.json中的遗留钩子
Remove the section from (keep other settings intact)
"hooks"~/.claude/settings.json从中移除部分(保留其他设置不变)
~/.claude/settings.json"hooks"Fix: Legacy Bash Scripts
修复:遗留的Bash脚本
bash
rm -f ~/.claude/hooks/keyword-detector.sh
rm -f ~/.claude/hooks/persistent-mode.sh
rm -f ~/.claude/hooks/session-start.sh
rm -f ~/.claude/hooks/stop-continuation.shbash
rm -f ~/.claude/hooks/keyword-detector.sh
rm -f ~/.claude/hooks/persistent-mode.sh
rm -f ~/.claude/hooks/session-start.sh
rm -f ~/.claude/hooks/stop-continuation.shFix: Outdated Plugin
修复:过时的插件
bash
rm -rf ~/.claude/plugins/cache/oh-my-claudecode
echo "Plugin cache cleared. Restart Claude Code to fetch latest version."bash
rm -rf ~/.claude/plugins/cache/oh-my-claudecode
echo "Plugin cache cleared. Restart Claude Code to fetch latest version."Fix: Stale Cache (multiple versions)
修复:过期缓存(多个版本)
bash
undefinedbash
undefinedKeep only latest version
Keep only latest version
cd ~/.claude/plugins/cache/omc/oh-my-claudecode/
ls | sort -V | head -n -1 | xargs rm -rf
undefinedcd ~/.claude/plugins/cache/omc/oh-my-claudecode/
ls | sort -V | head -n -1 | xargs rm -rf
undefinedFix: Missing/Outdated CLAUDE.md
修复:缺失/过时的CLAUDE.md
Fetch latest from GitHub and write to :
~/.claude/CLAUDE.mdWebFetch(url: "https://raw.githubusercontent.com/Yeachan-Heo/oh-my-claudecode/main/docs/CLAUDE.md", prompt: "Return the complete raw markdown content exactly as-is")从GitHub获取最新版本并写入:
~/.claude/CLAUDE.mdWebFetch(url: "https://raw.githubusercontent.com/Yeachan-Heo/oh-my-claudecode/main/docs/CLAUDE.md", prompt: "Return the complete raw markdown content exactly as-is")Fix: Legacy Curl-Installed Content
修复:通过Curl安装的遗留内容
Remove legacy agents, commands, and skills directories (now provided by plugin):
bash
undefined移除遗留的代理、命令和技能目录(现由插件提供):
bash
undefinedBackup first (optional - ask user)
Backup first (optional - ask user)
mv ~/.claude/agents ~/.claude/agents.bak
mv ~/.claude/agents ~/.claude/agents.bak
mv ~/.claude/commands ~/.claude/commands.bak
mv ~/.claude/commands ~/.claude/commands.bak
mv ~/.claude/skills ~/.claude/skills.bak
mv ~/.claude/skills ~/.claude/skills.bak
Or remove directly
Or remove directly
rm -rf ~/.claude/agents
rm -rf ~/.claude/commands
rm -rf ~/.claude/skills
**Note**: Only remove if these contain oh-my-claudecode-related files. If user has custom agents/commands/skills, warn them and ask before removing.
---rm -rf ~/.claude/agents
rm -rf ~/.claude/commands
rm -rf ~/.claude/skills
**注意**:仅当这些目录包含oh-my-claudecode相关文件时才进行移除。若用户有自定义的代理/命令/技能,需先发出警告并征得用户同意后再操作。
---Post-Fix
修复后操作
After applying fixes, inform user:
Fixes applied. Restart Claude Code for changes to take effect.
完成修复后,告知用户:
修复已完成。请重启Claude Code以使更改生效。