Hooks and commands cheat sheet
Hook file
{ "version": "v1",
"hooks": [{
"name": "x", "trigger": "PreToolUse", "matcher": "shell",
"action": { "type": "command", "command": "./guard.sh" },
"timeout": 60, "enabled": true }] }
| Place | Scope |
Agent hooks array | One agent |
.kiro/hooks/*.json | Workspace |
~/.kiro/hooks/*.json | Global |
Triggers: SessionStart, UserPromptSubmit (CLI cannot block), PreToolUse (can block), PostToolUse, Stop, SessionEnd, PreCompact, PostCompact, PostFileCreate, PostFileSave, PostFileDelete, PreTaskExec, PostTaskExec. v2 camelCase names are accepted aliases. Matchers: read write shell web spec, @builtin @mcp @server @server/tool, wildcard, or regex. Source: Hook types.
Slash commands and flags seen so far
| Command | Purpose |
/upgrade-agent, /upgrade-agent diagnostics | Convert v2 agents; list warnings |
/permissions, /tools trust-all | Policies; session-wide trust |
/hooks, /config | Verify loaded hooks and config |
/tangent [name|ls|root|merge] | Side conversations |
/rewind | Fork conversation from an earlier turn |
/sessions | Browse, bookmark, rename sessions |
/spec new <name> | Start a spec |
/workflow run <recipe> --input value | Run a workflow (needs chat.enableWorkflows) |
/memories, /voice | Cross-session memory; voice input |
kiro-cli --cloud | Cloud session |
kiro-cli --v2 | One run on the v2 harness |