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/yurukusa/claude-code-hooks/setupnpx skills add yurukusa/claude-code-hooks --skill setupgit clone --depth 1 https://github.com/yurukusa/claude-code-hooksWhat 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.00025 | $0.00601 |
| Opus 5 | $0.00013 | $0.00300 |
| Sonnet 5 | $0.00005 | $0.00120 |
| Haiku 4.5 | $0.00003 | $0.00060 |
Grade A, and why
setup 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.
How it starts
The opening of the file, as written. The whole thing — 51 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Claude Code Hooks Setup
You are helping the user set up production safety hooks for Claude Code.
Available Hooks
| Hook | Purpose | Event | Matcher |
|---|---|---|---|
| context-monitor.sh | Context window warnings (40% → 25% → 20% → 15%) | PostToolUse | all |
| activity-logger.sh | JSONL audit trail of file changes | PostToolUse | Edit|Write |
| syntax-check.sh | Auto syntax validation after edits | PostToolUse | Edit|Write |
| decision-warn.sh | Alerts on edits to sensitive paths | PreToolUse | Edit|Write |
| cdp-safety-check.sh | Blocks raw WebSocket CDP construction | PreToolUse | Bash |
| proof-log-session.sh | 5W1H session summaries | Stop, PreCompact | all |
| session-start-marker.sh | Records session start time | PostToolUse | all |
| no-ask-human.sh | Blocks questions during autonomous operation | PostToolUse | all |
| branch-guard.sh | Blocks pushes to main/master | PreToolUse | Bash |
| error-gate.sh | Blocks external actions when errors exist | PreToolUse | Bash |
Setup Profiles
Minimal (recommended for beginners)
- context-monitor.sh + syntax-check.sh
- Catches the two most common failure modes
Standard (recommended for most users)
- All of minimal + activity-logger.sh + branch-guard.sh + decision-warn.sh + proof-log-session.sh + session-start-marker.sh
- Good balance of safety and visibility
Autonomous (for unattended operation)
- All hooks enabled including no-ask-human.sh and error-gate.sh
- Maximum safety for headless/autonomous Claude Code sessions
Steps
- Ask which profile the user wants (or let them pick individual hooks)
- The plugin's hooks.json already configures the autonomous profile by default
- Help configure environment variables if needed:
CC_CONTEXT_MISSION_FILE— path to mission.md (default:$HOME/mission.md)CC_ACTIVITY_LOG— path to activity log (default:$HOME/claude-activity-log.jsonl)CC_MONITORED_DIRS— colon-separated paths for decision-warn (default:$HOME/bin:$HOME/.claude/hooks)CC_PROTECT_BRANCHES— colon-separated branch names (default:main:master)CC_ERROR_LOG— path to error tracker (default:$HOME/.claude/error-tracker.log)CC_PROOF_LOG_DIR— path to proof logs (default:$HOME/proof-log)
- Verify the setup works by running a quick test
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.
- 2d ago First seen · 51 lines · 25 tokens per session scan A cb4543000205
setup is a skill published in the GitHub repository yurukusa/claude-code-hooks (19 stars, last pushed 4d ago), licensed MIT. It adds 25 tokens to every session and 601 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-30.
Other skills, from other repositories
ponytail
Native Lean quality bar: no code → reuse → stdlib → platform → installed dep → one line → minimum. Split recovery, neighbor match, types, trust floors. Use when writing app code or when thin ponytail.mdc points here.
complexity
Wire and satisfy cyclomatic complexity lint. Detect the repo's existing linter, set or keep a cap (default 10), extract until green, never disable the rule. Use when complexity.mdc globs match, lint reports C901/complexity, or the user asks for simpler / less nested code.
premium-ui-craft
Ships Linear/Stripe/Apple-grade UI craft: type hierarchy, color restraint, microstates, hairlines, designed motion, empty/error/focus. Use when Mario @mentions @Design, when Product Designer runs, or when UI looks generic SaaS, cramped, or over-decorated (dashboards, sidebars, shadcn, Tailwind, CSS tokens).
debugging
Debugs difficult, intermittent, cross-layer, or regression bugs evidence before fixes. Use when the cause is unknown, normal debugging stalled, or the user asks to hunt, diagnose, or root-cause a bug.
landing-page-design
Elaya landing-page system: one offer, conversion structure, type scale, spacing tokens, nested radius, no Inter/lorem, Phosphor icons, 700ms motion. Use for marketing sites, landing pages, campaign pages. Product apps defer to premium-ui-craft. Upstream https://github.com/elayadesign/ai-design-skills.
redesign-existing-projects
Elaya audit for existing sites/apps that look generic, cheap, or AI-made. Diagnose first, then fix in place (fonts, color, states, layout, motion). Use when Mario says polish, audit, upgrade, or it looks horrible. Product apps apply diagnosis through premium-ui-craft values, not Elaya black/Geist/700ms. Upstream…