Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/data-wise/craft/hooksnpx skills add Data-Wise/craft --skill hooksgit clone --depth 1 https://github.com/Data-Wise/craftWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00042 | $0.00451 |
| Opus 5 | $0.00021 | $0.00226 |
| Sonnet 5 | $0.00008 | $0.00090 |
| Haiku 4.5 | $0.00004 | $0.00045 |
Grade A, and why
hooks 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 yesterday.
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.
What it actually says
Hook Templates
Copy any block below into .claude/settings.json under the hooks key (merge, don't replace).
MkDocs --strict hook
Catches broken internal links and Jinja template errors on every Edit/Write to a docs file.
Surfaces CI failures locally before gh-deploy.
Install: merge into .claude/settings.json:
{
"hooks": {
"PostToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{
"type": "command",
"command": "[ -f mkdocs.yml ] && mkdocs build --strict 2>&1 | tail -8 || true"
}
]
}
]
}
}
Guard: [ -f mkdocs.yml ] makes this a no-op in non-MkDocs repos — safe to install globally.
What it catches:
- Broken
[text][ref]links and undefined[ref]:entries - Jinja2 template errors in
mkdocs.ymloroverrides/ - Missing nav pages (paths in
mkdocs.ymlthat don't exist on disk)
Cost: mkdocs build --strict takes ~2–5s for a medium site. Fires only on file writes, not reads.
How to add custom hooks
- Choose trigger:
PreToolUse(before) orPostToolUse(after) - Set
matcherto the tool names that should trigger (pipe-separated regex:"Edit|Write") - Write a shell
commandthat exits 0 to allow, non-zero to block (PreToolUse) or flag (PostToolUse) - Merge the JSON block into
.claude/settings.json— don't replace existing hooks
Reference: Claude Code hooks documentation
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.
- yesterday First seen · 53 lines · 42 tokens per session scan A 3b52c9b703d1
hooks is a skill published in the GitHub repository Data-Wise/craft (4 stars, last pushed 16d ago), licensed MIT. It adds 42 tokens to every session and 451 once invoked, about $0.0002 per session on Opus 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-08-31.
Other skills, from other repositories
github-actions-workflow
Scaffolds or audits a GitHub Actions CI/CD workflow for a project. Covers job structure, caching, secrets handling, concurrency groups, environment gates, and reusable workflows via workflowcall. Invoked when the user asks to set up CI, add a GitHub Actions workflow, improve pipeline performance, or share workflow…
specflow
Spec-driven development with executable contracts.
specflow-loop-selector
Selects the correct Specflow loop and forces a concrete run contract before work starts. Use when an agent is asked to start Specflow work, build a ticket, create/refine a PRD, investigate an existing product, run Gate D, choose between spec-build and feature-build, or "go find out about" Specflow loops. Compatible…
specflow-simulate
Simulates end-to-end usage of a Specflow story across multiple personas and divergent routes to discover gaps, edge cases, and unhandled branches BEFORE the story is built — then proposes each finding as a concrete story addition (new REQ, negative-path AC, Gherkin branch, or journey step). This is the high-value…
specflow-audit
Audits a Specflow story/ticket for spec-compliance and surgically uplifts it — adding only the missing executable contract sections (SQL/RLS, TypeScript interfaces, invariant codes, Gherkin, acceptance criteria, Definition of Done, data-testid coverage) — then runs a pre-flight gate that refuses to mark the ticket…
architecture-review
Conducts a comprehensive multi-perspective architecture review using ALL architecture team members. Use when the user requests "Start architecture review", "Full architecture review", "Review architecture for version X.Y.Z", "Conduct comprehensive review", or when they want assessment from multiple perspectives. Do…