Mastering Claude Code Extensions: Skills, MCP, Hooks, Sub‑agents, Agent Teams & Plugins
Claude Code, Anthropic's CLI AI programming assistant, offers six extensible mechanisms—Skills, MCP, Sub‑agents, Agent Teams, Hooks, and Plugins—each explained with purpose, setup steps, concrete examples, and practical guidance on when and how to combine them for robust AI‑driven workflows.
Introduction
Claude Code is Anthropic's command‑line AI programming assistant. Its power comes not only from built‑in capabilities but from six extensible points that let developers customize and extend Claude's behavior.
Release timeline
MCP — Nov 2024 · Sub‑agents — Jul 2025 Hooks — Sep 2025 · Plugins — Oct 2025 Skills — Oct 2025 · Agent Teams — Feb 2026
Skills
One‑sentence summary: Define reusable macro‑commands in a Markdown file and invoke them with a slash command.
Skills are stored as SKILL.md files under ~/.claude/skills/ (personal) or .claude/skills/ (project). The file’s YAML front‑matter supplies the slash‑command name and description; optional placeholders ( $ARGUMENTS) and scripts can be added. When a skill is called, Claude executes the steps verbatim, guaranteeing consistency, token savings, and context awareness.
Example – echo skill:
# ~/.claude/skills/echo/SKILL.md
---
name: echo
description: Echoes back the user input.
---
Write back exactly what the user said. Preserve all words.Invocation: /echo Hello Claude! Claude replies “Hello Claude!”.
MCP
One‑sentence summary: An open protocol that connects Claude to external databases, APIs, and tools.
Without MCP Claude is confined to its context window. With MCP it can query a Postgres database, read GitHub issues, create pull requests, or call any HTTP API, bringing real‑world data into the conversation. MCP is described as the AI world’s USB‑C interface, with thousands of servers already adopted by OpenAI, Google, and Microsoft.
Setup:
claude mcp add --transport http github https://mcp.github.com/mcp \
--header "Authorization: Bearer $GITHUB_TOKEN"After configuration, the MCP tool is always available. Users can simply ask natural‑language questions (e.g., “Get the latest bug reports from Jira”) and Claude will automatically select the appropriate tool.
Sub‑agents
One‑sentence summary: Independent mini‑agents with isolated context that handle specific tasks and return results.
When a main Claude session becomes overloaded, a sub‑agent spawns a separate AI instance with its own system prompt, tool permissions, and even a different model. Typical uses include a “code‑reviewer” that reads diffs and reports issues, or an “explorer” that searches a large codebase. Sub‑agents cannot create further sub‑agents, preventing infinite recursion.
Setup: Create a Markdown file under ~/.claude/agents/:
---
name: code-reviewer
description: Reviews code for style and bugs.
---
You are an assistant that reads code diffs and reports issues.
Focus on maintainability.Invoke via natural language (e.g., “Use code‑reviewer to check the latest commit”) or the interactive /agents menu.
Agent Teams
One‑sentence summary: A coordinated group of Claude sessions that communicate, share tasks, and work in parallel.
Released with Opus 4.6 in February 2026, Agent Teams differ from sub‑agents by allowing direct inter‑agent communication. In Anthropic’s demo, 16 agents built a 100 k‑line C compiler in two weeks, consuming roughly $20 000 worth of tokens. Because token usage scales with parallelism, teams should be used only when the benefit of concurrent exploration outweighs the cost.
Enable:
export CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1
claudeCreate a team with a prompt such as:
"Create a team of three agents: security analyst, performance engineer, test engineer. Task: review the payment module."
Shift+T # Switch team view
Ctrl+T # Share task listEach member runs in its own tmux pane and can receive direct messages without routing through a leader.
Hooks
One‑sentence summary: Event‑driven scripts that run automatically before or after tool use, at session start, or at session end.
Hooks are deterministic guards unrelated to Claude’s language model. They can, for example, run a linter after every file write or send a Slack notification when a task finishes, without any manual prompt.
Configuration (settings.json or interactive /hooks ):
{
"hooks": {
"PostToolUse": [{
"matcher": "Write",
"hooks": [{
"type": "command",
"command": "npm run lint"
}]
}]
}
}Once defined, the hook triggers automatically when the matching event occurs.
Plugins
One‑sentence summary: Installable bundles that package skills, sub‑agents, hooks, and MCP configuration for easy distribution.
Plugins solve the “runs on my machine” problem by encapsulating all extension files under a .claude/ directory with a manifest. Namespacing ( /pluginName:skillName) avoids conflicts, and versioning is built‑in. A marketplace lets teams share plugins.
Installation and use:
claude plugin add --path ./my-plugin # Local install
claude plugin install my-plugin # Marketplace install
/my-plugin:hello # Run a namespaced skillWhen multiple sources define the same name, priority is enterprise > user > project > plugin.
Conclusion
The real strength of Claude Code lies in layering these extensions. Start with Skills + MCP to cover most workflows, add Hooks for automation, introduce Sub‑agents when context becomes heavy, enable Agent Teams for coordinated parallel work, and finally package everything as a Plugin for team‑wide distribution.
AI Algorithm Path
A public account focused on deep learning, computer vision, and autonomous driving perception algorithms, covering visual CV, neural networks, pattern recognition, related hardware and software configurations, and open-source projects.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
