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/khaledsaeed18/dotclaude/create-hooknpx skills add KhaledSaeed18/dotclaude --skill create-hookgit clone --depth 1 https://github.com/KhaledSaeed18/dotclaudeWhat 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.00062 | $0.01200 |
| Opus 5 | $0.00031 | $0.00600 |
| Sonnet 5 | $0.00012 | $0.00240 |
| Haiku 4.5 | $0.00006 | $0.00120 |
Grade A, and why
create-hook 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 — 75 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Create a hook: a script Claude Code runs on a lifecycle event (before a tool, after a prompt, on stop, and so on). Make it do one deterministic thing, fail safe, and ship with documentation a user can paste into settings.json. Then regenerate the derived files and validate.
Source layout is hooks/<category>/<name>/HOOK.md plus the script. Hooks are folder-layout: the whole folder installs to .claude/hooks/<name>/, so the script and any helpers ride along. The category is the folder; registry.json and the README catalog are generated by pnpm gen. Never hand-edit generated files.
Hooks differ from skills, agents, and commands in one critical way: they are configuration, not a loadable file. The shadcn installer copies the script and HOOK.md but cannot edit a user's settings.json. So HOOK.md must document the exact settings block to add, and the hook is inert until the user adds it.
Hard rules: never break these
- Fail safe and non-blocking by default. Unless the hook's job is to block, swallow its own errors and exit
0so it can never interrupt or break a tool call or session. Exit2only when blocking is the intended behavior for that event. HOOK.mdmust document activation. Include the precisesettings.jsonblock, the event, the matcher, and the command line. Without it the hook does nothing after install.- Be safe with data. Hooks see tool inputs and outputs. Redact secret-looking fields and truncate large payloads before logging or sending anything.
- Zero or pinned dependencies. Prefer the language's standard library so the script runs anywhere it lands. State the runtime requirement.
nameis globally unique and equals the folder name, kebab-case.- Never hand-write
registry.jsonor the README catalog. Runpnpm gen. - No AI/co-author mentions anywhere in the hook or its output.
Step 1: Define the hook
- The one thing it does, in a sentence.
- The event it fires on and whether it needs a matcher (for example
PreToolUsematched toBash). Event list, matcher support, and the input/exit-code contract: reference/events.md. - Blocking or observing. Does it just record/notify (exit
0), or veto an action (exit2on the right event)?
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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 · 75 lines · 62 tokens per session scan A 28ded0c1a48a
create-hook is a skill published in the GitHub repository KhaledSaeed18/dotclaude (4 stars, last pushed 8d ago), licensed MIT. It adds 62 tokens to every session and 1,200 once invoked, about $0.0003 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
release
Cut a new playback-mcp release — version bump, changelog, dev-to-main PR, tag, and npm publish via CI. Use when asked to plan or ship a new release/version.
pr
Open a pull request from dev into main for this repo, following the repo's checklist and template. Use when asked to open/create a PR, or as part of the release flow.
pyenv-native
Manages Python runtimes and project venvs via pyenv-native and pyenv-mcp. Use when installing Python, fixing which-python/venv issues, setting .python-version, pip env problems on Windows/Linux/macOS, or when MCP pyenv-native tools are available.
rpg
Build and query semantic code graphs using RPG-Encoder. Use BEFORE grep/cat/find for any question about code structure, behavior, relationships, impact, dependencies, or cross-file patterns.
src
use when generating a doc the user will read and share — specs, roadmaps, pr explainers, research reports, plans, strategy docs. trigger words: "glyph," "spec," "roadmap," "explainer," "report," "plan," "save as a doc.".
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.