Hooks
Run your own commands or AI checks automatically while an agent works — before it edits a file, after it runs a command, when it finishes — and review a project's hooks before they run.
Overview
Run your own commands or AI checks automatically while an agent works — before it edits a file, after it runs a command, when it finishes — and review a project's hooks before they run.
What this page covers
The full write-up is on the way. It will walk through:
- When to use a hook
- Where hooks live and your first hook
- Events, matchers, command and prompt hooks
- Reviewing a project's hooks
This page is being written
We're expanding the documentation section by section. In the meantime, start with the overview or the quickstart.