GuideAgentic ways of working · Intermediate

Plugins: package and share your agent setup

A Claude Code plugin bundles skills, agents, hooks, MCP servers and commands into one install. plugin.json and marketplace.json, install scopes, pinning versions to a commit, rolling a setup out to a team, and how to vet what you install.

Checked 13 Oct 202615 min read1 skill

On this page
  1. What it is
  2. When to use it
  3. How it works
  4. Members only: Set it up step by step
  5. Members only: plugin.json and marketplace.json
  6. Members only: Install, pin and update
  7. Members only: Distribute a team setup
  8. Members only: Supply-chain caution
  9. Members only: Recipe: a team plugin and a pinned marketplace
  10. Members only: Patterns that work
  11. Members only: Mistakes to avoid
  12. Members only: Exercises

Once your team has a few good skills, a reviewer agent and three hooks that everyone should run, copying folders between repositories stops working. A plugin packages that setup as one unit with a name and a version, so a teammate installs it with one command and gets updates when you release them.

What it is#

A Claude Code plugin is a directory of components that Claude Code installs and loads together. An optional manifest at .claude-plugin/plugin.json gives it a name, a version and other metadata. Everything else sits at the plugin root.

ComponentWhere it goesWhat you get
Skillsskills/<name>/SKILL.md/plugin-name:skill-name, and Claude loads it when relevant
Commandscommands/<name>.md/plugin-name:name. The older format: prefer skills for new work
Agentsagents/<name>.mdA subagent named plugin-name:agent-name
Hookshooks/hooks.jsonHooks that fire whenever the plugin is enabled
MCP servers.mcp.jsonTools named mcp__plugin_<plugin>_<server>__<tool>
LSP servers.lsp.jsonDiagnostics and code navigation for a language
Monitorsmonitors/monitors.jsonBackground commands whose output reaches Claude, in interactive sessions only
Output styles, themes, workflowsoutput-styles/, themes/, workflows/Entries in the matching pickers and commands
Executablesbin/Commands on the Bash tool's PATH while the plugin is enabled
Default settingssettings.jsonOnly agent and subagentStatusLine take effect

Every component is namespaced under the plugin's name, so two plugins can each ship a review skill without a clash. A CLAUDE.md at the plugin root is not loaded. Put instructions in a skill.

Plugins usually come from a marketplace: a repository or directory with a .claude-plugin/marketplace.json file that lists plugins and where to fetch each one. It is a catalog, not a store. You add a marketplace once, then install from it by name, such as commit-commands@claude-plugins-official.

1. Level 1, always loaded: the name and description of every installed skill, a few dozen tokens each. 2. A task arrives: fill in this PDF form. Its description matches the pdf skill. 3. Level 2: the pdf skill SKILL.md body loads into context. Other skills stay unloaded. 4. The body says to run scripts/fill.py. 5. Level 3: only that script loads. reference.md stays on disk because nothing asked for it.1 · Always loadedevery skill's name and description2 · When a task fitsthat skill's SKILL.md body3 · Only when called forscripts and reference filespdfPDF formsslidesslide deckssql-reviewquery checkspdf/SKILL.mdRun scripts/fill.pyother skillsnot loadedscripts/fill.pyreference.mdNew taskFill in this PDF form

When to use it#

Make a plugin when you want to:

  • give the same skills, agents and hooks to teammates without each of them copying files,
  • use one setup across many repositories,
  • ship versioned releases, so people move to a new version on purpose,
  • require a setup across a company through managed settings.

Install a plugin when someone else has already built what you need and you have read what it runs.

Stay with plain files when the setup serves one project, which belongs in that repo's .claude/ folder, or only you, which belongs in ~/.claude/. One MCP server needs only claude mcp add. A single skill needs only a folder. Packaging adds a manifest, a marketplace and a release step, so do it when sharing is the problem.

Two limits shape the decision. Cloud sessions, including routines and claude.ai/code, do not install the plugins a repository enables in .claude/settings.json or the plugins in your user settings. And the same plugin folder installs on claude.ai and in Cowork with a different subset of components: a local stdio MCP server does not run on claude.ai, and claude.ai and Cowork refuse a plugin with a top-level bin/ folder.

How it works#

A plugin reaches a session in three layers. Your settings list the marketplaces you added and the plugins you enabled. The disk holds what Claude Code fetched, under ~/.claude/plugins/cache/<marketplace>/<plugin>/<version>/. And each session loads the enabled plugins at startup, or when you run /reload-plugins.

An enabled plugin is part of every session, not only the ones where you use it:

  • Context. The name and description of each skill, agent and command that Claude can invoke on its own sit in context on every turn. Full text loads only when used.
  • Processes. Its MCP servers run alongside the session, and its hooks fire on their events.
  • Permissions. What the plugin runs, it runs as you, with your user privileges.

Check the footprint before and after you install. In /plugin, plugins from Anthropic's official marketplace show a context cost estimate. After installing, claude plugin details <name> prints the tokens the plugin adds to every session, and the Installed tab groups plugins you have not used recently.

Claude Code adds Anthropic's official marketplace, claude-plugins-official, the first time you start an interactive terminal session, unless a managed policy blocks it. Marketplace names that look like Anthropic's are accepted only from github.com/anthropics/ repositories, so a third-party catalog cannot pose as an official one. A coworker's marketplace is third-party, and so is your organization's.

GitHub Copilot and Cursor document plugin systems and marketplaces of their own, and both describe an Agent Plugins 1.0 format whose skills and MCP configuration other compatible clients can read. OpenAI distributes skills and connectors for ChatGPT and Codex as plugins too. Claude Code's docs describe its own .claude-plugin/plugin.json format, so check each tool's docs before you assume a plugin carries over. The skills inside a plugin follow the open Agent Skills format and are the most portable part.

Set it up step by step

1. Build the smallest plugin that works

Members only below this line

Get the rest of this guide free

What you get on this page:

  • 1 skill

Free. You also get Stratiflux Weekly: one email a week, unsubscribe anytime.

Also in the members part

  1. plugin.json and marketplace.json
  2. Install, pin and update
  3. Distribute a team setup
  4. Supply-chain caution
  5. Recipe: a team plugin and a pinned marketplace
  6. Patterns that work
  7. Mistakes to avoid
  8. Exercises

Sources

Checked against these on 13 Oct 2026.

  1. Plugins overview (Claude Code docs) (opens in a new tab)code.claude.com
  2. Create a Claude Code plugin (opens in a new tab)code.claude.com
  3. Add components to a plugin (opens in a new tab)code.claude.com
  4. Plugin manifest reference (plugin.json) (opens in a new tab)code.claude.com
  5. Marketplace reference (marketplace.json) (opens in a new tab)code.claude.com
  6. Install and manage plugins (opens in a new tab)code.claude.com
  7. Plugin loading reference: versions and updates (opens in a new tab)code.claude.com
  8. Plugin security and trust (opens in a new tab)code.claude.com
  9. Manage Claude Code plugins for your organization (opens in a new tab)code.claude.com
  10. Publish and distribute a plugin (opens in a new tab)code.claude.com