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 skills add vasilyu1983/AI-Agents-public --skill agents-hooksgit clone --depth 1 https://github.com/vasilyu1983/AI-Agents-publicWrote 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/vasilyu1983/ai-agents-public/agents-hooks)<a href="https://agentmods.dev/skills/vasilyu1983/ai-agents-public/agents-hooks"><img src="https://agentmods.dev/badge/skills/vasilyu1983/ai-agents-public/agents-hooks/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/vasilyu1983/ai-agents-public/agents-hooks"><img src="https://agentmods.dev/badge/skills/vasilyu1983/ai-agents-public/agents-hooks.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 8 findings, up to high
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- high Agent Snooping · line 13 Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.Fix: Remove all code or instructions that access agent configuration directories (.claude/, .codex/, .gemini/). If configuration values are needed, pass them explicitly as parameters or environment variabl
- high Tool Misuse · line 73 Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
- high Tool Misuse · line 105 Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
- high Tool Misuse · line 105 Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
- high Agent Snooping · line 115 Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.Fix: Remove all code or instructions that access agent configuration directories (.claude/, .codex/, .gemini/). If configuration values are needed, pass them explicitly as parameters or environment variabl
- high Agent Snooping · line 202 Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.Fix: Remove all code or instructions that access agent configuration directories (.claude/, .codex/, .gemini/). If configuration values are needed, pass them explicitly as parameters or environment variabl
- high Agent Snooping · line 273 Skill reads from agent configuration directories (.claude/, .codex/, .gemini/). These directories may contain API keys, personal settings, and other credentials that the skill has no legitimate need to access.Fix: Remove all code or instructions that access agent configuration directories (.claude/, .codex/, .gemini/). If configuration values are needed, pass them explicitly as parameters or environment variabl
- medium MCP Rug Pull · line 340 npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.Fix: Pin the version: npx @scope/[email protected]
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.00037 | $0.05907 |
| Opus 5 | $0.00018 | $0.02953 |
| Sonnet 5 | $0.00007 | $0.01181 |
| Haiku 4.5 | $0.00004 | $0.00591 |
Grade B, and why
agents-hooks scanned grade B 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 12d 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 directorieslowAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
Claude and Codex are not equivalent here. Claude has a broad, stable hook system (31 events, re-verified against official docs 2026-08-15). Codex has two surfaces: the long-stable notification surface (`notify` + `tui.no Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.
Recursive force deletemediumDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
| Block `rm -rf`, `git push --force`, `git add .` before they run | `PreToolUse` (matcher `Bash`) | `command` | [`references/hook-templates.md`](references/hook-templates.md), patterns §8/§11 | Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.
How it starts
The opening of the file, as written. The whole thing — 419 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Claude Code Hooks + Codex Notifications
Use this skill when hook behavior is the main concern: Claude lifecycle hooks, runtime preflight, guardrails, async verification, worktree lifecycle checks, subagent coordination, or Codex notification callbacks.
Claude and Codex are not equivalent here. Claude has a broad, stable hook system (31 events, re-verified against official docs 2026-08-15). Codex has two surfaces: the long-stable notification surface (notify + tui.notifications), and a newer lifecycle-hooks system (hooks.json with events including SessionStart, UserPromptSubmit, SubagentStop, Stop, PreCompact/PostCompact — see developers.openai.com/codex/hooks). The Codex hooks system is less mature than Claude's and has known firing-reliability gaps (e.g. codex#17532: repo-local .codex/config.toml hooks may not fire in interactive sessions). Prefer notify for anything that must be dependable; treat Codex hooks.json as usable-but-verify and confirm it fires on your runtime before relying on it.
Quick Reference
| Need | Event / Approach |
|---|---|
| enforce pre-tool policy or guardrails | PreToolUse command hook |
| fast runtime checks at session start | SessionStart or Setup |
| react to user prompt before Claude sees it | UserPromptSubmit |
| run checks after edits (non-blocking) | PostToolUse (async/background) |
| catch tool failures separately | PostToolUseFailure |
| check after a full batch of parallel tool calls | PostToolBatch |
| inject context into or coordinate subagents | SubagentStart / SubagentStop |
| transform what the user sees (not the transcript) | MessageDisplay |
| persist compact durable state before compaction | PreCompact |
| react after compaction completes | PostCompact |
| handle worktree setup and teardown | WorktreeCreate / WorktreeRemove |
react to cd or watched file changes |
CwdChanged / FileChanged |
| keep agent team from going idle | TeammateIdle |
| handle API errors at turn end | StopFailure |
| reload plugin hooks safely | atomic clear-then-register swap |
| add Codex callback behavior | notify external program plus tui.notifications |
| enforce budgets, iteration caps, stagnation, kill-switches | references/budget-and-loop-hooks.md |
What ships with it
11 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.
- agents/openai.yaml 353 B
- assets/template-preflight-runtime-hook.sh 1.0 KB runs code
- data/sources.json 6.7 KB
- learnings.consolidated.md 588 B
- learnings.md 2.5 KB
- references/budget-and-loop-hooks.md 15 KB
- references/hook-patterns.md 10 KB
- references/hook-security.md 9.2 KB
- references/hook-templates.md 21 KB
- references/runtime-preflight-hooks.md 1.0 KB
- references/scenario-preflight-chain.md 7.9 KB
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.
- 12d ago First seen · 419 lines · 37 tokens per session scan B 982aca81778c
agents-hooks is a skill published in the GitHub repository vasilyu1983/AI-Agents-public (87 stars, last pushed 10d ago), licensed MIT. It adds 37 tokens to every session and 5,907 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B 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 skills, from other repositories
nft-standards
Implement NFT standards (ERC-721, ERC-1155) with proper metadata handling, minting strategies, and marketplace integration. Use when creating NFT contracts, building NFT marketplaces, or implementing digital asset systems.
istio-traffic-management
Configure Istio traffic management including routing, load balancing, circuit breakers, and canary deployments. Use when implementing service mesh traffic policies, progressive delivery, or resilience patterns.
projection-patterns
Build read models and projections from event streams. Use when implementing CQRS read sides, building materialized views, or optimizing query performance in event-sourced systems.
microservices-patterns
Design microservices architectures with service boundaries, event-driven communication, and resilience patterns. Use when building distributed systems, decomposing monoliths, or implementing microservices.
track-management
Use this skill when creating, managing, or working with Conductor tracks - the logical work units for features, bugs, and refactors. Applies to spec.md, plan.md, and track lifecycle operations.
make-pr-easy-to-review
Prepare PRs for review by cleaning noisy history, improving PR descriptions, and adding reviewer guidance without changing code behavior. Use for "make this easy to review", "tidy this PR", "clean up commits", or "annotate the diff".