Hooks
Definition
User-defined commands that run automatically at set points in a coding agent's lifecycle, such as before a tool call or when a session ends.
In more detail
Hooks turn suggestions into guarantees. Instead of asking the agent to format code after every edit, a hook runs the formatter each time a file is written. Hooks can also block actions, for example refusing edits to protected files.
Claude Code, Kiro and other agents support hooks, each with its own events and configuration format. Because hooks execute commands on your machine, review any hook configuration that comes from someone else.
Related terms
Guardrails
Checks placed around a model that filter, validate or block its inputs and outputs according to rules or classifiers, at run time.
Headless mode
Running a coding agent non-interactively from a script or CI job, passing the task as an argument and reading the result from output.
Plan mode
An agent mode in which it reads and researches the code and proposes a plan, without editing any files until you approve the plan.
Plugin (Claude Code)
A package that bundles skills, agents, hooks and MCP server configuration so they can be installed together from a marketplace.
Slash command
A command typed with a leading slash in a chat or coding agent, such as /review, that runs a built-in action or a saved prompt.
Read more about Hooks
- AI-assisted coding
Working with coding agents: tasks, instruction files, review and verification.