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/vishnu2kmohan/mcp-server-langgraph/post-tool-usegit clone --depth 1 https://github.com/vishnu2kmohan/mcp-server-langgraphGrade 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 yesterday.
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 — 94 lines — stays where its author put it; the contents beside it link to each section on GitHub.
{
"PostToolUse": [
{
"matcher": "Edit(**src/**)",
"hooks": [
{
"type": "command",
"command": "echo '⚙️ Auto-formatting and linting...' && uv run ruff format --diff --quiet {{file_path}} 2>/dev/null && uv run ruff check --fix --quiet {{file_path}} 2>/dev/null || true",
"timeout": 10
}
]
},
{
"matcher": "Write(**src/**)",
"hooks": [
{
"type": "command",
"command": "echo '⚙️ Auto-formatting and linting...' && uv run ruff format --diff --quiet {{file_path}} 2>/dev/null && uv run ruff check --fix --quiet {{file_path}} 2>/dev/null || true",
"timeout": 10
}
]
},
{
"matcher": "Edit(**tests/**)",
"hooks": [
{
"type": "command",
"command": "echo '⚙️ Auto-formatting test code...' && uv run ruff format --diff --quiet {{file_path}} 2>/dev/null && uv run ruff check --fix --quiet {{file_path}} 2>/dev/null || true",
"timeout": 10
},
{
"type": "command",
"command": "if grep -q 'AsyncMock\\|MagicMock' {{file_path}} 2>/dev/null; then echo '⚠️ Memory Safety: AsyncMock/MagicMock detected. Ensure class has @pytest.mark.xdist_group and teardown_method with gc.collect()'; fi",
"timeout": 5
}
]
},
{
"matcher": "Write(**tests/**)",
"hooks": [
{
"type": "command",
"command": "echo '⚙️ Auto-formatting test code...' && uv run ruff format --diff --quiet {{file_path}} 2>/dev/null && uv run ruff check --fix --quiet {{file_path}} 2>/dev/null || true",
"timeout": 10
},
{
"type": "command",
"command": "if grep -q 'AsyncMock\\|MagicMock' {{file_path}} 2>/dev/null; then echo '⚠️ Memory Safety: AsyncMock/MagicMock detected. Ensure class has @pytest.mark.xdist_group and teardown_method with gc.collect()'; fi",
"timeout": 5
}
]
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.
- yesterday First seen · 94 lines scan A da48bd9d2b4c
PostToolUse is a hook published in the GitHub repository vishnu2kmohan/mcp-server-langgraph (4 stars, last pushed 8d 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-31.
Other hooks, from other repositories
PreToolUse
Runs before the agent uses a tool for Edit, Write and MultiEdit tool calls, running an inline shell check. From telepresenceio/telepresence.
PostToolUse
Runs after a tool call finishes for Edit, Write and MultiEdit tool calls, running an inline shell check. From telepresenceio/telepresence.
PostToolUse
Runs after a tool call finishes for Edit and Write tool calls, running an inline shell check (5 commands). From vinta/hal-9000.
UserPromptSubmit
Runs when you submit a prompt, before the agent sees it, executing hal-session-auto-rename.py via python3. From vinta/hal-9000.
UserPromptSubmit
Runs when you submit a prompt, before the agent sees it, executing user_prompt_submit.py and send_event.py via uv with --log-only, --store-last-prompt, --name-agent, --source-app, --event-type and --summarize (2 commands). From lroy-stack/ai-pod-store.
PreToolUse
Runs before the agent uses a tool, executing pre_tool_use.py and send_event.py via uv with --source-app, --event-type and --summarize (2 commands). From lroy-stack/ai-pod-store.