الانتقال إلى المحتوى
Claude وأدوات الـ AI للبرمجةSkills و Hooks و Subagents· 7 دقائق للقراءة

Skills, MCP, Subagents, Hooks or Plugins? Picking the Right Extension

Each one changes a different part of Claude Code's loop. Ask what you need: knowledge, reach, isolation, a guarantee or a package.

ReadIn

مقال كل يوم يفرق معاك

21 نوفمبر 2026
  • كاتب موثّق
  • Claude Code 2.x
محتويات المقال

A team wants Claude to triage bug tickets the way their on-call engineer does, so one developer writes a single /triage skill. It holds everything: a curl command with the error tracker's API token pasted in, "read every file in logs/ until you find the request", the triage playbook, and "ALWAYS run the regression suite before you finish!!!". It half works. The token gets committed with .claude/skills/. The log reads fill the conversation until it compacts. Claude skips the regression suite on days it decides a fix is trivial. And when a second team wants the same thing, they copy the folder and the two versions drift apart.

The common misconception

"Skills, MCP, subagents, hooks and plugins are all ways to give Claude a new capability, so use whichever one you know." It's an easy conclusion to reach:

  • They really do overlap. A skill can run in a subagent, a subagent can preload skills, a hook can call an MCP tool, and a plugin can contain all of them.
  • A skill can run shell commands, so it looks like it could stand in for an MCP server or a hook.
  • They all live as files under .claude/ or in settings, and several show up in the same / menu.
  • Installing a plugin adds skills, agents, hooks and servers in one step, so "plugin" sounds like a capability itself.

The half-truth is the overlap. They compose well, but they aren't interchangeable: each one plugs into a different point in Claude's loop, and they differ in who triggers them and what they cost.

What actually happens

Five questions, five answers

The docs' overview of extensions boils down to one question per feature:

  • What should Claude know, or how should it do a task? A : a SKILL.md file of instructions or reference material. The docs call skills "the most flexible extension".
  • What can Claude reach? An server: tools for an external system, "with the connection and authentication handled by the server". The docs' trigger: you keep copying data into chat from another tool.
  • Where should the work happen? A : its own context window and instructions. It can read dozens of files, and your conversation receives only its summary.
  • What must happen every time? A : Claude Code runs it at a lifecycle event, such as after every edit, without Claude deciding.
  • How does this reach another repo or team? A : the packaging layer. It bundles skills, agents, hooks and MCP servers into one installable unit.

Who pulls the trigger

This is the difference that matters most. You or Claude starts a skill: you type /name, or Claude matches its description to your task. Claude decides when to call an MCP tool or delegate to a subagent. Nobody decides when a hook runs; its event fires and Claude Code runs it. That's why "always run the regression suite" fails inside a skill: a skill is instructions Claude interprets, and the docs say plainly that its outcome can vary.

What each one costs in context

Most extensions take some context, and too much adds noise as well as cost. They load very differently:

ExtensionWho triggers itWhat sits in contextBest for
SkillYou (/name) or Claude, from the descriptionThe description every request; the body once usedPlaybooks, checklists, reference material
MCP serverClaude, when it calls a toolTool names at start; full schemas only on demandData and actions in an external system
SubagentYou or Claude, per taskIts description; the work runs in its own windowSide tasks that read a lot and return a little
HookClaude Code, on its eventNothing, unless the hook returns outputFormatting, guardrails, notifications
PluginYou, once, at installIts components' costs, in every session it's enabledSharing one setup across repos and teams

The triage skill, split up

Here is the skill before and after each job moves to the extension built for it:

Markdown .claude/skills/triage/SKILL.md
---description: Triage a bug ticket---1. Fetch the error:   curl -H "Authorization: Bearer sntrys_EXAMPLE" \     "https://errors.example.com/api/issues/$ARGUMENTS/latest"2. Read every file in logs/ until you find the request.3. Find the root cause and fix it.4. ALWAYS run pnpm test:regression before you finish!!!

Each line of the old skill went somewhere specific. The curl call and its token became an MCP server, which handles the connection; the credential comes from an OAuth sign-in or an environment variable, not a committed file. The log search became a subagent, so forty log files no longer pass through the main conversation. The ALWAYS line became a Stop hook that runs the regression suite whenever Claude tries to finish. What's left in the skill is what only a skill does well: the judgment steps.

When the second team asks for it, all four pieces ship as one plugin:

text triage-kit/
triage-kit/├── .claude-plugin/plugin.json   # manifest: the name "triage-kit"├── skills/triage/SKILL.md       # the playbook: /triage-kit:triage├── agents/log-digger.md         # subagent: searches logs, returns a summary├── hooks/hooks.json             # Stop hook: runs the regression suite└── .mcp.json                    # the error tracker's MCP server

Plugin skills are namespaced, so the command becomes /triage-kit:triage and can't collide with a team's own /triage. Both teams now update one plugin instead of two copies.

How to apply it in your project

  1. Take inventoryRun /hooks, /mcp and /plugin to see what's configured, and /context to see what it costs.
  2. Ask the five questions of each pieceKnowledge, reach, isolation, guarantee or packaging? A skill that does two of those is two things.
  3. Move secrets out of skillsCredentials belong in an MCP server's configuration, at local scope if they shouldn't be committed.
  4. Move "always" out of skillsA skill line that must hold every time becomes a hook, and the skill keeps the steps that need judgment.
  5. Package only when it travelsSkills, subagents, hooks and MCP servers all work without a plugin. Build one when a second repo or team needs the setup.

Key takeaways

  • A skill changes what Claude knows or how it works; Claude or you decide when it loads.
  • An MCP server changes what Claude can reach, with auth handled by the server.
  • A subagent changes where the work happens; only its summary comes back.
  • A hook changes what always happens, because Claude Code runs it on an event.
  • A plugin changes nothing on its own: it ships the other four, and it costs context in every session it's enabled.

📚 المصادر

  1. Extend Claude Code — Claude Code Docs
  2. Plugins overview — Claude Code Docs
  3. Extend Claude with skills — Claude Code Docs
  4. Connect Claude Code to tools via MCP — Claude Code Docs
  5. Anthropic's marketplaces — Claude Code Docs

التعليقات (0)