hook-guard/skills/hook-guard/SKILL.md
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.
npx skillsauth add musingfox/cc-plugins hook-guardInstall 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.
Dispatch by user intent:
If ambiguous: if .githooks/pre-commit exists and .claude/settings.local.json has hook-guard hooks → default to Doctor; otherwise → Setup.
Read references/settings.md for the user-override schema (.claude/hook-guard.local.md) — applies to all three modes.
Skip if the user only wants to edit existing hooks. If jj-native only (no .git/), abort — pre-commit hooks not supported.
references/detection.md. Collect: languages, toolchain, VCS, existing hooks, monorepo. If existing hooks found, ask merge / replace / abort..claude/hook-guard.local.md if present. Present summary grouped by: CC hooks (PostToolUse lint/format soft, PreToolUse test gate hard), pre-commit always-run (security / integrity / structure), pre-commit skippable (lint / format / test), commit-msg. Ask to confirm..githooks/pre-commit from references/pre-commit-checks.md — only enabled checks, real tool commands substituted. chmod +x..githooks/commit-msg from references/commit-msg.md if enabled. chmod +x..claude/settings.local.json — merge (not overwrite) hooks + env.CLAUDECODE=1 per references/cc-hooks.md.git config core.hooksPath .githooks..claude/*.local.md gitignored.git config core.hooksPath .githooks), mention Doctor / Update modes.Run all checks, present a status table (✓ / ✗ / ⚠ / ℹ), then offer auto-fix for FAIL/WARN.
git config core.hooksPath — must equal .githooks. Unset = FAIL. Other = WARN..githooks/pre-commit and (if conventional commits) .githooks/commit-msg: exist + executable..claude/settings.local.json — hooks.PostToolUse with Edit|Write matcher; hooks.PreToolUse with Bash matcher; env.CLAUDECODE == "1".command -v each.grep -q 'CLAUDECODE' .githooks/pre-commit. Missing = WARN..claude/hook-guard.local.md frontmatter (schema in references/settings.md); warn on unknown fields..githooks/pre-commit on current tree.Output ends with Result: N/M checks passed.
Remediation:
| Issue | Fix |
|---|---|
| core.hooksPath not set | git config core.hooksPath .githooks |
| Hook not executable | chmod +x .githooks/<file> |
| Tool missing | Suggest platform install |
| CLAUDECODE skip / CC hooks missing | Re-run Setup |
.githooks/pre-commit + hook-guard hooks in CC settings. Otherwise → Setup.references/detection.md; read overrides from .claude/hook-guard.local.md..githooks/pre-commit: replace only changed check-function bodies (canonical in references/pre-commit-checks.md); insert/remove checks in correct section; preserve structure, config vars, helpers..claude/settings.local.json: deep-merge; update only changed command strings; preserve unrelated settings.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.
development
Render markdown or Mermaid content as formatted HTML in the browser. Triggers when the user asks to view, render, or preview a document as HTML; when the user asks to visualize, diagram, chart, or draw architecture, flows, sequence/class/state/ER diagrams; when resolving plan files from ~/.claude/plans/; or proactively when about to output a table with 4+ rows or 3+ columns, a structured comparison, an audit, a feature matrix, or any formatted content exceeding ~50 lines in the terminal.