creating-hooks
Creates lifecycle hooks: small scripts the host runs at session start, before or after a tool call, on prompt submit or at stop, to log, add context, warn or block deterministically. Covers GitHub Copilot hooks.json, Claude Code hooks in settings or a plugin, OpenAI Codex .codex/hooks.json, and this collection's per-host hook source. Use when a guardrail must hold regardless of what the model decides (block a dangerous command such as git push or rm -rf, check a file after every edit, inject context at start), when porting a hook between tools, or when a hook is slow, noisy or blocks the wrong things. For guidance the agent may weigh, use creating-instructions.
Pinned to revision c4efc46815a7, so it is the text this page describes rather than whatever the author pushed since.
Files
- skills/creating-hooks/SKILL.md
- skills/creating-hooks/resources/hook-example-pack.md
- skills/creating-hooks/resources/hook-quality-checklist.md
- skills/creating-hooks/resources/hook-template-pack.md
- skills/creating-hooks/resources/host-hook-formats.md
Every link opens the file at its source, pinned to the revision this page describes.