tool-hooks-doctor
Detect whether Claude Code evolution hooks are installed/enabled, and print a copy-paste fix. Use when you expect runs/evolution artifacts but nothing is being written. Triggers: hooks, evolution, runs/evolution, settings.json, PreToolUse, PostToolUse.
Best use case
tool-hooks-doctor is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Detect whether Claude Code evolution hooks are installed/enabled, and print a copy-paste fix. Use when you expect runs/evolution artifacts but nothing is being written. Triggers: hooks, evolution, runs/evolution, settings.json, PreToolUse, PostToolUse.
Teams using tool-hooks-doctor should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/tool-hooks-doctor/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How tool-hooks-doctor Compares
| Feature / Agent | tool-hooks-doctor | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Detect whether Claude Code evolution hooks are installed/enabled, and print a copy-paste fix. Use when you expect runs/evolution artifacts but nothing is being written. Triggers: hooks, evolution, runs/evolution, settings.json, PreToolUse, PostToolUse.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Hooks Doctor (Claude Code)
Goal: quickly verify whether **Claude Code hooks** for `skill-evolution` are installed and enabled.
This is an atomic diagnostic tool used by other workflows so they can warn early when the evolution loop is not active.
## Scope
- Applies to: Claude Code hook installation / configuration
- Does not apply to: Cursor/OpenCode/etc that do not support Claude-style hooks
## What "healthy" looks like
1) Hook scripts exist at:
- `~/.claude/skills/skill-evolution/hooks/`
2) Settings enable the hooks in either:
- Project settings: `<repo_root>/.claude/settings.json`
- Or global settings: `~/.claude/settings.json`
3) A session produces artifacts under:
- `<project_root>/runs/evolution/<run_id>/...`
## Check (read-only)
Run these checks and report status as: OK / PARTIAL / MISSING.
### 1) Are the hook scripts installed?
```bash
ls -la ~/.claude/skills/skill-evolution/hooks/ 2>/dev/null || true
```
Required files:
- `pre-tool.sh`
- `post-bash.sh`
- `post-tool.sh`
- `session-end.sh`
If missing: user must install/update the `skill-evolution` skill first.
### 2) Are hooks enabled in settings?
Check both locations:
```bash
test -f .claude/settings.json && echo "project settings: .claude/settings.json" || true
test -f ~/.claude/settings.json && echo "global settings: ~/.claude/settings.json" || true
grep -n "skill-evolution/hooks/pre-tool.sh" .claude/settings.json ~/.claude/settings.json 2>/dev/null || true
grep -n "skill-evolution/hooks/post-bash.sh" .claude/settings.json ~/.claude/settings.json 2>/dev/null || true
grep -n "skill-evolution/hooks/post-tool.sh" .claude/settings.json ~/.claude/settings.json 2>/dev/null || true
grep -n "skill-evolution/hooks/session-end.sh" .claude/settings.json ~/.claude/settings.json 2>/dev/null || true
```
Interpretation:
- If none of the grep checks match: hooks are not enabled.
- If only some match: configuration is PARTIAL and should be fixed.
### 3) Quick runtime smoke test (optional)
If user confirms, run a harmless bash command in the project and then check:
```bash
ls -la runs/evolution 2>/dev/null || true
```
## Fix (write; require confirmation)
If hooks are not enabled, recommend installing **project-level hooks** (safer than global).
Before applying, tell the user exactly which file will be written:
- Project-level: `<repo_root>/.claude/settings.json` (recommended)
- Global: `~/.claude/settings.json`
Then wait for explicit confirmation.
### Install project-level hooks (recommended)
```bash
python3 - <<'PY'
import json
from pathlib import Path
settings = Path('.claude') / 'settings.json'
settings.parent.mkdir(parents=True, exist_ok=True)
data = {}
if settings.exists():
data = json.loads(settings.read_text() or '{}')
if not isinstance(data, dict):
data = {}
hooks = data.get('hooks')
if not isinstance(hooks, dict):
hooks = {}
desired = {
'PreToolUse': [{
'matcher': 'Bash|Write|Edit',
'hooks': [{'type':'command','command':'bash ~/.claude/skills/skill-evolution/hooks/pre-tool.sh'}]
}],
'PostToolUse': [
{
'matcher': 'Bash',
'hooks': [{'type':'command','command':'bash ~/.claude/skills/skill-evolution/hooks/post-bash.sh "$TOOL_OUTPUT" "$EXIT_CODE"'}]
},
{
'matcher': 'Write|Edit',
'hooks': [{'type':'command','command':'bash ~/.claude/skills/skill-evolution/hooks/post-tool.sh "$TOOL_OUTPUT" "$EXIT_CODE"'}]
}
],
'Stop': [{
'matcher': '',
'hooks': [{'type':'command','command':'bash ~/.claude/skills/skill-evolution/hooks/session-end.sh'}]
}]
}
def has_command(arr, matcher, command):
for item in arr:
if not isinstance(item, dict):
continue
if item.get('matcher') != matcher:
continue
hs = item.get('hooks')
if not isinstance(hs, list):
continue
for h in hs:
if isinstance(h, dict) and h.get('command') == command:
return True
return False
for event, items in desired.items():
arr = hooks.get(event)
if not isinstance(arr, list):
arr = []
for it in items:
cmd = it['hooks'][0]['command']
if not has_command(arr, it['matcher'], cmd):
arr.append(it)
hooks[event] = arr
data['hooks'] = hooks
if settings.exists():
backup = settings.with_suffix(settings.suffix + '.bak')
backup.write_text(settings.read_text())
settings.write_text(json.dumps(data, indent=2, ensure_ascii=True) + '\n')
print('Installed hooks into:', settings)
PY
```
### Install global hooks (optional)
Same as above, but write to `~/.claude/settings.json`.Related Skills
tool-x-article-publisher
Publish Markdown to X (Twitter) Articles as a draft (never auto-publish). Use when the user asks to publish/post an article to X Articles, convert Markdown to X Articles rich text, or mentions "X article", "publish to X", "post to Twitter articles". Converts Markdown → HTML, pastes rich text, and inserts images deterministically.
tool-ui-ux-pro-max
Use when you need concrete UI/UX inputs (palette, typography, landing patterns, UX/a11y constraints) to drive design or review. Searchable UI/UX design intelligence (styles, palettes, typography, landing patterns, charts, UX/a11y guidelines + stack best practices) backed by CSV + a Python search script. Triggers: UIUX/uiux, UI/UX, UX design, UI design, design system, design spec, color palette, typography, layout, animation, accessibility/a11y, component styling. Actions: search, recommend, review, improve UI.
tool-systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes
tool-schema-markup
When the user wants to add, fix, or optimize schema markup and structured data on their site. Also use when the user mentions "schema markup," "structured data," "JSON-LD," "rich snippets," "schema.org," "FAQ schema," "product schema," "review schema," or "breadcrumb schema." For broader SEO issues, see review-seo-audit.
tool-programmatic-seo
When the user wants to create SEO-driven pages at scale using templates and data. Also use when the user mentions "programmatic SEO," "template pages," "pages at scale," "directory pages," "location pages," "[keyword] + [city] pages," "comparison pages," "integration pages," or "building many pages for SEO." For auditing existing SEO issues, see review-seo-audit.
tool-openclaw
Help users install, configure, and operate OpenClaw (gateway, channels, nodes, plugins). Use when answering OpenClaw setup/debug questions; use the local docs snapshot bundled with this skill as the source of truth. Triggers: openclaw, clawdbot, clawd, clawdhub, gateway, onboard, channels login, whatsapp, telegram, discord, mattermost, pairing, nodes, sandboxing, tailscale.
tool-design-style-selector
Use when you need to define or converge a project's visual direction. Scan project documentation to identify intent, then produce a design-system.md (either preserve existing style or pick from 30 presets). Triggers: design system, design spec, UI style, visual style, design tokens, color palette, typography, layout. Flow: scan → intent → (gate) preserve vs preset → deploy design-system.md after confirmation → (default) implement UI/UX per design-system.md (plan first, then execute).
tool-better-auth
Use when implementing authentication with Better Auth in a TypeScript/Next.js app (session strategy, providers, cookies, CSRF, redirects, middleware, and security best practices).
tool-ast-grep-rules
Write AST-based code search and rewrite rules using ast-grep YAML. Create linting rules, code modernizations, and API migrations with auto-fix. Use when the user mentions ast-grep, tree-sitter patterns, code search rules, lint rules with YAML, AST matching, or code refactoring patterns.
browser-tools
Interactive browser automation via Chrome DevTools Protocol. Use when you need to interact with web pages, test frontends, or when user interaction with a visible browser is required.
braiins-toolbox
Comprehensive Braiins Toolbox skill - batch management tool for Bitcoin mining operations with GUI and CLI for firmware, system, miner, tuner, and cooling management
lobe-cli-toolbox
LobeHub CLI Toolbox - AI-powered command-line tools including lobe-commit (ChatGPT Git commits with Gitmoji), lobe-i18n (automated internationalization), and lobe-label (GitHub label management)