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 agentmods add hooks/projectsidewalk/sidewalkwebpage/post-tool-usegit clone --depth 1 https://github.com/ProjectSidewalk/SidewalkWebpageWrote 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/projectsidewalk/sidewalkwebpage/post-tool-use)<a href="https://agentmods.dev/hooks/projectsidewalk/sidewalkwebpage/post-tool-use"><img src="https://agentmods.dev/badge/hooks/projectsidewalk/sidewalkwebpage/post-tool-use.svg" alt="Measured on agentmods" 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 3d 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 — 29 lines — stays where its author put it; the contents beside it link to each section on GitHub.
{
"PostToolUse": [
{
"matcher": "Write|Edit",
"hooks": [
{
"type": "command",
"command": "m=$(jq -r 'if ((.tool_input.file_path // \"\") | ascii_downcase | endswith(\".md\")) then empty else [.tool_input.new_string, .tool_input.content, (.tool_input.edits[]?.new_string)] | map(select(. != null)) | .[] end' 2>/dev/null | grep -niE '(^[[:space:]]*[*#]|//).*(used to|previously|formerly|replace[sd]? the old|renamed? (to|from)|no longer|was renamed)'); if [ -n \"$m\" ]; then jq -n --arg m \"$m\" '{decision:\"block\", reason:(\"A comment in this edit reads like changelog / what-the-code-USED-TO-do narration. CLAUDE.md bans this (do not describe what code used to do; use git history). Remove the historical framing; state only the current contract. Flagged:\\n\" + $m), systemMessage:\"comment-history hook: flagged a changelog-style comment\"}'; fi",
"statusMessage": "Checking for changelog-style comments"
},
{
"type": "command",
"command": "m=$(jq -r 'if ((.tool_input.file_path // \"\") | ascii_downcase | endswith(\".md\")) then empty else [.tool_input.new_string, .tool_input.content, (.tool_input.edits[]?.new_string)] | map(select(. != null)) | .[] end' 2>/dev/null | grep -niE '((^|[^:])//|^[[:space:]]*#)[[:space:]]*((checks? if)|((gets?|sets?|returns?) the)|((loops?|iterates?) (through|over))|((creates?|initializes?) (a|an|the))|((increments?|decrements?) the)|(calls? the)|((adds?|removes?) (a|an|the)))'); if [ -n \"$m\" ]; then jq -n --arg m \"$m\" '{decision:\"block\", reason:(\"A comment in this edit restates what the code does. CLAUDE.md requires comments to say WHY, not WHAT - identifiers already say what. Delete the comment, or rewrite it to give the reason, constraint, or non-obvious tradeoff. Only inline // and # comments are checked, so ScalaDoc/JSDoc summary lines are exempt. Flagged:\\n\" + $m), systemMessage:\"restate-comment hook: flagged a comment that restates the coWhat else settings.json configures
This page is one entry in a file that holds 3. 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.
- 3d ago First seen · 29 lines scan A 21699e7ac13b
PostToolUse is a hook published in the GitHub repository ProjectSidewalk/SidewalkWebpage (104 stars, last pushed 4d 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.
Other hooks, from other repositories
BeforeTool
Runs on the BeforeTool event for write_file and replace tool calls, executing enforce-edit-gate.py via python. From Community-Access/accessibility-agents.
SessionEnd
Runs when a session ends, executing session-end.py via python. From Community-Access/accessibility-agents.
PreToolUse
Runs before the agent uses a tool for Edit, Write and MultiEdit tool calls, executing protect-pbxproj.sh. From AssemblyAI/blurt.
PostToolUse
Runs after a tool call finishes for mcp__sh__ui_press, mcp__sh__browser_click, mcp__sh__click_with_fallback, mcp__sh__browser_fill_form and mcp__sh__type_with_fallback tool calls, running an inline shell check. From manushi4/Screenhand.
PostToolUse
Runs after a tool call finishes for Write and Edit tool calls, executing format_and_lint.sh. From supabase/supabase.
SessionStart
Runs when a session starts, executing on-start.js via node. From google-gemini/gemini-cli.