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/install-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/install-hook)<a href="https://agentmods.dev/commands/alirezarezvani/claude-code-skill-factory/install-hook"><img src="https://agentmods.dev/badge/commands/alirezarezvani/claude-code-skill-factory/install-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.01753 |
| Opus 5 | $0.00000 | $0.00877 |
| Sonnet 5 | $0.00000 | $0.00351 |
| Haiku 4.5 | $0.00000 | $0.00175 |
Grade D, and why
install-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.
- **User-level** (`~/.claude/settings.json`) - Applies to all projects Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
- ✅ No destructive operations (rm -rf, git push --force, etc.) How it starts
The opening of the file, as written. The whole thing — 340 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/install-hook - Install Generated Hook to Settings
Install a generated hook to Claude Code settings (user-level or project-level).
Usage
/install-hook generated-hooks/my-hook
/install-hook generated-hooks/my-hook user
/install-hook generated-hooks/my-hook project
What This Command Does
Installs hook.json configuration to:
- User-level (
~/.claude/settings.json) - Applies to all projects - Project-level (
.claude/settings.json) - Current project only
Installation process:
- ✅ Validates hook.json structure
- ✅ Checks for safety violations
- ✅ Backs up existing settings.json
- ✅ Merges with existing hooks (preserves other settings)
- ✅ Saves and displays confirmation
Examples
Install User-Level Hook (All Projects)
/install-hook generated-hooks/auto-format-python user
Performs:
- Reads
generated-hooks/auto-format-python/hook.json - Validates JSON structure and safety
- Creates backup:
~/.claude/settings.json.backup - Opens
~/.claude/settings.json - Adds hook to appropriate event type section
- Saves changes
Output:
Installing hook: auto-format-python
Location: User-level (~/.claude/settings.json)
✅ Hook validation PASSED
- JSON structure: Valid
- Safety checks: All passed
- Event type: PostToolUse
Creating backup...
✅ Backup created: ~/.claude/settings.json.backup
Installing to PostToolUse hooks...
✅ Hook installed successfully!
Event type: PostToolUse
Matcher: tool_names=["Write", "Edit"], paths=["**/*.py"]
Command: Auto-format Python with Black
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Next steps:
1. Restart Claude Code (required)
2. Test by editing a .py file
3. Verify hook runs automatically
To test:
claude --continue
> Edit any Python file
> Check if Black formatting runs
Install Project-Level Hook (Current Project Only)
/install-hook generated-hooks/test-runner project
Installs to: .claude/settings.json (current project)
Output:
Installing hook: test-runner
Location: Project-level (.claude/settings.json)
✅ Hook validation PASSED
✅ Backup created: .claude/settings.json.backup
✅ Hook installed successfully!
Event type: SubagentStop
Matcher: (empty - runs for all agents)
Command: Run pytest after agent completes
This hook will only run in this project.
Next steps:
1. Restart Claude Code
2. Run any Task agent
3. Hook will automatically run tests when agent completes
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 · 340 lines · 0 tokens per session scan D 7b5b0ec6e0a1
install-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 1,753 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.