debug-hooks
Invoke to list or debug Claude Code or Copilot CLI hooks — "what hooks do I have", "is my hook firing", "why did that run twice". Merges every hook source (settings, plugins, Copilot) into one list. Not for git or pre-commit hooks.
- License 许可
- MIT
- 最近更新
- 2026-11-12
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- debug-hooks
- description
- Invoke to list or debug Claude Code or Copilot CLI hooks — "what hooks do I have", "is my hook firing", "why did that run twice". Merges every hook source (settings, plugins, Copilot) into one list. Not for git or pre-commit hooks.
- allowed-tools
- Read, Grep, Glob, Bash
- user-invocable
- true
02 资源文件 3
- 脚本scripts/debug-hooks450 B
- 脚本scripts/hooks_cli.py11.4 KB
- 脚本scripts/test_hooks_cli.py10.3 KB
03 SKILL.md 正文
Hooks
Read-only. Both Claude and Copilot merge hooks from several files at once, and neither host shows you the merged result — only the effect of it, in a running session. This skill answers "what hooks would fire right now, and from which file" without asking you to open five JSON files and merge them by hand.
Run the checker first
skill-tree debug-hooks # every hook, both hosts, grouped by event
skill-tree debug-hooks --claude # Claude only
skill-tree debug-hooks --copilot # Copilot only
skill-tree debug-hooks --json # machine-readable
skill-tree debug-hooks <project-root> # project/local settings from a different repo (default: cwd)
Exit is always 0 — this reports what exists, it doesn't grade it. A WARN: line at the top
means a source file exists but failed to parse (bad JSON); everything else still gets read.
Sources it reads
Claude, in the order Claude itself merges them:
~/.claude/settings.json— user settings<root>/.claude/settings.json— project settings<root>/.claude/settings.local.json— project-local, gitignored overrides/etc/claude-code/managed-settings.jsonor the macOS equivalent, if present — org-managed- Every plugin in
~/.claude/plugins/installed_plugins.jsonthat ships ahooks/hooks.json, read from its recordedinstallPath— this is how a plugin's own hooks show up, not just the ones a user hand-wrote into settings.
Copilot: every ~/.copilot/hooks/*.json file — Copilot has no merged settings file, one
file per plugin instead (install.sh --copilot writes skill-tree.json; another plugin writes
its own file alongside it).
Claude's schema nests hooks under a matcher ({event: [{matcher, hooks: [{type, command}]}]});
Copilot's is flat ({event: [{type, matcher?, bash, timeoutSec?}]}). Both are parsed and
reported in one list rather than forcing a read of two different shapes.
Reading the output
Entries are grouped by host, then by event. An event annotated (N sources) means N different
files register a hook for it — not necessarily a problem (e.g. this repo's own SessionStart
hooks and a user's atuin/dotfiles hooks coexist fine), but worth knowing before assuming only
one thing runs on that event. If a hook you expect isn't listed at all, it isn't wired up —
check the plugin's own hooks/hooks.json exists and is registered in installed_plugins.json
(Claude) or that install.sh --copilot has been run (Copilot).
This tool never executes a hook — probing whether one works means running it, which is a human decision, not this skill's.
04 同仓库更多 Skills
wait-what
Stop. Your plan/idea did not land. Re-pitch it.
verify
Verify before answering whether something works, still passes, is gone, is used, or is correct — and whenever the user says "can you confirm", "are you sure", "did that actually work", or reports something is "still" broken. Produces the answer plus the evidence that would have falsified it. A failed GitHub Actions run is skill-tree:debug-ci instead.
ui-designer
Design or restyle a web UI — landing pages, dashboards, docs sites, app chrome — or when the user asks why a site "looks generic", "looks like a template", or wants it to feel intentional. A running list of design lessons learned, applied as rules rather than suggestions.
two-axis-review
Two-axis review of changes since a fixed point (commit, tag, HEAD~N, or default HEAD~1): Standards (does the code follow this repo's conventions?) and Spec (does the code do what it should?). Axes run as parallel sub-agents so neither masks the other. Use when the user says "review against the spec", "does this follow our conventions", "standards and spec review", or "two-axis review". Not a correctness bug hunt — that's the built-in `/code-review`.
tui-screenshots
Use for generating or refreshing TUI screenshots for docs — "regenerate the screenshots", "the README screenshots are stale". Drives a Textual/TUI app headlessly and exports SVG. Not for reading a user's screenshot — that is `screenshot`.
to-tickets
Break a spec, plan, or conversation into tracer-bullet vertical-slice tickets with blocking edges — "turn this into tickets", "break this down", "what's the work?". Pairs with skill-tree:to-spec upstream and skill-tree:handoff downstream.