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 commands/alirezarezvani/claude-code-skill-factory/build-hookgit clone --depth 1 https://github.com/alirezarezvani/claude-code-skill-factoryWrote 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/commands/alirezarezvani/claude-code-skill-factory/build-hook)<a href="https://agentmods.dev/commands/alirezarezvani/claude-code-skill-factory/build-hook"><img src="https://agentmods.dev/badge/commands/alirezarezvani/claude-code-skill-factory/build-hook.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.00000 | $0.03082 |
| Opus 5 | $0.00000 | $0.01541 |
| Sonnet 5 | $0.00000 | $0.00616 |
| Haiku 4.5 | $0.00000 | $0.00308 |
Grade D, and why
build-hook scanned grade D with 2 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 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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
# Install to user level (~/.claude/settings.json) Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
- No dangerous commands (rm -rf, git push --force, etc.) How it starts
The opening of the file, as written. The whole thing — 556 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/build-hook - Build Custom Claude Code Hooks
Interactive guide for creating custom hooks with Q&A workflow and automatic validation.
Note: This command is also available as
/build hookfor consistency with other factories (skills, agents, prompts). Both work identically - use whichever you prefer!
- Consistent pattern:
/build hook(recommended)- Alias:
/build-hook(this command)
Usage
/build-hook
/build-hook notification
/build-hook formatting
/build-hook testing
/build-hook git
What This Command Does
Two Ways to Build Hooks:
1. Agent-Guided (Recommended for Beginners)
Without arguments (/build-hook):
- Invokes the hooks-guide agent for interactive Q&A
- Asks 5-7 straightforward questions about your hook needs
- Generates complete hook configuration with validation
- Creates README.md with installation guide
- Validates safety (no destructive ops, proper error handling)
- Saves to
generated-hooks/[hook-name]/
With argument (/build-hook [type]):
- Suggests hook template based on type
- Continues with interactive questions
- Customizes template for your needs
2. Direct CLI (Advanced Users)
Interactive Mode:
cd generated-skills/hook-factory
python3 hook_factory.py -i
- 7-question guided flow with smart defaults
- Comprehensive input validation
- Optional auto-install to user/project level
- Faster workflow for experienced users
Template Mode:
python3 hook_factory.py -t post_tool_use_format -l python
- Direct template generation
- Requires template knowledge
- Manual installation needed
Examples
Build Any Hook (Interactive)
/build-hook
Output:
Welcome to the Claude Code Hooks Factory! 🔧
I'll help you build a custom hook through 5-7 straightforward questions.
Hooks are workflow automation that run when events occur:
- SessionStart: Load context when Claude starts
- PostToolUse: Auto-format code after editing
- SubagentStop: Run tests when agents complete
- And 4 more event types...
Let's get started!
Question 1: What should this hook do?
Examples:
- Auto-format Python files
- Run tests automatically
- Send notifications
- Auto-commit to git
Your answer: ___
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 · 556 lines · 0 tokens per session scan D 475872e3d0be
build-hook is a command published in the GitHub repository alirezarezvani/claude-code-skill-factory (855 stars, last pushed 9mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,082 tokens. A static security scan graded it D with 2 findings (reads agent configuration directories, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
create-skill
Create an AI skill from any source (URL, repo, PDF, video, notebook, etc.).
sync-config
Sync a scraping config's URLs against the live documentation site.
statusbar-doctor
Run cs doctor to diagnose why the status bar isn't showing what you expect.
statusbar
Show current status-bar config and list available styles + themes.
docs-update
You are executing the /dogma:docs-update command. Your task is to synchronize documentation across README files and wiki articles, ensuring everything is up-to-date.
sanitize-git
You are executing the /dogma:sanitize-git command. Your task is to find and remove AI/Claude traces from git history and fix tracking issues where files that should be excluded are still being tracked.