When I extend an agent, the first question is not “Can it do this?” It is “What should own this behavior?” A reusable procedure, a delegated review and a rule that blocks an action need different homes.
is a mechanism that adds instructions, delegated work, lifecycle checks or access to tools and data to an agent's existing execution loop.
In Claude Code, the four mechanisms I reach for are skills, subagents, hooks and MCP. They can compose, but they do not provide interchangeable guarantees.
Which mechanism should own the work?
Choose the mechanism by the responsibility you need, not by which extension is newest. Procedures need instructions, independent work needs a handoff, event checks need lifecycle integration, and external capabilities need an interface. A single workflow may need more than one.
| Need | Start with | What to verify |
|---|---|---|
| Repeat the same review method | Skill | The trigger is specific and the instructions produce useful evidence |
| Review a bounded set of files independently | Subagent | It has the right context, scope and tools |
| Check a condition before a tool runs | Hook | The matcher fires and failure really blocks the intended action |
| Read or act through a system integration | MCP | Identity, permissions, input validation and side effects |
| Know a repository-wide convention | CLAUDE.md | The correct file loads and is still accurate |
This table is a design aid, not a taxonomy of everything the tools can do. A skill can use MCP tools and run in a subagent. A hook can invoke a model-backed check. That last case is event-triggered, but its judgement is not deterministic simply because it is called a hook.
For the repository-wide context at the bottom of the table, see the instructions I would put in CLAUDE.md. Keep those facts separate from the procedure for a particular task.
What makes a good skill?
A good skill describes a task-specific procedure, the evidence it needs and the condition for stopping. It saves repeating instructions while leaving judgement with the agent. The most valuable content is often the exception or failure case, not the happy-path checklist.
For a portfolio visual review, I would specify routes, viewports, important interactions and the difference between an accepted screenshot and a convincing result. An image existing on disk proves capture worked; it does not prove a button is readable or that an article is comfortable to scan.
The skill should also name what not to do. A visual review should not subscribe a real email address, send a contact message or deploy a change merely to exercise a control.
Claude Code's skills documentation explains discovery and invocation, including skills that run in a forked context. Keep the body focused and move long reference material into files loaded only when needed. Context cost depends on the session and caching; it is not a fixed invoice per line.
When is a subagent worth the handoff?
A subagent is worth the handoff when the task is independently useful and its result can be checked without replaying every intermediate step. Good examples include reviewing a fixed article set or tracing one failure path. A vague “make everything better” delegation usually creates rework.
A useful brief names:
- The exact files or system in scope.
- Whether edits are allowed.
- The standard the work should meet.
- What must be preserved.
- The evidence to return, including unresolved questions.
For example, an editorial reviewer should return the sentences changed and the claims that could not be verified, not just “the voice looks good.” The parent still owns integration and final checks.
The subagent documentation distinguishes fresh-context agents from forks that inherit conversation history. Choose deliberately. Independence is helpful only when the agent receives enough context to solve the right problem.
What can a hook enforce, and where does that stop?
A correctly configured hook can run a check at a supported event and, for blocking events, prevent the action from proceeding. The guarantee depends on the handler, event and failure behavior. It does not extend automatically to every command, timeout or alternate path.
Claude Code documents that a command hook exiting with code 2 at PreToolUse blocks that tool call. A PostToolUse check runs after the action, so it cannot undo it. The hooks reference also documents non-blocking failure cases, including a command hook that cannot start or times out on PreToolUse.
That makes testing the negative path essential:
| Test | Question |
|---|---|
| Matching action | Did the check actually run? |
| Rejected input | Was the action prevented? |
| Missing executable | Did the system stop or continue? |
| Timeout | Is the resulting behavior acceptable? |
| Alternate tool or path | Is the same restriction still enforced? |
A regex that rejects one shell command is not a sandbox. For security boundaries, use tool permissions, operating-system isolation and authorization in the service performing the action.
For content quality, a script is a better fit. This portfolio's post linter can verify frontmatter and internal links. Whether the writing makes a useful argument still needs a reader. The distinction mirrors validating a generated diagram: a valid structure is necessary, not sufficient.
When does the integration belong in MCP?
An integration belongs in MCP when a standard tool-and-data interface is useful across agent clients. The backing system can be local or remote. MCP supplies the interface; it does not make the source trustworthy or grant permission to act on everything it exposes.
A skill might explain how to triage an issue. An MCP tool can retrieve that issue. An HTTP client or CLI could also retrieve it; MCP is one integration choice, not the only route to authenticated data.
Claude Code supports MCP tool discovery and configuration, including on-demand tool search under supported configurations. That can reduce eager schema loading, but narrow results still matter. Retrieving ten relevant issues is usually more useful than asking for an entire workspace.
The MCP tool specification treats tool annotations as hints, not a substitute for trust decisions. A tool calling itself read-only is a claim to verify. That evidence gap is part of the reasoning behind ResolveMesh.
How should these mechanisms work together?
A reliable workflow assigns each mechanism one clear responsibility and makes the handoffs visible. The skill defines the method, the subagent handles bounded work, the integration retrieves evidence, and checks validate the result. None should silently expand the user's authorization.
For a release review, I would use this sequence:
- A skill describes the release criteria and permitted checks.
- A subagent reviews a clearly bounded change.
- A tool reads the deployment and commit status.
- Tests and build checks validate the artifact.
- The main agent compares the evidence with the user's request before reporting completion.
A deployment record is not a live page check. A passing build is not proof that the correct commit reached the production alias. Keeping those claims separate matters more than how many extensions are installed.
What is the smallest useful extension to start with?
Start with the repeated failure you can name, then add the smallest mechanism that addresses it. A short repository rule may be enough. If the work is procedural, make a skill. If it is a check, implement the check before choosing where to attach it.
The documentation linked here was reviewed on September 7, 2026. Exact events, settings and context behavior will continue to change; follow the relevant client documentation rather than copying a version-specific limit from a blog post.
The durable rule is simpler: instructions explain the work, delegation divides it, integrations expose capabilities, and enforcement needs a tested boundary.
Questions people actually ask
- What is the difference between a Claude Code skill and a subagent?
- A skill packages a reusable procedure. A subagent performs a delegated task in a separate context with its own configured tools and instructions. They can work together: a skill can run in a subagent, and a subagent can load skills it needs.
- When should I use a hook instead of CLAUDE.md?
- Use a hook when a check must run at a particular lifecycle event rather than depend on the model remembering an instruction. Test the event matcher and failure behavior. A hook is useful enforcement plumbing, but a missing or timed-out hook is not automatically fail-closed.
- Can a subagent see the main conversation?
- It depends on how it is started. A non-fork Claude Code subagent starts from its definition and the delegation prompt. A fork inherits the conversation at the point it is created. State which context is needed before choosing the delegation mechanism.
- Does an MCP server have to run remotely?
- No. MCP can connect an agent to a local process or a remote service. The protocol describes how tools and data are exposed, not where they must live. Authentication, authorization and review of side effects still need to be designed for the particular connection.
- Do MCP tools consume context?
- Tool descriptions and results consume context, but the amount depends on the client and its discovery configuration. Claude Code supports on-demand tool search. Large results can still dominate a session, so prefer narrow queries and inspect actual usage rather than assuming discovery removes the cost.