Claude Code hooks: run scripts automatically before and after every AI edit
Dev.to AI
•
Generative AI
Claude Code hooks: run scripts automatically before and after every AI edit Claude Code 1.x shipped a feature most developers haven't found yet: hooks. Hooks let you run shell commands automatically before Claude edits a file, after it edits a file, or after a session ends. Think of them as git hooks, but for AI edits. Here's what you can do with them. The basics: what hooks are Hooks are shell commands defined in your.claude/settings.json.