Claude Code plugins: package skills, agents and hooks for your team, and their context cost
TL;DR
Plugins share skills, agents, hooks and MCP with one command and update via marketplaces. But an enabled plugin is in every session: it costs context and runs as you, so install few and review them.
You have a few good skills, a code-review subagent, an auto-format hook and an internal MCP server. Now you want the whole team to use exactly the same setup, which means walking each person through copying each file into the right folder, then messaging everyone whenever something changes. Plugins in Claude Code solve this packaging problem: bundle skills, agents, hooks and MCP servers into one unit, install it with one command, update it through a marketplace. But plugins also carry a context and security cost that many people overlook. This post covers both sides.
What's in a plugin?
A plugin is a directory, usually with a .claude-plugin/plugin.json manifest giving its name and version. It can contain:
my-plugin/
├── .claude-plugin/plugin.json # name, version, description
├── skills/review/SKILL.md # runs as /my-plugin:review
├── agents/reviewer.md # a subagent Claude can delegate to
├── hooks/hooks.json # commands run on events (after every edit…)
└── .mcp.json # MCP server enabled with the plugin
Plugin skills are namespaced by plugin name (/my-plugin:review), so they don't clash with other skills.
Installing from a marketplace
A marketplace is just a repo or folder with a .claude-plugin/marketplace.json file listing plugins: a catalogue, not a store. Anthropic's official marketplace is added automatically the first time you run Claude Code.
/plugin # open the UI, Discover tab
/plugin marketplace add owner/repo # add a third-party marketplace
/plugin install plugin-name@marketplace-name
claude plugin disable plugin-name # turn off without uninstalling
| Install scope | Applies to | Stored in |
|---|---|---|
| User | You, every project on this machine | User settings |
| Project | Everyone working in this repo | .claude/settings.json (committed); each person still installs it on their machine |
| Local | Only you, only this repo | Local settings |
When should you use a plugin?
- No plugin needed: a personal skill goes in
~/.claude/skills/; a rule for one repo goes in that repo's.claude/. - Use a plugin: when you want several components as one unit, to share with a team, install across projects or ship versioned releases.
- While developing: no marketplace needed, load straight from the folder with
claude --plugin-dir ./my-plugin.
The cost of every enabled plugin
This is the part people forget. An enabled plugin is present in every session, even the ones where you don't use it:
- Context: the name and description of every skill, agent and command Claude can invoke on its own sit in context on every turn. Full text only loads when used, but descriptions still cost tokens and space.
- Processes: the plugin's MCP servers run alongside each session; hooks fire on their events.
- Permissions: everything the plugin runs, it runs as you.
Check before and after installing: the Marketplaces tab in /plugin shows a Context cost estimate for plugins in the official marketplace; the Installed tab has a "Not used recently" group suggesting plugins to turn off.
Risks and caveats
- Know the source: only marketplaces from
github.com/anthropics/can carry official names (claude-plugins-official…). Every other marketplace, including a colleague's, is third-party. - Read before installing: look at the plugin's hooks and scripts; hooks run automatically without asking.
- Don't collect them: 20 enabled plugins means hundreds of skill descriptions in context, and Claude picks the wrong one more easily.
- Cloud sessions (claude.ai/code) don't load plugins from your local settings.
How to apply it
- Dev: Review
/plugin→ Installed and disable plugins you didn't use last week. Bundle your favourite personal skills into your own plugin to carry them to other machines. - Tech Lead: Create an internal team marketplace: one "team standard" plugin with review skills, format hooks and internal MCP, enabled at Project scope. Organisations can allowlist marketplaces with managed settings.
- PM: Package your PRD and release-note workflows as a plugin so the whole product group follows one standard.
Sources & references
- Plugins overview — Claude Code Docs