| guard-shell.json | PreToolUse shell | Blocks rm -rf on / ~ $HOME . .. *, force pushes to main/master/production/release, git reset --hard, git clean -fd, curl|sh, chmod 777, mkfs/dd, DROP DATABASE/TABLE from a CLI, terraform destroy, kubectl delete --all, sudo rm. Add your own regexes in config/shell-deny.txt. |
| protect-secrets.json | PreToolUse write + shell | Blocks agent writes to .env, keys, secrets/, .git/ and the hook folders themselves (so the agent can't switch its own guard rails off). Catches shell redirects, sed -i, cp/mv/rm too. .env.example stays editable. |
| mcp-allowlist.json | PreToolUse @mcp | Only the MCP servers/tools in config/mcp-allow.txt run; !server/tool lines deny. |
| prompt-secret-guard.json | UserPromptSubmit | Stops prompts containing OpenAI/Anthropic/AWS/GitHub/Slack/Stripe/Google keys, JWTs or private keys (blocks in the IDE; the CLI can't block prompts, so there it warns). |
| audit-tool-calls.json | PostToolUse | One JSON line per tool call in .kiro/hook-scripts/.state/audit.jsonl, secrets redacted. |
| format-on-save.json | PostFileSave | Formats and lints only the saved file with the repo's own prettier/eslint, ruff/black, gofmt or rustfmt; lint problems go back to the agent. Missing tools are skipped. |
| stop-run-tests.json | Stop | Runs your tests when a turn changed code and sends the agent back to fix failures. Loop-safe: skips unchanged trees, max 2 retries per session, always exits 0 (see below). |
| spec-task-gate.json | PreTaskExec + PostTaskExec | Refuses to start a spec task with conflict markers or a merge/rebase in progress; runs the tests after each task. |
| session-context.json | SessionStart | Briefs the agent: branch, uncommitted files, last commits, test command, your config/session-notes.md. |
| compaction-memory.json | PreCompact + PostCompact | Saves a work-in-progress snapshot before compaction, tells the summarizer what to keep, and re-injects your rules + changed files afterwards. |
| new-file-tests-reminder.json | PostFileCreate (agent, off) | Opt-in: asks the agent to add a test for each new source file. Uses credits. |
| i18n-sync.json | PostFileSave (agent, off) | Opt-in: marks missing/changed keys in other locales when the English file changes. Uses credits. |
| changelog-on-stop.json | Stop + confirm (off) | Opt-in: asks before appending this session's commits to a CHANGELOG draft. Shows the confirm block. |