dbatools: Skill for Claude Code

.claude/skills/hooks-doctor/SKILL.md

hooks-doctor is a skill for Claude Code from dataplat/dbatools. It costs 45 tokens per session (405 once invoked), scanned A, original, MIT.

A diagnostic guide for the automated checks, or hooks, used by this repository during coding sessions. It explains how to inspect installed tools, understand missing protections, and troubleshoot hook errors.

In plain words
What is it for?
Use it when repository hooks do nothing, report errors, or unexpectedly block changes.
Why use it?
It shows why a check may be absent or failing and gives the appropriate way to restore it without confusing a missing tool with a code problem.

Skill for Claude Code

Written for Claude Code: $CLAUDE_PROJECT_DIR variable. Also seen: reads .claude/ paths; mentions Claude Code; mentions Codex.

This is dataplat/dbatools's own configuration. It tells Claude Code how to work on dbatools itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything dbatools configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is bash .claude/hooks/hooks-doctor.sh.

About the project

dbatools is a PowerShell toolkit for automating SQL Server administration and moving SQL Server instances between environments. It is for database administrators who manage SQL Server systems and migrations.

dataplat/dbatools · 2,858 stars · on GitHub · dbatools.io

Reuse

Borrowing it

Nothing to install: this file belongs to dataplat/dbatools. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/dataplat/dbatools/development/.claude/skills/hooks-doctor/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/dataplat/dbatools

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for hooks-doctor

README.md
[![agentmods](https://agentmods.dev/badge/skills/dataplat/dbatools/hooks-doctor/github.svg)](https://agentmods.dev/skills/dataplat/dbatools/hooks-doctor)
Your own site
<a href="https://agentmods.dev/skills/dataplat/dbatools/hooks-doctor"><img src="https://agentmods.dev/badge/skills/dataplat/dbatools/hooks-doctor/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for hooks-doctor

Your own site · 80×15
<a href="https://agentmods.dev/skills/dataplat/dbatools/hooks-doctor"><img src="https://agentmods.dev/badge/skills/dataplat/dbatools/hooks-doctor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 405 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00045 $0.00405
Opus 5.5 $0.00018 $0.00162
Sonnet 5.5 $0.00009 $0.00081
Haiku 4.5 $0.00005 $0.00040

Measured 2mo ago against content hash 2112b5a650d0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

hooks-doctor scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/hooks-doctor/SKILL.md · 28 lines

What it actually says

Hooks Doctor

Run the diagnostic and interpret it for the user:

bash .claude/hooks/hooks-doctor.sh

Present the results conversationally:

  1. All OK — say the hook environment is fully functional and list the active gates (style validation, read-before-edit, destructive-command guard, registration/TODO/verify Stop gates, codex auto-review).
  2. Something MISSING — explain what that specific absence disables (the script prints it) and give the one-line install fix. Every hook fails open, so a missing tool never breaks the session — it just silently removes that protection.
  3. Hook errors in the transcript — if the user reports hook error messages, check:
    • Hook paths in .claude/settings.json must use "$CLAUDE_PROJECT_DIR" (hooks run in the session cwd, not the repo root — relative paths break)
    • Line endings: hook scripts must be LF (enforced via .gitattributes); CRLF causes bad interpreter on Linux
    • claude --debug hooks records each hook's exit code and stderr
  4. User wants to opt out — per-developer opt-outs, in increasing scope:
    • CLAUDE_CODEX_REVIEW=off / CLAUDE_STOP_VERIFY=off (env, per session)
    • STOP_GUARD_MAX_BLOCKS=1 to shrink blocking budgets
    • .claude/settings.local.json with {"disableAllHooks": true} (gitignored, personal)

Never suggest editing the checked-in .claude/settings.json to opt out — that changes the gates for every developer.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 28 lines · 45 tokens per session scan A 2112b5a650d0

Subscribe to this mod's changes

hooks-doctor is a skill published in the GitHub repository dataplat/dbatools (2,858 stars, last pushed 4d ago), licensed MIT. It adds 45 tokens to every session and 405 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

hooks-doctor compared with skills from other repositories

hooks-doctor next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
hooks-doctordataplat/dbatoolsSkill2.9k4d agoMITA45Claude Code
LifeOSHooksdanielmiessler/LifeOSSkill20kyesterdayMITA114Claude Code, Codex
Hermesdanielmiessler/LifeOSSkill20kyesterdayMITA0Claude Code, Codex
RootCauseAnalysisdanielmiessler/LifeOSSkill20kyesterdayMITA93Claude Code, Codex
oh-my-poshJanDeDobbeleer/oh-my-poshSkill24k2d agoMITA47Claude Code, Codex
conventional-commitJanDeDobbeleer/oh-my-poshSkill24k2d agoMITA26Claude Code, Codex
Vitalsdanielmiessler/LifeOSSkill20kyesterdayMITB129Claude Code, Codex