omc-doctor
Diagnose and fix oh-my-claudecode installation issues
By yeachan-heo · 673 installs
npx skills add yeachan-heo/oh-my-claudecode --skill omc-doctor
Source repository · Upstream listing
Doctor Skill
Note: All ~/.claude/... paths in this guide respect CLAUDE CONFIG DIR when that environment variable is set.
Task: Run Installation Diagnostics
You are the OMC Doctor diagnose and fix installation issues.
Step 1: Check Plugin Version
Diagnosis :
If no version installed: CRITICAL plugin not installed
If INSTALLED != LATEST: WARN outdated plugin
If multiple versions exist: WARN stale cache
Step 2: Check for Legacy Hooks in settings files
Read the profile level ${CLAUDE CONFIG DIR: ~/.claude}/settings.json and the primary working directory's .claude/settings.json , then resolve every project local settings file Claude Code may read before checking hooks. In a normal checkout, inspect the repository root .claude/settings.local.json . In a linked Git worktree, inspect the main checkout root's .claude/settings.local.json , not just the linked worktree's file; identify the main checkout with git worktree list porcelain . On Windows, and whenever Claude Code keeps the local file beside the shared .claude/settings.json , inspect .claude/settings.local.json beside that shared settings file, including in a worktree. Also inspect any starting directory .claude/settings.local.json left by Claude Code versions before 2.1.211; Claude Code can still read it alongside the root file. Deduplicate identical paths. If the main checkout root or any applicable local settings file cannot be resolved or read, treat settings and script references as inconclusive and do not remove hooks or scripts. Check whether any applicable file has a "hooks" key with entries like:
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
bash ${CLAUDE CONFIG DIR: $HOME/.claude}/hooks/stop continuation.sh
bash ${CLAUDE CONFIG DIR: $HOME/.claude}/hooks/silent auto update.sh
Also recognize standalone Node hook registrations under the active config directory's hooks/ folder: .mjs files named keyword detector , persistent mode , session start , session end , pre tool use , post tool use , post tool use failure , code simplifier , or stop continuation . For the historical keyword detector , persistent mode , session start , and stop continuation basenames, .cjs and .js variants are legacy too. For example, node "${CLAUDE CONFIG DIR: $HOME/.claude}/hooks/keyword detector.mjs" is a legacy registration. On Windows, recognize paths such as node "%USERPROFILE%\.claude\hooks\keyword detector.mjs" and %CLAUDE CONFIG DIR%\hooks\<filename (or their expanded absolute equivalents) with backslash separators as the same active config directory. Match only exact listed filenames invoked with node from that directory; do not match plugin root commands or similarly named scripts in other directories.
A command is an auto fix candidate only when it is a plain direct invocation of exactly one listed file: bash <exact .sh path , node <exact Node path , or the exact executable script path alone when the target has execute permission (for example, $HOME/.claude/hooks/keyword detector.sh ). No form may include extra arguments, shell operators, or other commands. If a command merely mentions the path, adds custom behavior (for example, bash legacy.sh && run my check ), or cannot be parsed unambiguously, report it for manual cleanup and leave the hook object unchanged.
Before diagnosing a standalone registration as a duplicate, resolve plugin enablement with the runtime's precedence: managed and command line settings first (read only), then every applicable project local settings file resolved above, then the primary working directory's ./.claude/settings.json , then ${CLAUDE CONFIG DIR: ~/.claude}/settings.json . Include the main checkout, Windows side by side, and legacy starting directory local paths when they apply. For duplicate keys between the root local file and a pre 2.1.211 starting directory file, the root local value wins; never ignore a false from the effective local file or fall through to a project/profile true . The first scope that explicitly mentions any supported OMC ID decides; unmentioned scopes are transparent. The supported marketplace IDs are oh my claudecode , oh my claudecode@omc , and oh my claudecode@oh my claudecode . When the current session loads OMC from an inline source such as plugin dir , plugin url , or CLAUDE CODE PLUGIN DIRS , also consider oh my claudecode@inline only after the active root's .claude plugin/plugin.json has "name": "oh my claudecode" and the session source confirms that root is loaded. Treat that inline plugin as active for the session unless its manifest sets "defaultEnabled": false or an applicable settings source disables it; an explicit applicable true overrides the manifest default. CLAUDE PLUGIN ROOT is only a locator, not proof that a plugin is enabled; an explicit effective false always blocks automatic removal. Within each scope, enabledPlugins is canonical, and legacy plugins is consulted only if enabledPlugins does not mention any supported OMC ID. Thus a canonical false overrides a stale legacy true , and a higher precedence false overrides any lower precedence true . If applicable local sources conflict and the effective value cannot be determined, supported IDs in the winning field conflict, a relevant file is unreadable or malformed, or no effective enabled result can be established, treat plugin activity as inconclusive and do not auto remove. Inspect every hook source for the active root read only: the optional .claude plugin/plugin.json hooks field accepts a path, an inline hooks object, or an array mixing paths and inline objects; resolve declared file paths relative to the plugin root and include hooks/hooks.json when present. A malformed, unreadable, or unresolved declared source makes event ownership inconclusive. A cached plugin version is insufficient. Also resolve the standalone script file and compare its bytes or SHA 256 with the shipped OMC payload for that exact filename; for historical .sh files, use the versioned fingerprints below. A matching name or path alone does not prove ownership. If the plugin is inactive, does not provide that event, no payload or fingerprint exists, the target cannot be read, or the content differs, treat the entry as potentially user owned and do not recommend removal.
For known standalone payloads, verify the expected plugin event as well as the payload identity. The known OMC filename to event mapping is:
Standalone payload basename Canonical plugin event
keyword detector UserPromptSubmit
session start SessionStart
session end SessionEnd
pre tool use PreToolUse
post tool use PostToolUse
post tool use failure PostToolUseFailure
persistent mode , stop continuation , code simplifier Stop
For a historical payload, verify its event mapping from that version's trusted manifest or installer source; if unavailable, leave it for manual review. The active plugin must provide the canonical or specifically verified equivalent handler under the registration's event, and that handler must replace the payload's behavior. Merely finding any plugin handler for that event is insufficient. For example, a session start script registered under Stop is not a duplicate even if the active plugin defines unrelated Stop handlers. If event or behavior equivalence is uncertain, preserve the hook and script.
The tracked historical OMC Bash hook payload fingerprints (SHA 256) are:
keyword detector.sh : abe4dd5e4b16231060166264d271a51e781f08a31c6aa402b26976f9c40d424e ( 96266316 ), 748463911b2a8b7fffed51137c9731c962b656d490a1e4b27ef7ab10dbbbaff5 ( 3a02feb1 ), 1eaced21774916c31bec5b149a87009d014ffd8027ecf8e9d6ae6a36bdd79a40 ( bef486f1 )
persistent mode.sh : c131c6846573f0f69b6e39aed1e6db8f05279131a8976f604c1511a46f564ce5 ( 96266316 ), 219e50bf42b7a7a0e52fb142844dce21faca7c327d9acf346fa70f074ac982ac ( 3a02feb1 ), 02f4d0d63a9ce092fe5be02ce6e79f275710b773d4b8d75ff33f272540451eff ( bef486f1 )
session start.sh : d87571c326c43cc43b6948aca661a9616faa6943cfe1d1131f482bd30f638134 ( 96266316 ), a9607c64a14d9f8e9fa990b9f38879ef095d85652f548b1232e28d14641214eb ( 3a02feb1 ), cf7aa2b008829784c8942766c3f00d348ef33a1aab66dd3f96536e95560fd56b ( bef486f1 )
stop continuation.sh : f74deb67479c7861b0966bc959ffd3917152b8872ac83d9243a03c7cb707b51f ( 96266316 )
No tracked OMC payload fingerprint is available for silent auto update.sh or historical .js / .cjs variants. Treat those files as ownership inconclusive; do not automatically remove their hook registrations or files.
For Node hooks, compare against the active plugin payload, any validated retained package under ${CLAUDE CONFIG DIR: ~/.claude}/plugins/cache/omc/oh my claudecode/<version / , and the adjacent node hook fingerprints.json index. The index records SHA 256 fingerprints with exact stable release tag provenance for every shipped Node module under templates/hooks/ / .mjs , including hook helpers; search by payload path and inspect only that block rather than loading the entire index. If it is missing, malformed, or has no matching fingerprint, leave the entry for manual review. Preserve these additional trusted historical keyword detector.mjs fingerprints from commits not necessarily represented by a release tag: 22d612620f54f360797e42fe608bf7f98155b92a3b0bba187fd89e216395d65a ( fb125b37 ), 180fc09840baa8ada1661bcc5a13821c9ca802f43ac52cb4e517ca2cba75838a ( 387956a4 ), and 71a01806c1b0e29d8e553797de3900b7172654091980ae644d74e5e9291b8af2 ( 0b46a595 ).
Diagnosis :
If a direct command is verified as OMC owned and the active plugin provides the payload's canonical or specifically verified equivalent handler under the registration's event: CRITICAL duplicate legacy hook
If a composite or ambiguous command mentions a legacy path: WARN manual cleanup required; never remove it automatically
If the plugin is inactive, does not provide the event, or ownership cannot be verified: WARN standalone hook may be active or user owned; do not recommend removal
Step 3: Check for Legacy Bash Hook Scripts
Diagnosis :
If a listed script exists, call it a duplicate only when the active plugin provides the payload's canonical or specifically verified equivalent handler under the registration's event and the file matches a shipped payload or historical fingerprint; otherwise mark ownership as unknown or treat it as an active standalone hook.
Step 4: Check CLAUDE.md
First check whether CLAUDE.md management is disabled. Read ${CLAUDE CONFIG DIR: ~/.claude}/.omc config.json ; only an explicit "claudeMdEnabled": false disables it (missing file, missing key, or any other value means enabled).
Continue with the CLAUDE.md checks below only when the probe printed exactly CLAUDE.md management enabled .
If it prints CLAUDE.md management disabled by claudeMdEnabled: false , report that line as INFO, skip the rest of this step and the "Fix: Missing/Outdated CLAUDE.md" fix, and never create or overwrite CLAUDE.md or CLAUDE omc.md .
If it prints neither line, or the command fails (for example node is not on PATH , which Step 5 diagnoses), report WARN could not check the claudeMdEnabled opt out, skip the rest of this step and the "Fix: Missing/Outdated CLAUDE.md" fix, and never create or overwrite CLAUDE.md or CLAUDE omc.md .
Diagnosis :
If CLAUDE.md missing: CRITICAL CLAUDE.md not configured
If <! OMC:START found in CLAUDE.md: OK
If <! OMC:START found in a companion file (e.g. CLAUDE omc.md ): OK file split pattern detected
If no OMC markers in CLAUDE.md or any companion file: WARN outdated CLAUDE.md
If OMC:VERSION marker is missing f