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.
git clone --depth 1 https://github.com/Jamkris/everything-gemini-codeWrote 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/jamkris/everything-gemini-code/after-tool)<a href="https://agentmods.dev/hooks/jamkris/everything-gemini-code/after-tool"><img src="https://agentmods.dev/badge/hooks/jamkris/everything-gemini-code/after-tool/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/jamkris/everything-gemini-code/after-tool"><img src="https://agentmods.dev/badge/hooks/jamkris/everything-gemini-code/after-tool.svg" alt="Reviewed on agentmods" width="80" height="20"></a>Grade A, and why
AfterTool scanned grade A 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 1mo 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.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
"command": "node -e \"const{execFileSync}=require('child_process');const fs=require('fs');let d='';process.stdin.on('data',c=>d+=c);process.stdin.on('end',()=>{const i=JSON.parse(d);const p=i.tool_input?.file_path;if(p&& Copies of this mod
2 near-identical copies found in the catalogue:
- PostToolUse — 91% identical, 12 lines differ
- PostToolUse — 86% identical, 30 lines differ
How it starts
The opening of the file, as written. The whole thing — 56 lines — stays where its author put it; the contents beside it link to each section on GitHub.
{
"AfterTool": [
{
"matcher": "tool == \"run_shell_command\"",
"hooks": [
{
"type": "command",
"command": "node -e \"let d='';process.stdin.on('data',c=>d+=c);process.stdin.on('end',()=>{const i=JSON.parse(d);const cmd=i.tool_input?.command||'';if(/gh pr create/.test(cmd)){const out=i.tool_output?.output||'';const m=out.match(/https:\\/\\/github.com\\/[^/]+\\/[^/]+\\/pull\\/\\d+/);if(m){console.error('[Hook] PR created: '+m[0]);const repo=m[0].replace(/https:\\/\\/github.com\\/([^/]+\\/[^/]+)\\/pull\\/\\d+/,'$1');const pr=m[0].replace(/.*\\/pull\\/(\\d+)/,'$1');console.error('[Hook] To review: gh pr review '+pr+' --repo '+repo)}}console.log(d)})\""
}
],
"description": "Log PR URL and provide review command after PR creation"
},
{
"matcher": "tool == \"run_shell_command\" && tool_input.command matches \"^\\\\s*(npm run build|pnpm (run )?build|yarn (run )?build|bun (run )?build)\\\\b\"",
"hooks": [
{
"type": "command",
"command": "node -e \"let d='';process.stdin.on('data',c=>d+=c);process.stdin.on('end',()=>{console.error('[Hook] Build completed - async analysis running in background');console.log(d)})\"",
"async": true,
"timeout": 30
}
],
"description": "Example: async hook for build analysis (runs in background without blocking)"
},
{
"matcher": "tool == \"edit_file\" && tool_input.file_path matches \"\\\\.(ts|tsx|js|jsx)$\"",
"hooks": [
{
"type": "command",
"command": "node -e \"const{execFileSync}=require('child_process');const fs=require('fs');let d='';process.stdin.on('data',c=>d+=c);process.stdin.on('end',()=>{const i=JSON.parse(d);const p=i.tool_input?.file_path;if(p&&fs.existsSync(p)){try{execFileSync('npx',['prettier','--write',p],{stdio:['pipe','pipe','pipe']})}catch(e){}}console.log(d)})\""
}
],
"description": "Auto-format JS/TS files wiWhat 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.
- 1mo ago First seen · 56 lines scan A a2cb2ddaeea7
AfterTool is a hook published in the GitHub repository Jamkris/everything-gemini-code (89 stars, last pushed 4mo 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 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other hooks, from other repositories
AfterAgent
Runs on the AfterAgent event, executing hook-runner.cjs via node. From djinn-soul/gemini-mem.
BeforeAgent
Runs on the BeforeAgent event, executing hook-runner.cjs via node. From djinn-soul/gemini-mem.
BeforeTool
Runs on the BeforeTool event, executing inject-time.js via node. From kongyo2/gemini-time-injector.
AfterTool
Runs on the AfterTool event, executing inject-time.js via node. From kongyo2/gemini-time-injector.
AfterAgent
Runs on the AfterAgent event, executing inject-time.js via node. From kongyo2/gemini-time-injector.
SessionStart
Runs when a session starts on startup, executing install_pkgs.sh. From supabase/supabase.