doctor

GitHub

诊断并修复 oh-my-codex 安装问题,检查插件缓存、版本、钩子配置及技能根目录状态,提供健康报告。

plugins/oh-my-codex/skills/doctor/SKILL.md Yeachan-Heo/oh-my-codex

Trigger Scenarios

oh-my-codex 安装或发现失败 需要排查环境配置异常

Install

npx skills add Yeachan-Heo/oh-my-codex --skill doctor -g -y
More Options

Non-standard path

npx skills add https://github.com/Yeachan-Heo/oh-my-codex/tree/main/plugins/oh-my-codex/skills/doctor -g -y

Use without installing

npx skills use Yeachan-Heo/oh-my-codex@doctor

指定 Agent (Claude Code)

npx skills add Yeachan-Heo/oh-my-codex --skill doctor -a claude-code -g -y

安装 repo 全部 skill

npx skills add Yeachan-Heo/oh-my-codex --all -g -y

预览 repo 内 skill

npx skills add Yeachan-Heo/oh-my-codex --list

SKILL.md

Frontmatter
{
    "name": "doctor",
    "description": "Diagnose and fix oh-my-codex installation issues"
}

OMX Doctor

Use this task card to diagnose installation/discovery problems. Shared safety, lifecycle, hook, team, autonomy, and cancellation rules live in templates/AGENTS.md. ~/.codex means ${CODEX_HOME:-~/.codex} when CODEX_HOME is set.

Run diagnostics

omx doctor
omx doctor --team             # include Team runtime checks
omx doctor --verbose          # include detailed check evidence
omx doctor --force            # repair eligible repo artifact ownership issues
omx doctor --dry-run --force  # preview eligible ownership repairs

For a local source checkout, build first and invoke node bin/omx.js doctor. Keep command output and exact paths for the report.

Plugin cache and version

PLUGIN_CACHE_ROOT="${CODEX_HOME:-$HOME/.codex}/plugins/cache"
CACHE_ENTRIES=$(find "$PLUGIN_CACHE_ROOT" -path "*/oh-my-codex/*" -mindepth 3 -maxdepth 3 -type d 2>/dev/null)
if [[ -z "$CACHE_ENTRIES" ]]; then
  echo "Installed plugin cache: none"
else
  while IFS= read -r d; do
    m=$(basename "$(dirname "$(dirname "$d")")"); v=$(basename "$d")
    printf 'Installed plugin cache: marketplace=%s version=%s path=%s\n' "$m" "$v" "$d"
  done <<<"$CACHE_ENTRIES"
fi
LATEST=$(npm view oh-my-codex version 2>/dev/null)
echo "Latest npm: $LATEST"

No cache is INFO (normal for npm/setup-only installs). A non-local cache version differing from LATEST, or multiple versions for one marketplace, is WARN. Plugin discovery does not replace npm installation plus omx setup; native/runtime wiring remains setup-owned.

Hooks, AGENTS, and skill roots

CODEX_DIR="${CODEX_HOME:-$HOME/.codex}"
ls -la "$CODEX_DIR/config.toml" "$CODEX_DIR/settings.json" 2>/dev/null
rg 'keyword-detector|persistent-mode|session-start|stop-continuation' "$CODEX_DIR/config.toml" "$CODEX_DIR/settings.json" 2>/dev/null || true
ls -la "$CODEX_DIR/hooks"/*.sh 2>/dev/null
ls -la "$CODEX_DIR/AGENTS.md" 2>/dev/null
grep -q "oh-my-codex Multi-Agent System" "$CODEX_DIR/AGENTS.md" 2>/dev/null && echo "Has OMX config" || echo "Missing OMX config"
ls -la "$CODEX_DIR/agents" "$CODEX_DIR/commands" "$CODEX_DIR/skills" "$HOME/.agents/skills" 2>/dev/null

Classify legacy hook references as CRITICAL (duplicate hooks). The scripts keyword-detector.sh, persistent-mode.sh, session-start.sh, and stop-continuation.sh are WARN. Missing AGENTS.md is CRITICAL; missing the OMX marker is WARN. ${CODEX_HOME:-~/.codex}/skills is the canonical user root. ~/.agents/skills is historical and overlapping trees can duplicate skill entries. OMX files under legacy agents/ or commands/ are WARN.

With --team, retain any resume_blocker, slow_shutdown, delayed_status_lag, stale_leader, or orphan_tmux_session diagnostics; failed checks set a non-zero exit status.

Report contract

## OMX Doctor Report
### Summary
[HEALTHY / ISSUES FOUND]
### Checks
| Check | Status | Details |
| Plugin Version | OK/WARN/INFO | ... |
| Hook Config (config.toml / legacy settings.json) | OK/CRITICAL | ... |
| Legacy Scripts (~/.codex/hooks/) | OK/WARN | ... |
| AGENTS.md | OK/WARN/CRITICAL | ... |
| Plugin Cache | OK/WARN | ... |
| Legacy Agents / Commands | OK/WARN | ... |
| Skills (canonical / historical root) | OK/WARN | ... |
### Issues Found
1. ...
### Recommended Fixes
...

Remediation (after user confirmation and confirming each target is OMX-owned)

Remove only confirmed OMX legacy content; preserve unrelated user files:

# If settings.json exists, remove only its legacy "hooks" section.
rm -f "$CODEX_DIR/hooks/keyword-detector.sh" "$CODEX_DIR/hooks/persistent-mode.sh" "$CODEX_DIR/hooks/session-start.sh" "$CODEX_DIR/hooks/stop-continuation.sh"
PLUGIN_CACHE_ROOT="${CODEX_HOME:-$HOME/.codex}/plugins/cache"
find "$PLUGIN_CACHE_ROOT" -path "*/oh-my-codex" -type d -prune -exec rm -rf {} +

For older curl installs, inspect first and remove only directories containing OMX-managed files:

ls -la "$CODEX_DIR/agents" "$CODEX_DIR/commands" "$CODEX_DIR/skills" "$HOME/.agents/skills" 2>/dev/null
# Optional backups:
# mv "$CODEX_DIR/agents" "$CODEX_DIR/agents.bak"
# mv "$CODEX_DIR/commands" "$CODEX_DIR/commands.bak"
# mv "$HOME/.agents/skills" "$HOME/.agents/skills.bak"
rm -rf "$CODEX_DIR/agents" "$CODEX_DIR/commands" "$HOME/.agents/skills"

If AGENTS.md is missing/outdated, fetch the current raw file and write it to $CODEX_DIR/AGENTS.md:

WebFetch(url: "https://raw.githubusercontent.com/Yeachan-Heo/oh-my-codex/main/docs/AGENTS.md", prompt: "Return the complete raw markdown content exactly as-is")

To keep only the newest cache version for a selected marketplace:

PLUGIN_CACHE_DIR="$PLUGIN_CACHE_ROOT/$MARKETPLACE_NAME/oh-my-codex"
KEEP_VERSION=$(for d in "$PLUGIN_CACHE_DIR"/*; do [[ -d "$d" ]] && basename "$d"; done | sort -V | tail -1)
[[ -n "$KEEP_VERSION" ]] && find "$PLUGIN_CACHE_DIR" -mindepth 1 -maxdepth 1 -type d ! -name "$KEEP_VERSION" -exec rm -rf {} +

If AGENTS.md is missing or stale, refresh it from the current release source, then rerun omx doctor. If legacy ~/.agents/skills overlaps the canonical root, archive/remove that tree only after checking for custom skills. Restart Codex after fixes and report before/after evidence.

Exit conditions

Stop with HEALTHY only when required paths, hook/config checks, AGENTS marker, plugin cache status, and (when requested) Team checks pass. Otherwise report ISSUES FOUND, exact failed evidence, and the smallest confirmed remediation; do not claim a fix from a recommendation alone.

Version History

  • 3ad79a8 Current 2026-08-28 17:52

    重构为任务卡片格式,增加团队运行时检查支持,细化插件缓存与钩子配置的严重性分级,更新报告模板。

  • e94437f 2026-08-20 07:17

Same Skill Collection

plugins/oh-my-codex/skills/analyze/SKILL.md
plugins/oh-my-codex/skills/ask/SKILL.md
plugins/oh-my-codex/skills/autopilot/SKILL.md
plugins/oh-my-codex/skills/autoresearch-goal/SKILL.md
plugins/oh-my-codex/skills/autoresearch/SKILL.md
plugins/oh-my-codex/skills/best-practice-research/SKILL.md
plugins/oh-my-codex/skills/cancel/SKILL.md
plugins/oh-my-codex/skills/configure-notifications/SKILL.md
plugins/oh-my-codex/skills/deep-interview/SKILL.md
plugins/oh-my-codex/skills/design/SKILL.md
plugins/oh-my-codex/skills/hud/SKILL.md
plugins/oh-my-codex/skills/omx-setup/SKILL.md
plugins/oh-my-codex/skills/performance-goal/SKILL.md
plugins/oh-my-codex/skills/pipeline/SKILL.md
plugins/oh-my-codex/skills/prometheus-strict/SKILL.md
plugins/oh-my-codex/skills/ralph/SKILL.md
plugins/oh-my-codex/skills/ralplan/SKILL.md
plugins/oh-my-codex/skills/skill/SKILL.md
plugins/oh-my-codex/skills/team/SKILL.md
plugins/oh-my-codex/skills/ultragoal/SKILL.md
plugins/oh-my-codex/skills/ultraqa/SKILL.md
plugins/oh-my-codex/skills/ultrawork/SKILL.md
plugins/oh-my-codex/skills/visual-ralph/SKILL.md
plugins/oh-my-codex/skills/wiki/SKILL.md
plugins/oh-my-codex/skills/worker/SKILL.md
skills/analyze/SKILL.md
skills/ask-claude/SKILL.md
skills/ask-gemini/SKILL.md
skills/ask/SKILL.md
skills/autopilot/SKILL.md
skills/autoresearch/SKILL.md
skills/best-practice-research/SKILL.md
skills/cancel/SKILL.md
skills/configure-notifications/SKILL.md
skills/deep-interview/SKILL.md
skills/design/SKILL.md
skills/frontend-ui-ux/SKILL.md
skills/git-master/SKILL.md
skills/hud/SKILL.md
skills/omx-setup/SKILL.md
skills/performance-goal/SKILL.md
skills/pipeline/SKILL.md
skills/prometheus-strict/SKILL.md
skills/ralplan/SKILL.md
skills/skill/SKILL.md
skills/team/SKILL.md
skills/ultragoal/SKILL.md
skills/ultraqa/SKILL.md
skills/visual-ralph/SKILL.md
skills/wiki/SKILL.md

Metadata

Files
0
Version
3ad79a8
Hash
84f4a191
Indexed
2026-08-20 07:17

trang chủ - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-31 21:07
浙ICP备14020137号-1 $bản đồ khách truy cập$