For example, an action starts or finishes
Hook
Configure a post-write hook for me. Every time the AI finishes writing a code file, automatically run Prettier to format it.
Configure a post-write hook for me. Every time the AI finishes writing a code file, automatically run Prettier to format it.
For example, an action starts or finishes
Runs when the configured event occurs
Runs a check, records data, or performs a follow-up
A Hook is an event-triggered action, not a prompt the user must type every time.
Listen for lifecycle events: A Hook can attach to startup, after a file write, or before a command runs.
Run a preset task: When the event occurs, the tool runs the configured formatter, check, or setup script.
A failure can stop the next action: A pre-commit test hook can block a commit on failure, while running heavy tests after every write can slow the workflow.
Configure a post-write formatting hook for .ts and .tsx files. Explain when it runs and what it changes, and make sure it cannot read secrets or touch unrelated directories.