Communitygithub.com

omc-doctor

oh-my-claudecode のインストール問題を診断・修正します。

omc-doctor とは?

omc-doctor スキルは、Claude Code 向けプラグインマネージャー「oh-my-claudecode (OMC)」のインストール状態を網羅的に診断し、自動修復するための AI エージェントスキルです。このスキルは、プラグインバージョンの一致確認、設定ファイル内のレガシーフック検出、不要な Bash スクリプトや古い Claude.md 設定の確認、Node.js ランタイムや設定ディレクトリの書き込み権限といった Ralph 実行要件のチェックなど、7 つの診断ステップを順次実行します。各チェック結果は「OK」「WARN」「CRITICAL」で評価され、最後に整形されたレポートが生成されます。ユーザーが許可すれば、発見された問題に対して自動修正を適用することも可能です。このスキルは主に Claude Code 上で動作し、プラグインキャッシュや設定ファイルを直接操作するため、Node.js 環境が必要です。

対応✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Yeachan-Heo/oh-my-claudecode/tree/main/skills/omc-doctor

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

Doctor スキル

注記: このガイド内の ~/.claude/... パスは、環境変数 CLAUDE_CONFIG_DIR が設定されている場合、その値を尊重します。

タスク: インストール診断を実行

あなたは OMC Doctor です。インストール問題を診断・修正します。

ステップ 1: プラグインバージョンを確認

# インストール済みバージョンと最新バージョンを取得(クロスプラットフォーム)
node -e "const p=require('path'),f=require('fs'),h=require('os').homedir(),d=process.env.CLAUDE_CONFIG_DIR||p.join(h,'.claude'),b=p.join(d,'plugins','cache','omc','oh-my-claudecode');try{const v=f.readdirSync(b).filter(x=>/^\d/.test(x)).sort((a,c)=>a.localeCompare(c,void 0,{numeric:true}));console.log('Installed:',v.length?v[v.length-1]:'(none)')}catch{console.log('Installed: (none)')}"
npm view oh-my-claude-sisyphus version 2>/dev/null || echo "Latest: (unavailable)"

診断結果:

  • バージョンがインストールされていない場合: CRITICAL - プラグイン未インストール
  • インストールバージョンが最新と異なる場合: WARN - プラグインが古い
  • 複数のバージョンが存在する場合: WARN - キャッシュが古い

ステップ 2: settings.json 内のレガシーフックを確認

${CLAUDE_CONFIG_DIR:-~/.claude}/settings.json(プロファイルレベル)と ./.claude/settings.json(プロジェクトレベル)の両方を読み込み、"hooks" キーに以下のようなエントリがないか確認する:

  • bash ${CLAUDE_CONFIG_DIR:-$HOME/.claude}/hooks/keyword-detector.sh
  • bash ${CLAUDE_CONFIG_DIR:-$HOME/.claude}/hooks/persistent-mode.sh
  • bash ${CLAUDE_CONFIG_DIR:-$HOME/.claude}/hooks/session-start.sh

診断結果:

  • 見つかった場合: CRITICAL - レガシーフックが重複の原因に

ステップ 3: レガシーな Bash フックスクリプトを確認

ls -la "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/hooks/*.sh 2>/dev/null

診断結果:

  • keyword-detector.sh, persistent-mode.sh, session-start.sh, stop-continuation.sh が存在する場合: WARN - レガシースクリプト(混乱の原因になり得る)

ステップ 4: CLAUDE.md を確認

# CLAUDE.md が存在するか確認
ls -la "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/CLAUDE.md 2>/dev/null

# OMC マーカー(<!-- OMC:START --> が正規のマーカー)を確認
grep -q "<!-- OMC:START -->" "${CLAUDE_CONFIG_DIR:-$HOME/.claude}/CLAUDE.md" 2>/dev/null && echo "Has OMC config" || echo "Missing OMC config in CLAUDE.md"

# CLAUDE.md(または決定論的なコンパニオンファイル)のバージョンマーカーを確認し、最新インストール済みプラグインキャッシュバージョンと比較
node -e "const p=require('path'),f=require('fs'),h=require('os').homedir(),d=process.env.CLAUDE_CONFIG_DIR||p.join(h,'.claude');const base=p.join(d,'CLAUDE.md');let baseContent='';try{baseContent=f.readFileSync(base,'utf8')}catch{};let candidates=[base];let referenced='';const importMatch=baseContent.match(/CLAUDE-[^ )]*\\.md/);if(importMatch){referenced=p.join(d,importMatch[0]);candidates.push(referenced)}else{const defaultCompanion=p.join(d,'CLAUDE-omc.md');if(f.existsSync(defaultCompanion))candidates.push(defaultCompanion);try{const others=f.readdirSync(d).filter(n=>/^CLAUDE-.*\\.md$/i.test(n)).sort().map(n=>p.join(d,n));for(const o of others){if(candidates.includes(o)===false)candidates.push(o)}}catch{}};let claudeV='(missing)';let claudeSource='(none)';for(const file of candidates){try{const c=f.readFileSync(file,'utf8');const m=c.match(/<!--\\s*OMC:VERSION:([^\\s]+)\\s*-->/i);if(m){claudeV=m[1];claudeSource=file;break}}catch{}};if(claudeV==='(missing)'&&candidates.length>0){claudeV='(missing marker)';claudeSource='scanned deterministic CLAUDE sources';};let pluginV='(none)';try{const b=p.join(d,'plugins','cache','omc','oh-my-claudecode');const v=f.readdirSync(b).filter(x=>/^\\d/.test(x)).sort((a,c)=>a.localeCompare(c,void 0,{numeric:true}));pluginV=v.length?v[v.length-1]:'(none)';}catch{};console.log('CLAUDE.md OMC version:',claudeV);console.log('OMC version source:',claudeSource);console.log('Latest cached plugin version:',pluginV);if(claudeV==='(missing)'||claudeV==='(missing marker)'||pluginV==='(none)'){console.log('VERSION CHECK SKIPPED: missing CLAUDE marker or plugin cache')}else if(claudeV===pluginV){console.log('VERSION MATCH: CLAUDE and plugin cache are aligned')}else{console.log('VERSION DRIFT: CLAUDE.md and plugin versions differ')}"

# ファイル分割パターン(例: CLAUDE-omc.md)のコンパニオンファイルを確認
find "${CLAUDE_CONFIG_DIR:-$HOME/.claude}" -maxdepth 1 -type f -name 'CLAUDE-*.md' -print 2>/dev/null
while IFS= read -r f; do
  grep -q "<!-- OMC:START -->" "$f" 2>/dev/null && echo "Has OMC config in companion: $f"
done < <(find "${CLAUDE_CONFIG_DIR:-$HOME/.claude}" -maxdepth 1 -type f -name 'CLAUDE-*.md' -print 2>/dev/null)

# CLAUDE.md がコンパニオンファイルを参照しているか確認
grep -o "CLAUDE-[^ )]*\.md" "${CLAUDE_CONFIG_DIR:-$HOME/.claude}/CLAUDE.md" 2>/dev/null

診断結果:

  • CLAUDE.md がない場合: CRITICAL - CLAUDE.md が設定されていない
  • <!-- OMC:START --> が CLAUDE.md 内にある場合: OK
  • <!-- OMC:START --> がコンパニオンファイル(例: CLAUDE-omc.md)内にある場合: OK - ファイル分割パターンを検出
  • CLAUDE.md またはコンパニオンファイルに OMC マーカーがない場合: WARN - 古い CLAUDE.md
  • 決定論的 CLAUDE ソース(ベース + 参照コンパニオン)のスキャンで OMC:VERSION マーカーがない場合: WARN - CLAUDE.md の新鮮さを確認できない
  • CLAUDE.md OMC version が Latest cached plugin version と異なる場合: WARN - バージョンのずれを検出(omc update または omc setup を実行)

ステップ 5: Ralph 実行時前提条件を確認

Ralph はエージェント駆動の永続化ループであり、コンパイルされたプログラムではありません。唯一の必須ランタイム前提条件は、OMC のフックスクリプト(persistent-mode.mjs、keyword-detector.mjs)を実行する Node ランタイムと、ralph-state.json などの .omc/state/ 状態ファイル用の書き込み可能な設定ディレクトリです。

node --version || echo "Node for Ralph: MISSING"
mkdir -p "${CLAUDE_CONFIG_DIR:-$HOME/.claude}" 2>/dev/null
touch "${CLAUDE_CONFIG_DIR:-$HOME/.claude}/.omc-write-probe" 2>/dev/null && rm -f "${CLAUDE_CONFIG_DIR:-$HOME/.claude}/.omc-write-probe" && echo "Config dir writable" || echo "Config dir NOT writable"

診断結果:

  • Node が実行されバージョンが表示される場合: OK - Ralph ランタイム前提条件あり
  • node がない、または失敗する場合: CRITICAL - Node なしでは OMC フックと Ralph は実行不可(インストーラは https://nodejs.org 参照。nvm/fnm ユーザーは非対話シェルの PATH に Node が必要)
  • 設定ディレクトリに書き込み不可の場合: WARN - 書き込み可能になるまで Ralph 状態の永続化は失敗する

ステップ 6: 古いプラグインキャッシュを確認

# キャッシュ内のバージョン数をカウント(クロスプラットフォーム)
node -e "const p=require('path'),f=require('fs'),h=require('os').homedir(),d=process.env.CLAUDE_CONFIG_DIR||p.join(h,'.claude'),b=p.join(d,'plugins','cache','omc','oh-my-claudecode');try{const v=f.readdirSync(b).filter(x=>/^\d/.test(x));console.log(v.length+' version(s):',v.join(', '))}catch{console.log('0 versions')}"

診断結果:

  • バージョン数が 1 より多い場合: WARN - 複数のキャッシュバージョン(クリーンアップ推奨)

ステップ 7: curl でインストールされたレガシーコンテンツを確認

(プラグインシステム以前に)curl でインストールされたレガシーエージェント、コマンド、スキルを確認します。 重要: プラグインが提供する実際の名前と一致するファイルのみをフラグ付けしてください。OMC とは無関係なユーザーのカスタムエージェント/コマンド/スキルはフラグ付けしないでください。

# レガシーエージェントディレクトリを確認
ls -la "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/agents/ 2>/dev/null

# レガシーコマンドディレクトリを確認
ls -la "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/commands/ 2>/dev/null

# レガシースキルディレクトリを確認
ls -la "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/skills/ 2>/dev/null

診断結果:

  • ~/.claude/agents/ が存在し、プラグインエージェント名と一致するファイルがある場合: WARN - レガシーエージェント(現在はプラグインが提供)
  • ~/.claude/commands/ が存在し、プラグインコマンド名と一致するファイルがある場合: WARN - レガシーコマンド(現在はプラグインが提供)
  • ~/.claude/skills/ が存在し、プラグインスキル名と一致するファイルがある場合: WARN - レガシースキル(現在はプラグインが提供)
  • プラグイン名と一致しないカスタムファイルが存在する場合: OK - ユーザーカスタムコンテンツであるため、フラグ付けしない

既知のプラグインエージェント名(agents/ でこれらを確認): architect.md, document-specialist.md, explore.md, executor.md, debugger.md, planner.md, analyst.md, critic.md, verifier.md, test-engineer.md, designer.md, writer.md, qa-tester.md, scientist.md, security-reviewer.md, code-reviewer.md, git-master.md, code-simplifier.md

既知のプラグインスキル名(skills/ でこれらを確認): ai-slop-cleaner, ask, autopilot, cancel, configure-notifications, deep-interview, deepinit, external-context, hud, omc-doctor, omc-setup, plan, project-session-manager, ralph, ralplan, release, skill, team, visual-verdict, wiki

既知のプラグインコマンド名(commands/ でこれらを確認): deepsearch.md


レポート形式

すべてのチェックを実行した後、以下のレポートを出力します:

## OMC Doctor レポート

### サマリー
[HEALTHY / ISSUES FOUND]

### チェック一覧

| チェック項目 | ステータス | 詳細 |
|--------------|------------|------|
| プラグインバージョン | OK/WARN/CRITICAL | ... |
| レガシーフック (settings.json) | OK/CRITICAL | ... |
| レガシースクリプト (~/.claude/hooks/) | OK/WARN | ... |
| CLAUDE.md | OK/WARN/CRITICAL | ... |
| Ralph ランタイム前提条件 (Node, 設定ディレクトリ) | OK/CRITICAL | ... |
| プラグインキャッシュ | OK/WARN | ... |
| レガシーエージェント (~/.claude/agents/) | OK/WARN | ... |
| レガシーコマンド (~/.claude/commands/) | OK/WARN | ... |
| レガシースキル (~/.claude/skills/) | OK/WARN | ... |

### 発見された問題
1. [問題の説明]
2. [問題の説明]

### 推奨される修正
[問題に基づいて修正をリスト]

自動修正(ユーザーが確認した場合)

問題が見つかった場合、ユーザーに確認: 「これらの問題を自動的に修正しますか?」

「はい」の場合、修正を適用:

修正: settings.json 内のレガシーフック

${CLAUDE_CONFIG_DIR:-~/.claude}/settings.json から "hooks" セクションを削除します(他の設定はそのまま保持)

修正: レガシー Bash スクリプト

rm -f "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/hooks/keyword-detector.sh
rm -f "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/hooks/persistent-mode.sh
rm -f "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/hooks/session-start.sh
rm -f "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/hooks/stop-continuation.sh

修正: 古いプラグイン

# プラグインキャッシュをクリア(クロスプラットフォーム)
node -e "const p=require('path'),f=require('fs'),d=process.env.CLAUDE_CONFIG_DIR||p.join(require('os').homedir(),'.claude'),b=p.join(d,'plugins','cache','omc','oh-my-claudecode');try{f.rmSync(b,{recursive:true,force:true});console.log('Plugin cache cleared. Restart Claude Code to fetch latest version.')}catch{console.log('No plugin cache found')}"

修正: 古いキャッシュ(複数バージョン)

# 最新バージョンのみ保持(クロスプラットフォーム)
node -e "const p=require('path'),f=require('fs'),h=require('os').homedir(),d=process.env.CLAUDE_CONFIG_DIR||p.join(h,'.claude'),b=p.join(d,'plugins','cache','omc','oh-my-claudecode');try{const v=f.readdirSync(b).filter(x=>/^\d/.test(x)).sort((a,c)=>a.localeCompare(c,void 0,{numeric:true}));v.slice(0,-1).forEach(x=>f.rmSync(p.join(b,x),{recursive:true,force:true}));console.log('Removed',v.length-1,'old version(s)')}catch(e){console.log('No cache to clean')}"

修正: CLAUDE.md がない、または古い

GitHub から最新を取得し、${CLAUDE_CONFIG_DIR:-~/.claude}/CLAUDE.md に書き込み:

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

修正: curl でインストールされたレガシーコンテンツ

レガシーエージェント、コマンド、スキルのディレクトリを削除(現在はプラグインが提供):

# 最初にバックアップ(オプション - ユーザーに確認)
# mv "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/agents "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/agents.bak
# mv "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/commands "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/commands.bak
# mv "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/skills "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/skills.bak

# または直接削除
rm -rf "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/agents
rm -rf "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/commands
rm -rf "${CLAUDE_CONFIG_DIR:-$HOME/.claude}"/skills

注記: これらのディレクトリに oh-my-claudecode 関連のファイルのみが含まれている場合のみ削除してください。ユーザーがカスタムエージェント/コマンド/スキルを持っている場合は、削除前に警告し、確認を取ってください。


修正後

修正を適用した後、以下のようにユーザーに通知:

修正を適用しました。Claude Code を再起動 して変更を反映してください。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

agent-doc-discipline

Writing-time discipline for documents agents consume (the five surfaces, specs, tickets, .omc/skills/) — every rule checkable and carrying a why, steps before reference, one meaning in one home, no restating what the environment already says. Mandatory at drydock seed generation and the launch C5 sediment pass; opt-in for any other agent-facing doc edit. The companion of minimal-code-discipline: that one disciplines code, this one disciplines papers.

ai-slop-cleaner

Clean AI-generated code slop with a regression-safe, deletion-first workflow and optional reviewer-only mode

ask

Process-first advisor routing for Claude, Codex, Gemini, Antigravity, Grok, or Cursor via `omc ask`, with artifact capture and no raw CLI assembly

ask-navigator

Shipyard

autopilot

Full autonomous execution from idea to working code

autoresearch

Stateful single-mission improvement loop with strict evaluator contract, markdown decision logs, and max-runtime stop behavior

cancel

Cancel any active OMC mode (autopilot, ralph, ultragoal, swarm, ultrapilot, pipeline, team) and clean up retired legacy state

configure-notifications

Configure notification integrations (Telegram, Discord, Slack) via natural language

debug

Diagnose the current OMC session or repo state using logs, traces, state, and focused reproduction

deepinit

Deep codebase initialization with hierarchical AGENTS.md documentation

deep-interview

Socratic deep interview with mathematical ambiguity gating before explicit execution approval

drydock

Lay the keel of the shipyard harness in any repo — the 4-pillar shared environment (Context, Rules, Tools, Standards) across 5 surfaces (CLAUDE.md, skills, design-system, mcp/cli, shared context) so that every human and agent inherits the same design language and anyone can ship. Run once per repo; re-run with --check to audit drift.

execute

Carry an approved task through to working, verified code

external-context

Invoke parallel document-specialist agents for external web searches and documentation lookup

graph

Deterministic orchestration graph runtime - declarative DAG pipelines with journal-based crash recovery

harbor

Harbor intake for external work — the captain only handles unresolved decisions. Sweeps incoming issues and PRs, verifies every claim before disposition, reuses every decision already made, and hands the maintainer a docket whose pending items each carry one question with options, recommendation, impact and evidence. Agent-autonomous for facts and for actions covered by standing authorization; signed for every new judgment. Never merges.

hud

Configure HUD display options (layout, presets, display elements)

launch

Shipyard

loft

Loft the shape before cutting steel — answer a design question that prose cannot settle by building a throwaway artifact: a pure logic module in a clickable shell, or structurally different UI variants behind one route. The captain reacts to the artifact; the answer folds into the decision; the artifact never docks. Use when a design question stalls in words, when a navigator map carries a loft ticket, or when a spec discussion reaches

minimal-code-discipline

YAGNI-ladder coding discipline for writing changes — existence-first, reuse before writing, dependency ladder, shortest correct diff, with non-negotiables that must never be minimized away

関連スキル