Getting it into your agent
This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.
/plugin marketplace add Vibe-Marketer/plugins-and-skills/plugin install create-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/vibe-marketer/plugins-and-skills/create-hooks)<a href="https://agentmods.dev/skills/vibe-marketer/plugins-and-skills/create-hooks"><img src="https://agentmods.dev/badge/skills/vibe-marketer/plugins-and-skills/create-hooks.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.1 | $0.00121 | $0.01999 |
| Opus 5 | $0.00060 | $0.01000 |
| Sonnet 5 | $0.00024 | $0.00400 |
| Haiku 4.5 | $0.00012 | $0.00200 |
Grade C, and why
create-hooks 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 7d 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.
"prompt": "Check if this bash command is safe. Block destructive commands like rm -rf, git push --force, git reset --hard." How it starts
The opening of the file, as written. The whole thing — 219 lines — stays where its author put it; the contents beside it link to each section on GitHub.
<quick_start>
- Choose hook event (when it fires) and hook type (command or prompt)
- Create hooks config:
.claude/hooks.json(project),~/.claude/hooks.json(personal), orhooks/hooks.json(plugin) - Configure matcher pattern for which tools trigger the hook
- Write hook command or prompt
- Test with
claude --debug</quick_start>
<essential_principles> Prompt-based hooks (recommended) use LLM reasoning for context-aware decisions. They handle complex logic, natural language validation, and edge cases without bash scripting.
Command hooks execute deterministic shell commands. Use them for fast checks, logging, file operations, external tool integrations, and notifications.
Choose prompt hooks unless you need: speed (command hooks are faster), determinism (exact same behavior every time), or external tool execution (formatters, linters). </essential_principles>
| Event | When | Can Block? | Use For |
|---|---|---|---|
| PreToolUse | Before tool runs | Yes | Validation, modification, blocking |
| PostToolUse | After tool completes | No | Feedback, logging, formatting |
| UserPromptSubmit | User sends prompt | Yes | Context injection, prompt validation |
| Stop | Main agent stopping | Yes | Completeness verification |
| SubagentStop | Subagent stopping | Yes | Subagent task validation |
| SessionStart | Session begins | No | Context loading, env setup |
| SessionEnd | Session ends | No | Cleanup, state preservation |
| PreCompact | Before compaction | Yes | Preserve critical context |
| Notification | Claude needs input | No | Desktop notifications, alerts |
See references/hook-types.md for detailed input/output schemas per event. </step_1_choose_event>
<step_2_configure_matcher> Matchers filter which tools trigger the hook:
"matcher": "Bash" // Exact match
"matcher": "Write|Edit" // Multiple tools (regex OR)
"matcher": "Read|Write|Edit" // All file operations
"matcher": "mcp__.*" // All MCP tools
"matcher": "mcp__plugin_asana_.*" // Specific MCP server
"matcher": "mcp__.*__delete.*" // All MCP delete tools
"matcher": "*" // Wildcard (all tools)
No matcher = fires for all tools. Matchers are case-sensitive and use regex syntax.
See references/matchers.md for comprehensive patterns. </step_2_configure_matcher>
<step_3_write_hook> Prompt hook (LLM-evaluated):
{
"type": "prompt",
"prompt": "Evaluate if this tool use is appropriate. Check for [criteria]. Return 'approve' or 'block' with reason.",
"timeout": 30
}
Supported on: PreToolUse, Stop, SubagentStop, UserPromptSubmit
Command hook (shell execution):
{
"type": "command",
"command": "bash ${CLAUDE_PLUGIN_ROOT}/scripts/validate.sh",
"timeout": 60
}
Receives JSON via stdin, returns JSON via stdout.
Hook output for blocking events (PreToolUse):
{
"hookSpecificOutput": {
"permissionDecision": "allow|deny|ask",
"updatedInput": {"field": "modified_value"}
},
"systemMessage": "Explanation for Claude"
}
Hook output for Stop/SubagentStop:
{
"decision": "approve|block",
"reason": "Explanation"
}
Exit codes: 0 = success (stdout in transcript), 2 = blocking error (stderr fed to Claude). </step_3_write_hook>
<step_4_assemble_config>
Project/User hooks (.claude/hooks.json or ~/.claude/hooks.json):
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "prompt",
"prompt": "Check if this bash command is safe. Block destructive commands like rm -rf, git push --force, git reset --hard."
}
]
}
]
}
}
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.
- 7d ago First seen · 219 lines · 121 tokens per session scan C 549ed07e2197
create-hooks is a skill published in the GitHub repository Vibe-Marketer/plugins-and-skills (2 stars, last pushed 6mo ago), licensed MIT. It adds 121 tokens to every session and 1,999 once invoked, about $0.0006 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-31.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
local-ai-agents
Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…
next-cache-components-adoption
Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…
next-partial-prefetching-adoption
Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…
chronicle
Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…
babysit-pr
Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…