# Hooks on tool calls

A step of the [Claude Code development environment](https://gradus.kazet.blog/tree/claude-dev-environment) tree on Gradus, in the Commands & hooks area: Slash commands, hooks, skills, agents.

Page: https://gradus.kazet.blog/tree/claude-dev-environment/step/hooks

Run formatters and checks automatically after the assistant edits a file, so formatting never depends on it remembering.

Usually comes after: [Slash commands](https://gradus.kazet.blog/tree/claude-dev-environment/step/slash-commands).

## Prompt for your AI assistant

```
Configure a PostToolUse hook in .claude/settings.json that runs the project's formatter on every file the assistant writes or edits, and a hook that blocks edits to generated or vendored directories. Document both hooks in CLAUDE.md.
```

Every step of the tree: https://gradus.kazet.blog/tree/claude-dev-environment/llms.txt
