Glossary

Hooks

Hooks are user-defined shell commands, HTTP endpoints, MCP tool calls, LLM prompts or subagents that run automatically at specific points in Claude Code’s lifecycle.

When an event fires and a matcher matches, Claude Code passes JSON context about the event to the hook handler, which can act on it and optionally return a decision.

Some vendor plugins ship hooks, for example safety checks or validation, alongside their MCP servers and skills.

Source: https://code.claude.com/docs/en/hooks (Claude Code docs)

Other terms