📖 Step 9: AI/LLM#356 / 498

Agent Hooks

Agent Hooks

📖One-line summary

Scripts that run automatically at set points in an agent's workflow, such as before or after a tool call, to format, check, or block actions.

✨Example

🤖

에이전트 훅

Agent Hooks

⚡Vibe coding prompt examples

>_

Set up hooks so Prettier and ESLint run automatically every time Claude Code edits a file.

>_

Write a hook script that blocks the agent before it runs rm -rf or edits a .env file.

>_

Design a hook flow that runs the tests when the agent finishes and feeds failures back to the agent.

Try these prompts in your AI coding assistant!