Adding or Modifying Hooks for Claude Code
Hooks allow specific behaviors or scripts to trigger automatically after highly configurable events.
- Review the general hooks guide: https://code.claude.com/docs/en/hooks-guide
- Review the in-depth hooks configuration docs: https://code.claude.com/docs/en/hooks
- Edit the project-level
.claude/settings.json, either adding, editing, or expanding thehooksproperty to achieve the goal. It's important to do this at the project level, unless the user specifically asks you to add a system-wide hook at the user level (~/.claude/settings.json), which is less common. - Work with the user to trigger the target event(s) and confirm it's working as expected.