Configure Claude Code, Codex, and Cursor hooks as event-driven commands or prompts. Treat platform syntax as distinct.
- Identify the platform and load router.md.
- Load the platform file: claude-code.md, codex.md, or cursor.md.
- Pick the scope, file path, lifecycle event, and a command hook (deterministic) or prompt hook (reasoning, if supported).
- Validate the native config and run the platform smoke check.
Across agents, keep one portable script plus a small adapter per platform. Report unsupported features.
Load as needed: hook-types.md, command-vs-prompt.md, matchers.md, input-output-schemas.md, examples.md, troubleshooting.md.
Check stop_hook_active on Stop/SubagentStop. Use trusted absolute paths, timeouts, and jq validation. Keep blocking rules selective.