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/a-ariff/ariff-claude-plugins/hooks-referencenpx skills add a-ariff/ariff-claude-plugins --skill hooks-referencegit clone --depth 1 https://github.com/a-ariff/ariff-claude-pluginsWrote 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.
[](https://agentmods.dev/skills/a-ariff/ariff-claude-plugins/hooks-reference)<a href="https://agentmods.dev/skills/a-ariff/ariff-claude-plugins/hooks-reference"><img src="https://agentmods.dev/badge/skills/a-ariff/ariff-claude-plugins/hooks-reference.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00052 | $0.02451 |
| Opus 5 | $0.00026 | $0.01226 |
| Sonnet 5 | $0.00010 | $0.00490 |
| Haiku 4.5 | $0.00005 | $0.00245 |
Grade C, and why
hooks-reference scanned grade C with 1 finding 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 4d 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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
"rm -rf /" How it starts
The opening of the file, as written. The whole thing — 430 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Hooks Reference Skill
This skill provides comprehensive guidance for implementing Claude Code hooks - event handlers that automate validation, context loading, and workflow enforcement.
Hook Events Overview
| Event | When Triggered | Use Cases |
|---|---|---|
PreToolUse |
Before tool executes | Validate, block, modify |
PostToolUse |
After tool completes | Audit, react, verify |
PermissionRequest |
Permission dialog shown | Auto-allow, auto-deny |
Stop |
Claude finishes | Force continue, verify |
SubagentStop |
Subagent finishes | Verify task complete |
SessionStart |
Session begins | Load context, setup |
SessionEnd |
Session ends | Cleanup, save state |
UserPromptSubmit |
Prompt submitted | Validate, add context |
PreCompact |
Before compaction | Preserve info |
Notification |
Notification sent | Alert, log |
hooks.json Structure
Basic structure:
{
"description": "What these hooks do",
"hooks": {
"EventName": [
{
"matcher": "Pattern",
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/handler.sh",
"timeout": 30
}
]
}
]
}
}
Matcher Patterns
For tool events (PreToolUse, PostToolUse, PermissionRequest):
"Write"- Match exact tool name"Write|Edit"- Match multiple tools (regex)"Notebook.*"- Regex pattern"*"or""- Match all tools
For SessionStart:
"startup"- Initial startup"resume"- From --resume, --continue, /resume"clear"- From /clear"compact"- From auto/manual compact
For Notification:
"permission_prompt"- Permission requests"idle_prompt"- Claude waiting for input
Hook Types
Command Hooks (type: "command")
Execute a bash script:
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/validate.sh",
"timeout": 30
}
Prompt Hooks (type: "prompt")
LLM-based evaluation (Stop, SubagentStop only):
{
"type": "prompt",
"prompt": "Evaluate if Claude should stop: $ARGUMENTS. Check if all tasks are complete.",
"timeout": 30
}
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.
- 4d ago First seen · 430 lines · 52 tokens per session scan C 8766eed8bfff
hooks-reference is a skill published in the GitHub repository a-ariff/ariff-claude-plugins (14 stars, last pushed 5mo ago), licensed MIT. It adds 52 tokens to every session and 2,451 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
email-triage
Classify incoming emails into triage categories using content analysis, sender profile memory, and thread detection. Produces a category (URGENT, REPLYNEEDED, FYI, NEWSLETTER, NOTIFICATION, SPAM) with confidence and reasoning.
database-verification
Shell-based database connectivity and integrity checks. Verifies that databases are reachable, schemas match expectations, and data integrity constraints hold.
environment-diagnostics
Environment variable validation and configuration verification. Checks that required variables are set, config files parse correctly, ports are available, and system dependencies meet version requirements.
kubernetes
Diagnose and fix Kubernetes pods, services, networking, storage, and rollout failures with kubectl. Safety-first, read-only by default.
prompt-craft
Translate natural language image descriptions into detailed, structured DALL-E prompts with subject, style, composition, lighting, and mood specifications.
reply-composer
Draft context-aware email replies that match sender tone, reference thread history, and follow the user's style preferences. Presents drafts for review before sending.