Boris Cherny9/ Set Up Hooks
Source snapshot: 2026-11-09Independent editorial note
When this pattern helps
Treat this as an extension point with an explicit trigger, inputs, permissions, and failure behavior. Start with a narrow workflow, document prerequisites, and verify the action in a disposable project before making it part of a team routine.
把它当作扩展点来设计:明确触发条件、输入、权限和失败处理。先从窄流程开始,写清前置条件,并在临时项目验证后再纳入团队日常。
Hooks let you deterministically hook into Claude's lifecycle:
- Automatically route permission requests to Slack or Opus
- Nudge Claude to keep going when it reaches the end of a turn (you can even kick off an agent or use a prompt to decide whether Claude should keep going)
- Pre-process or post-process tool calls, e.g., to add your own logging
Ask Claude to add a hook to get started.
Original source on X