Borrowing it
Nothing to install: this file belongs to PJuniszewski/cook. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/PJuniszewski/cook/main/.claude/hooks/hooks.jsongit clone --depth 1 https://github.com/PJuniszewski/cookWrote 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/pjuniszewski/cook/post-tool-use)<a href="https://agentmods.dev/hooks/pjuniszewski/cook/post-tool-use"><img src="https://agentmods.dev/badge/hooks/pjuniszewski/cook/post-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/pjuniszewski/cook/post-tool-use"><img src="https://agentmods.dev/badge/hooks/pjuniszewski/cook/post-tool-use.svg" alt="Reviewed on agentmods" width="80" height="20"></a>Grade A, and why
PostToolUse 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 3mo 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.
How it starts
The opening of the file, as written. The whole thing — 47 lines — stays where its author put it; the contents beside it link to each section on GitHub.
{
"PostToolUse": [
{
"matcher": {
"toolName": "Write"
},
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/.claude/hooks/cook-owner.sh"
}
]
},
{
"matcher": {
"toolName": "Bash",
"toolInput": {
"command": {
"contains": "gh pr merge"
}
}
},
"hooks": [
{
"type": "prompt",
"prompt": "SURPRISE SANITATION INSPECTION TRIGGER (GitHub)\n\nA GitHub PR was just merged. Check if it warrants a surprise sanitation inspection.\n\n**Trigger patterns (check merged files):**\n- `auth/`, `permissions/`, `crypto/` - authentication/authorization changes\n- `schema/`, `migrations/`, `storage/` - database changes\n- `api/` (public contracts) - breaking change risk\n- `payment/`, `billing/`, `subscription/` - financial risk\n- Large PRs (>300 lines changed)\n- Files flagged as high-risk in any recent cook artifact pre-mortem\n\n**To check:**\n1. Run `gh pr view --json files,additions,deletions` to get PR details\n2. Check if any files match trigger patterns\n3. Check if additions+deletions > 300\n\n**If trigger matches:**\n1. Find the associated cook artifact (look in cook/ for matching feature)\n2. Announce: \"🧹 SANITATION INSPECTION! The inspector has arrived for a surprise visit...\"\n3. Run the /juni:inspect command with --surprise flag\n\n**If no trigger matches:**\n- Allow the merge silently, no action needed\n\n**IMPORTANT:** Only trigger inspection if a cook artifact exists for this feature. If no artifact, skip inspection."
}
]
},
{
"matcher": {
"toolName": "Bash",
"toolInput": {
"command": {
"contains": "glab mr merge"
}
}
},
"hooks": [
{
"type": "prompt",
"prompt": "SURPRISE SANITATION INSPECTION TRIGGER (GitLab)\n\nA GitLab MR was just merged. Check if it warWhat else hooks.json configures
This page is one entry in a file that holds 2. 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.
- 3mo ago First seen · 47 lines scan A 32c4b3fa8b5c
PostToolUse is a hook published in the GitHub repository PJuniszewski/cook (13 stars, last pushed 9mo ago), 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.
PostToolUse compared with hooks from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| PostToolUsePJuniszewski/cook | Hook | 13 | 9mo ago | MIT | A | — | Claude Code |
| SessionStartsupabase/supabase | Hook | 116k | today | Apache-2.0 | A | — | Claude Code |
| PostToolUsesupabase/supabase | Hook | 116k | today | Apache-2.0 | A | — | Claude Code |
| SessionStartgoogle-gemini/gemini-cli | Hook | 109k | today | Apache-2.0 | A | — | Claude Code |
| PreToolUseapache/superset | Hook | 76k | today | Apache-2.0 | A | — | Claude Code |
| PreToolUseheygen-com/hyperframes | Hook | 93k | yesterday | Apache-2.0 | A | — | Claude Code |
| PostToolUseanthropics/claude-plugins-official | Hook | 49k | today | Apache-2.0 | A | — | Claude Code |