★ OverviewIntermediate11 min
Skills vs Agents vs Hooks — Choosing the Right Abstraction
Skills, agents, and hooks are three distinct abstractions for automating Claude Code behavior. They are not competing alternatives — they compose. Understanding when each is the right tool changes how you design your Claude Code workflow.
Quick Reference
- →Skills: named reusable prompts, invoked with /skill-name — explicit, on-demand
- →Agents: specialist context definitions (AGENT.md) — invoked by task match or @-mention
- →Hooks: automatic triggers on lifecycle events — always-on enforcement, no manual invocation
- →Skills for recurring workflows you invoke explicitly
- →Agents for specialist Claude instances with their own context, model, and memory
- →Hooks for deterministic 'must happen' automation regardless of what Claude thinks
- →They compose: a skill can spawn an agent; an agent can have hooks
- →For one-off tasks, just prompt directly — don't over-engineer
The Three Abstractions
Claude Code gives you three ways to package behavior beyond the standard CLAUDE.md prompt: skills, agents, and hooks. Each operates at a different level of the invocation model and serves a different design goal.
| Abstraction | What it is | How it's invoked | Primary purpose |
|---|---|---|---|
| Skill | Named reusable prompt — a slash command | Manually via /skill-name, or auto-invoked if description matches and disable-model-invocation is not set | Encode recurring workflows you trigger explicitly |
| Agent | Specialist Claude instance with its own tools, model, and context | By task description match, @-mention, or --agent flag | Delegation to a specialist for a class of tasks |
| Hook | Shell/HTTP/LLM trigger on lifecycle events | Automatically — fires when the event occurs, no manual invocation | Deterministic enforcement and side effects |