Back to Knowledge
New

Claude Code Plugins

A plugin

Plugin (Claude Code)

An installable bundle that adds skills, subagents, hooks, and MCP servers to Claude Code in one step. A plugin has a `.claude-plugin/plugin.json` manifest; its skills are invoked as `/plugin-name:skill-name`. Install with `/plugin install commit-commands@claude-plugins-official` or browse with `/plugin`.

"Like an expansion pack for a game. One install, and you get new characters, levels, and items together."

is a folder of skills, subagents, hooks, and MCP servers that installs as one unit. Instead of copying five files between projects (and forgetting one), you install a plugin with one command and get updates when its author ships them. Here's how to find good ones, build your own, and share them with your team without handing strangers the keys to your laptop.

1What a plugin is (and why it exists)

Claude Code

Claude Code

Anthropic's agentic coding tool. It lives in your terminal (and in VS Code, JetBrains, and on the web), reads your codebase, edits files, runs commands, and ships code. Install with the native installer (`curl -fsSL https://claude.ai/install.sh | bash` on macOS/Linux, `irm https://claude.ai/install.ps1 | iex` on Windows); it needs a Pro, Max, Team, Enterprise, or Console account.

"Like having a senior developer living in your terminal, ready to help 24/7."

already lets you add a skill

Claude Skill

A folder with a SKILL.md file that teaches Claude how to do a specific task. Claude loads it automatically when your request matches its description, or you run it directly as `/skill-name`. Skills live in `.claude/skills/<name>/SKILL.md` (project), `~/.claude/skills/` (personal), or inside plugins, and they now also cover what used to be custom slash commands.

"Like a recipe card Claude can reference. When you ask for something matching the recipe's purpose, Claude pulls out the card and follows the instructions."

in .claude/skills/, a subagent

Subagent

A specialized AI agent Claude Code can delegate a task to. It works in its own separate context window with its own tools and instructions, then reports back a summary. Define one as a Markdown file in `.claude/agents/` (project) or `~/.claude/agents/` (personal) with `name` and `description` frontmatter; Explore, Plan, and general-purpose are built in.

"Like hiring a specialist contractor for a specific part of a project. They work independently and report back when done."

in .claude/agents/, hooks

Hooks (Claude Code)

Handlers that run automatically at specific moments in a Claude Code session, such as before a tool runs (PreToolUse), after it finishes (PostToolUse), when you submit a prompt, or when Claude stops. A hook can be a shell command, an HTTP call, an MCP tool, or a prompt, and can block risky actions. Configure them under the `hooks` key in settings.json or ship them in a plugin.

"Like motion-sensor lights. When something happens (motion), an action triggers automatically (lights on)."

in settings, and MCP

MCP (Model Context Protocol)

An open standard for connecting AI apps to external tools and data (databases, GitHub, docs, browsers). Servers run locally over stdio or remotely over Streamable HTTP, and remote servers use OAuth 2.1 for sign-in. In Claude Code: `claude mcp add --transport http <name> <url>`.

"Like USB ports for AI. A universal way to plug in new capabilities."

servers in .mcp.json. Each works fine on its own. The problem shows up when you want the same setup in ten repos, or on a teammate's machine.

A plugin bundles those pieces into one directory with a small manifest. Think of it like an app on your phone versus a pile of loose files: one install, one uninstall, one version number.

Plugin

One directory of components plus a manifest.

Marketplace

Plugin Marketplace

A catalog of Claude Code plugins, usually a Git repository with a `marketplace.json`. The official `claude-plugins-official` marketplace is added automatically; add others with `/plugin marketplace add owner/repo`. Teams use private marketplaces to share their standard skills and hooks.

"Like an app store, except anyone (including your team) can open their own shelf."

A catalog (a repo with .claude-plugin/marketplace.json) listing plugins and where to fetch them.

Install scope

User (all your projects), project (everyone in the repo), or local (just you, just here).

2Install plugins from a marketplace

Anthropic's official marketplace, claude-plugins-official, is added automatically the first time you start an interactive session. Open the plugin manager and browse the Discover tab:

Claude Code

/plugin

The manager has Discover, Installed, and Marketplaces tabs. Or install directly by name, as plugin@marketplace:

Claude Code

/plugin install commit-commands@claude-plugins-official

From your shell, pick the scope explicitly:

Terminal

# enable for everyone working in this repo (writes .claude/settings.json)
claude plugin install commit-commands@claude-plugins-official --scope project

# see what's installed and whether it loaded
claude plugin list

Add another marketplace

A marketplace can be a GitHub owner/repo, any git URL, a local folder, or an https URL to a marketplace.json. Anthropic's demo marketplace lives in the anthropics/claude-code repo:

Claude Code

/plugin marketplace add anthropics/claude-code
/plugin install code-review@claude-code-plugins

Every enabled plugin is in every session. The name and description of each skill and agent it ships sit in your context window

Context Window

The amount of text an AI can 'see' at once, measured in tokens: your instructions, the conversation, files it read, and tool results. Current Claude models (Opus 5.5, Sonnet 5, Fable 5.1) offer 1M-token windows and Haiku 4.5 has 200K, but even huge windows work best when kept focused.

"Like short-term memory. The bigger the window, the more the AI can remember from your conversation."

on every turn, even when you never use them. Disable what you're not using on this project with /plugin or claude plugin disable. See Context Engineering.

3What a plugin can bundle

Skills

skills/<name>/SKILL.md

Instructions Claude loads when relevant. Run them yourself as /plugin-name:skill-name.

Agents

agents/*.md

Subagent definitions Claude can delegate to, like a reviewer or a test writer.

Hooks

hooks/hooks.json

Shell commands that fire at lifecycle events, such as after every edit.

MCP servers

.mcp.json

Tool servers Claude Code connects to while the plugin is enabled.

Commands

commands/*.md

The older, flat-file form of skills. Still loads; use skills/ for new plugins.

Everything a plugin provides gets namespaced with the plugin's name. A review skill in a plugin named my-plugin runs as /my-plugin:review, so two plugins can both ship a review skill without colliding. Hooks are the exception: they have no prefix and just fire.

4Build your own plugin

You don't need a marketplace to start. Build a folder, point Claude Code at it, iterate. Here's a plugin for a team that ships Next.js apps: a deploy-check skill, a reviewer agent, and a formatter hook.

Layout

saucy-nextjs/
├── .claude-plugin/
│   └── plugin.json        # the manifest (ONLY this goes in here)
├── skills/
│   └── deploy-check/
│       └── SKILL.md
├── agents/
│   └── reviewer.md
├── hooks/
│   └── hooks.json
└── .mcp.json              # optional

.claude-plugin/plugin.json

{
  "name": "saucy-nextjs",
  "description": "Deploy checks, code review, and formatting for our Next.js apps",
  "version": "1.0.0",
  "author": {
    "name": "Your Name"
  }
}

name is required, has no spaces, and becomes the prefix on every skill and agent. version is optional; setting it pins users to that version until you bump it.

skills/deploy-check/SKILL.md

---
name: deploy-check
description: Pre-deploy checklist for our Next.js + Vercel apps. Use before any production deploy.
disable-model-invocation: true
---

1. Run `npx tsc --noEmit` and `npm test`. Stop if either fails.
2. Confirm every variable in .env.example is set for Production in the Vercel project.
3. Check proxy.ts still protects /dashboard and /api/admin.
4. Summarize what's shipping in 5 bullets.

hooks/hooks.json

{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Write|Edit",
        "hooks": [
          { "type": "command", "command": "jq -r '.tool_input.file_path' | xargs npx prettier --write" }
        ]
      }
    ]
  }
}

Validate, load, iterate

Terminal

claude plugin validate ./saucy-nextjs
claude --plugin-dir ./saucy-nextjs

Inside that session, run /saucy-nextjs:deploy-check. After editing files on disk, run /reload-plugins instead of restarting. If something doesn't show up, check the Errors tab in /plugin.

Already have skills and agents under .claude/? Copy .claude/skills, .claude/agents, and .claude/commands into the plugin root, move the hooks object from your settings into hooks/hooks.json, and delete the originals once the plugin works (otherwise hooks run twice).

5Share it through a git marketplace

A marketplace is just a repo with a catalog file. It can be private. Teammates add it once and install by name, and they get your updates.

Layout

team-plugins/
├── .claude-plugin/
│   └── marketplace.json
└── plugins/
    └── saucy-nextjs/      # the plugin from above

.claude-plugin/marketplace.json

{
  "name": "team-plugins",
  "description": "Plugins for our team",
  "owner": {
    "name": "Your Name"
  },
  "plugins": [
    {
      "name": "saucy-nextjs",
      "source": "./plugins/saucy-nextjs",
      "description": "Deploy checks, code review, and formatting"
    }
  ]
}
  • Write source paths from the marketplace root (the folder containing .claude-plugin/). No ...
  • Keep the entry name identical to the name in the plugin's own plugin.json.
  • A plugin can also live in its own repo: { "source": "github", "repo": "your-org/saucy-nextjs" }.

Terminal

# test locally first
claude plugin validate ./team-plugins
claude plugin marketplace add ./team-plugins
claude plugin install saucy-nextjs@team-plugins

# after you push it to GitHub, teammates run:
claude plugin marketplace add your-org/team-plugins
claude plugin install saucy-nextjs@team-plugins

Don't name your marketplace something that looks official (like claude-official). Names such as claude-plugins-official are reserved for Anthropic repos and get rejected.

6Trust and security

The docs are blunt about it: a plugin you install can execute arbitrary code on your machine with your user privileges. Hooks run shell commands. Local MCP servers run as processes. And hooks and MCP servers run outside Claude Code's permission rules and sandbox. Your permission settings govern Claude's tool calls, not code the plugin runs by itself.

Before you install a third-party plugin

  1. Check where the marketplace came from: claude plugin marketplace list.
  2. Open the plugin in /plugin and read the Will install section.
  3. Read the source: hooks/hooks.json (what each hook runs), .mcp.json (each server's command or URL), and everything in bin/.
  4. After installing, inspect the installed copy: claude plugin details <name>.

Also remember that auto-update can change the files you reviewed. For anything that touches production credentials, prefer plugins from marketplaces you control. To remove one: claude plugin uninstall <plugin> with the scope you installed it at. Related reading: Prompt Injection & Security.

7Plugin or not?

Make a plugin when

  • You want the same skills/agents/hooks in several repos.
  • Teammates should get the setup, and updates to it, in one command.
  • You're packaging a workflow (e.g. "our deploy process") with several moving parts.
  • You want versioned releases.

Skip it when

  • It's one skill for one project: a file in .claude/skills/ is enough.
  • It's personal: ~/.claude/skills/ already works across all your projects.
  • You just need one MCP server: claude mcp add is simpler.
  • You'd be installing it "just in case." Unused plugins still cost context.

Official docs: Plugins overview , Create a plugin , Plugin security .

Next steps

Plugins are packaging. The good stuff is what you put inside them.