hooks-reference

A reference for Claude Code hooks, which are automatic checks that run before or after tools such as file edits and shell commands.

In plain words
What is it for?
Use it to understand or change hook configuration, investigate blocked writes or commands, and maintain the project's coding and deployment checks.
Why use it?
It explains why a hook may block an action and what the project's checks do, including credential scanning, linting, deployment validation, and activity logging.

Skill for Claude CodeCodex

Install

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.

agentmods
npx agentmods add skills/wittyreference/twilio-claude-plugin/hooks-reference
Any agent
npx skills add wittyreference/twilio-claude-plugin --skill hooks-reference
Clone the repo
git clone --depth 1 https://github.com/wittyreference/twilio-claude-plugin

Made for: Claude Code, Codex.

Per session 10 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,393 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00010 $0.01393
Opus 5 $0.00005 $0.00696
Sonnet 5 $0.00002 $0.00279
Haiku 4.5 $0.00001 $0.00139

Measured 2d ago against content hash 393e34e57923, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

hooks-reference 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 2d 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.

skills/hooks-reference/SKILL.md · 115 lines

How it starts

The opening of the file, as written. The whole thing — 115 lines — stays where its author put it; the contents beside it link to each section on GitHub.


name: hooks-reference description: Reference for project hook configuration. Use when understanding pre/post tool hooks, modifying quality gates, or debugging why a hook blocked an action.

Claude Code Hooks Reference

This project uses Claude Code hooks (configured in .claude/settings.json) to enforce coding standards automatically.

Active Hooks

Hook Event Purpose
pre-write-validate.sh PreToolUse (Write/Edit) Blocks credentials, magic test numbers, learnings bulk-clear, worktree isolation; warns on naming
pre-bash-validate.sh PreToolUse (Bash) Blocks --no-verify, worktree commits, pending-actions, validates deploy
post-write.sh PostToolUse (Write/Edit) Auto-lints JS/TS files, tracks files to .session-files, increments tool-call counter
flywheel-doc-check.sh PostToolUse (Write/Edit) Suggests doc updates based on 4 sources (git status, commits, session-files, pattern-db)
post-bash.sh PostToolUse (Bash) Logs deploy/test completions, increments tool-call counter
subagent-log.sh SubagentStop Logs workflow activity, triggers flywheel
teammate-idle-check.sh TeammateIdle Quality gate before teammate goes idle
task-completed-check.sh TaskCompleted TDD/coverage/credential gate on task completion
session-checklist.sh Stop Warns about uncommitted changes, unpushed commits, stale learnings, MEMORY.md size
archive-plan.sh Stop Archives plan files with metadata
notify-ready.sh Stop Desktop notification when done
pre-compact.sh PreCompact Creates compaction marker for post-compact-summary
session-start-log.sh SessionStart (all) Logs session starts, 8 bootstrap checks (env, CLI, stale session, exercises, updates, context hub, codebase smoke test, MEMORY.md auto-prune), context loading, resets session tracking
post-compact-summary.sh SessionStart (compact) Extracts compaction summary from transcript
_meta-mode.sh (sourced by other hooks) Helper: detects .meta/ directory, sets environment-aware paths
flywheel-session-summary.sh (sourced by other hooks) Helper: generates session summary for flywheel processing

Read the full file on GitHub · 115 lines

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. 2d ago First seen · 115 lines · 10 tokens per session scan A 393e34e57923

Subscribe to this mod's changes

hooks-reference is a skill published in the GitHub repository wittyreference/twilio-claude-plugin (2 stars, last pushed 3mo ago), licensed MIT. It adds 10 tokens to every session and 1,393 once invoked, about $0.0001 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.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

agent-host-chat-contributions

Build and review cross-cutting agent-host chat behavior through lifecycle contributions. Use when adding turn lifecycle side effects, prompt or context injection, restored-history transformation, protocol-action observation, or when reviewing changes that add code to AgentSideEffects or AgentService.

microsoft/vscode · 56 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens