Claude Code has three ways to package know-how: skills, subagents and plugins. They overlap enough to confuse people, and the names do not help. The short version is that they sit at different levels. A skill is instructions. A subagent is a separate worker. A plugin is a box you put skills, subagents and other parts into so you can share them.
This post compares the three and gives a rule for each. For the full mobile setup, see Claude Code skills and subagents for mobile.
The one-table answer
| Skill | Subagent | Plugin | |
|---|---|---|---|
| What it is | A SKILL.md file of instructions |
A separate assistant with its own context | A package of skills, agents, hooks, MCP servers |
| Where it lives | .claude/skills/ or ~/.claude/skills/ |
.claude/agents/ or ~/.claude/agents/ |
Installed from a marketplace or a local folder |
| Runs in | Your main conversation | Its own context window | Whatever its parts do |
| Main benefit | Repeatable procedure, loaded when needed | Keeps verbose work out of your context | One install for a whole setup |
| Invoked as | /skill-name or automatically |
Delegated by Claude or by you | /plugin-name:skill-name for its skills |
Skills: instructions Claude follows
Anthropic’s definition: “Create a SKILL.md file with instructions, and Claude adds it to its toolkit. Claude uses skills when relevant, or you can invoke one directly with /skill-name.”
The key property is lazy loading. Anthropic says “Unlike CLAUDE.md content, a skill’s body loads only when it’s used, so long reference material costs almost nothing until you need it.”
A skill runs in your current conversation. Once invoked, the skill “enters the conversation as a single message and stays there across later turns.” So Claude follows it with everything else it knows about the task in view.
Good mobile examples: your architecture rules, a localization procedure, a release checklist, a design system. See best Claude Code skills for Flutter for a list, and how to write a Claude Code skill to make one.
Subagents: separate workers
Anthropic describes them this way: “Each subagent runs in its own context window with a custom system prompt, specific tool access, and independent permissions.”
That separation is the point. The docs list reasons to use one, including “Preserve context”, “Enforce constraints” and “Control costs by routing tasks to faster, lower-cost models like Haiku.” The cost guide gives the classic case: “Running tests, fetching documentation, or processing log files” can go to a subagent “so the verbose output stays in the subagent’s context while only a summary returns to your main conversation.”
A subagent file looks like this:
---
name: test-runner
description: Runs the Flutter test suite and reports only failures. Use after code changes.
tools: Bash, Read
model: haiku
---
Run `flutter test`. Return the names and messages of failing tests only.
Do not edit any files.
Subagents can also use skills. The subagent docs describe a skills field where “The full skill content is injected, not only the description.” So a reviewer subagent can carry your design rules without you repeating them.
Good mobile examples: a test runner, a code reviewer with read-only tools, a log searcher. See a Claude Code code reviewer subagent.
Plugins: the package
Anthropic defines a plugin as “a directory of skills, agents, hooks, MCP servers, or other components that Claude Code installs and loads as one unit.” Its manifest lives at .claude-plugin/plugin.json.
The important line in the docs is this one: “Skills, subagents, hooks, and MCP servers all work on their own, without a plugin.” A plugin adds nothing your project folders cannot do. What it adds is distribution. Anthropic’s advice: “Keep that standalone setup while it serves one project or only you. Make a plugin when you want to share the setup with others, install it in several projects, or publish versioned releases.”
A minimal plugin layout:
my-plugin/
├── .claude-plugin/
│ └── plugin.json
├── skills/
│ └── release/SKILL.md
├── agents/
│ └── test-runner.md
└── hooks/
└── hooks.json
Anthropic notes “Only plugin.json goes inside .claude-plugin/.” Plugin skills get a prefix, so a release skill in my-plugin runs as /my-plugin:release.
Context cost compared
All three cost something, in different ways:
- Skills: the name and description sit in context until the skill is used. Then the body loads.
- Subagents: the subagent’s work happens in its own context. Only its summary comes back.
- Plugins: the plugin docs say that for each auto-invocable skill, agent or command, “the name and description are in Claude’s context on every turn.” The plugin browser shows a Context cost estimate for official plugins, and the Installed tab groups plugins “Not used recently” so you can disable them.
Hooks and MCP servers inside a plugin also do work outside the model, and plugins can run code. Anthropic’s security page warns that “A Claude Code plugin you install can execute arbitrary code on your machine with your user privileges.” Treat a plugin install like installing any other software.
Which one to use
A simple decision path:
- Do you want Claude to follow a procedure? Write a skill.
- Will the task flood the conversation with output, or need different tools or a cheaper model? Write a subagent.
- Do you want a check that runs every time, not when Claude remembers? That is a hook, not any of the three. See Claude Code hooks for Flutter.
- Do you want to reuse the setup in several projects or share it? Bundle it as a plugin.
Most solo app projects start with a few skills and one or two subagents in the repository. They only become a plugin when a second project wants the same setup.
A mobile example
A Flutter app with a steady workflow might have:
- Skills:
architecture,design,localization,release(manual only). - Subagents:
test-runneron a smaller model,reviewerwith read-only tools and the design skill preloaded. - Hooks: run the formatter after edits.
When you start your second app, copy those folders into a plugin, add a plugin.json, and install it in both projects. Anthropic’s create guide shows the move: cp -r .claude/skills my-plugin/. It also warns that hooks would run twice if you leave copies in both places.
MobileKit is one example of this shape: a set of Flutter skills and agents packaged for reuse across app projects.
Sources read on the day this post was written: Claude Code: Skills, Claude Code: Subagents, Claude Code: Plugins overview, Claude Code: Create a plugin, Claude Code: Plugin security and trust and Claude Code: Manage costs.