Stop

A stop hook that runs a shell command when the coding agent finishes a response. The command prints a session summary and checks for uncommitted changes in a Git repository.

In plain words
What is it for?
Use it to inspect the repository state at the end of an agent response and see which files may need review.
Why use it?
It gives a quick reminder to review changed files before committing. It also reports when Git is unavailable or there are no uncommitted changes.

Hook for Claude Code

Install

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.

agentmods
npx agentmods add hooks/khazp/vibe-coding-prompt-template/stop
Clone the repo
git clone --depth 1 https://github.com/KhazP/vibe-coding-prompt-template

Made for: Claude Code.

Per session not measured What this adds to a session before it is invoked.
When invoked not measured Not applicable: nothing here is loaded into a session.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Security

Grade A, and why

Stop 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 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

"command": "node -e \"console.log('\\n--- Session Summary ---'); const {execSync}=require('child_process'); try { const status=execSync('git status --porcelain',{encoding:'utf8'}); if(status.trim()) { console.log('Modifi
.claude/settings.json · 14 lines

What it actually says

{
  "Stop": [
    {
      "matcher": "",
      "hooks": [
        {
          "type": "command",
          "command": "node -e \"console.log('\\n--- Session Summary ---'); const {execSync}=require('child_process'); try { const status=execSync('git status --porcelain',{encoding:'utf8'}); if(status.trim()) { console.log('Modified files:'); console.log(status); console.log('Remember: Review changes before committing!'); } else { console.log('No uncommitted changes.'); } } catch(e) { console.log('Not a git repository or git not available.'); }\"",
          "timeout": 5000
        }
      ]
    }
  ]
}
Changes

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.

  1. 3d ago First seen · 14 lines scan A b1079077bda0

Subscribe to this mod's changes

Stop is a hook published in the GitHub repository KhazP/vibe-coding-prompt-template (3,027 stars, last pushed 12d 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.