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 JeongJaeSoon/agent-guard/plugin install agent-guardWrote 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/hooks/jeongjaesoon/agent-guard/pre-tool-use)<a href="https://agentmods.dev/hooks/jeongjaesoon/agent-guard/pre-tool-use"><img src="https://agentmods.dev/badge/hooks/jeongjaesoon/agent-guard/pre-tool-use/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/hooks/jeongjaesoon/agent-guard/pre-tool-use"><img src="https://agentmods.dev/badge/hooks/jeongjaesoon/agent-guard/pre-tool-use.svg" alt="Reviewed on agentmods" width="80" height="20"></a>Grade A, and why
PreToolUse 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 8d ago.
A static scan of the commands this hook runs, not an audit. A hook is shell that executes on your machine at the event it names, which is why every command in it is printed with what was found.
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.
Copies of this mod
4 near-identical copies found in the catalogue:
- SessionStart — 91% identical, 11 lines differ
- PostToolUse — 91% identical, 11 lines differ
- UserPromptSubmit — 84% identical, 11 lines differ
- Stop — 81% identical, 11 lines differ
What it actually says
{
"PreToolUse": [
{
"matcher": "Write|Edit|MultiEdit|NotebookEdit|Read|NotebookRead|Grep|Glob|Bash|WebFetch|WebSearch|apply_patch|Agent|Task|mcp__.*",
"hooks": [
{
"type": "command",
"command": "sh -c 'r=${CLAUDE_PLUGIN_ROOT:-}; [ -n \"$r\" ] && for q in \"$r\" \"${r%/*}/current\" \"${r%/*}\"/[0-9]*.[0-9]*.[0-9]*; do [ -f \"$q/hooks/launch.sh\" ] && exec sh \"$q/hooks/launch.sh\" claude hook-pre-tool \"$r\"; done; while read -r l; do :; done; m=${AGENT_GUARD_INFRA_FAILURE_MODE:-}; case $m:hook-pre-tool in open:*|closed:*) ;; *:hook-s*) m=open ;; *) m=unset ;; esac; a=blocking; [ $m = open ] && a=continuing; echo \"agent-guard: CLAUDE_PLUGIN_ROOT env not set or no hook launcher was found; $a because AGENT_GUARD_INFRA_FAILURE_MODE=$m\" >&2; [ $m = open ] && exit 0; exit 2'",
"timeout": 60,
"statusMessage": "agent-guard: checking tool call",
"onFailure": "block"
}
]
}
]
}What else hooks.json configures
This page is one entry in a file that holds 6. Installing the file brings all of them; each is measured and scanned on its own page.
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.
- 8d ago Changed 6dfb07c6e59b
- 14d ago Changed c911fe79e310
- 16d ago Changed · +1 lines d13412e76705
- 1mo ago Changed · +1 lines e7259fad31c5
- 1mo ago Changed a89839d194fa
- 2mo ago Changed bdf0abdd7a60
- 3mo ago First seen · 14 lines scan A 55608b165c17
PreToolUse is a hook published in the GitHub repository JeongJaeSoon/agent-guard (47 stars, last pushed today), licensed MIT. Its token cost is not measured: a hook is shell that never enters the context. 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-30.
PreToolUse compared with hooks from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| PreToolUseJeongJaeSoon/agent-guard | Hook | 47 | today | MIT | A | — | Claude Code |
| PostToolUsenikolaypaskov/claudeconf-plugin | Hook | 3 | 4d ago | MIT | A | — | Claude Code |
| SessionStartnikolaypaskov/claudeconf-plugin | Hook | 3 | 4d ago | MIT | A | — | Claude Code |
| CwdChangedNova-Violet-Role/RoT-MoE | Hook | 2 | 1mo ago | AGPL-3.0 | A | — | Claude Code |
| Notificationprime-radiant-inc/claude-plugin-cxdb-integration | Hook | 5 | 5mo ago | none | A | — | Claude Code |
| Stopspeson/not-my-reforge | Hook | 2 | 8mo ago | none | A | — | Claude Code |
| SessionStartsupabase/supabase | Hook | 116k | today | Apache-2.0 | A | — | Claude Code |