hook-guard/skills/doctor/SKILL.md
This skill should be used when the user asks to "check hooks", "diagnose hook issues", "verify hook setup", "run hook doctor", "hook health check", "troubleshoot hooks", "are my hooks working", "hook-guard doctor", "check pre-commit status", or wants to verify that their hook configuration is correct and complete. Inspects hook files, permissions, tool availability, and configuration integrity.
npx skillsauth add musingfox/cc-plugins hook-guard-doctorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Diagnose hook health: check all hook components are correctly installed and functional.
Run ALL of the following checks and present results as a status table.
# Check core.hooksPath
git config core.hooksPath
.githooks → OKCheck these files exist and are executable:
# Pre-commit hook
test -f .githooks/pre-commit && test -x .githooks/pre-commit
# Commit-msg hook (if conventional commits enabled)
test -f .githooks/commit-msg && test -x .githooks/commit-msg
For each file:
chmod +x)Read .claude/settings.local.json and check:
hooks.PostToolUse array exists with Edit/Write matcher → OK or MISSINGhooks.PreToolUse array exists with Bash matcher (test gate) → OK or MISSINGenv.CLAUDECODE is set to "1" → OK or MISSINGFor each tool referenced in the hooks, verify it's installed:
command -v <tool> &>/dev/null
Check all tools mentioned in:
Report: INSTALLED or MISSING for each tool.
Verify the pre-commit script contains CLAUDECODE skip logic:
grep -q 'CLAUDECODE' .githooks/pre-commit
Check for .claude/hook-guard.local.md (read skills/setup/references/settings.md for the expected schema):
If user wants a deeper check, offer to run:
# Dry run the pre-commit hook
.githooks/pre-commit
This runs all checks against the current working tree (not staged changes, since nothing is staged during doctor).
Present results as a table:
Hook Guard Doctor
═══════════════════════════════════════
core.hooksPath ✓ .githooks
.githooks/pre-commit ✓ exists, executable
.githooks/commit-msg ✓ exists, executable
CC hooks (PostToolUse) ✓ lint + format on Edit/Write
CC hooks (PreToolUse) ✓ test gate on commit
CC env.CLAUDECODE ✓ set
CLAUDECODE skip logic ✓ present in pre-commit
Tools:
ruff ✓ installed (0.9.x)
pytest ✓ installed
jq ✓ installed
python3 ✓ installed
Settings: ✓ .claude/hook-guard.local.md found
═══════════════════════════════════════
Result: 10/10 checks passed
Use ✓ for pass, ✗ for fail, ⚠ for warning, ℹ for info.
For each FAIL or WARN, suggest the fix:
| Issue | Fix |
|-------|-----|
| core.hooksPath not set | git config core.hooksPath .githooks |
| Hook not executable | chmod +x .githooks/pre-commit |
| Tool not installed | Suggest install command for the platform |
| CLAUDECODE skip missing | Re-run setup to regenerate |
| CC hooks missing | Re-run setup to regenerate |
Ask user if they want to auto-fix the issues found.
data-ai
Unified entry point for Obsidian daily-note captures and long-form notes. Triggers on "記一下 / log / 紀錄 / capture this / 寫到 journal" (→ cap mode) and "建立筆記 / new note / 寫一份筆記 / create a note on" (→ note mode). Also via `/obw:cap` and `/obw:note`. Requires `.obsidian.yaml`.
tools
Use the `gog` CLI to operate Google Workspace — Gmail (read/search/send/labels/drafts), Calendar (events/RSVP/freebusy/focus-time/out-of-office), and Drive (list/search/upload/ download/share/move). Triggers on any Gmail, inbox, email, calendar, agenda, meeting, schedule, RSVP, Drive, Google Doc/Sheet/Slides, file share, or upload/download request.
documentation
Interactively create .obsidian.yaml for a project and install starter templates (task / doc / adr) into the vault's Templates folder. Skips templates that already exist; never overwrites.
tools
Manage project hook-guard installation — set up, diagnose, or update Claude Code hooks, git pre-commit, and commit-msg scripts with security checks, code-quality gates, and CLAUDECODE skip logic. Triggers on "set up hooks", "configure pre-commit", "add linting hooks", "initialize hook-guard", "check hooks", "hook doctor", "verify hook setup", "troubleshoot hooks", "update hooks", "regenerate hooks", "sync hooks with current tools", or similar requests.