Claude Code

Plugins and skills

How Claude Code plugins package skills, agents, hooks, MCP, LSP and monitors, and how to migrate standalone configuration into reusable plugins.

Claude Code offers two extension layers. If you are choosing between CLAUDE.md, a skill, subagent, MCP, hook or plugin, start with how it works and the extension map. For official, community and internal marketplaces, version constraints, recommendations and security governance, see plugin marketplaces and distribution.

MethodLocationSuitable for
Standalone configurationProject or user .claude/One project, personal workflows and quick experiments
PluginIndependent directory, optionally with .claude-plugin/plugin.jsonTeam sharing, versioning, multiple projects and marketplace distribution

For a command needed only in this project, begin with .claude/commands or .claude/skills. Package it as a plugin when it needs to be shared or reused.

#What a plugin can contain

Directory or filePurpose
.claude-plugin/plugin.jsonManifest with name, description and version
skills/Skill directories, each containing SKILL.md
commands/Legacy flat commands; prefer skills/ in new plugins
agents/Custom subagents
hooks/ or hooks.jsonEvent handlers
.mcp.jsonMCP server configuration
.lsp.jsonLanguage server configuration
monitors/Background monitor configuration
bin/Executables added to Bash PATH when the plugin is enabled
settings.jsonDefault plugin settings

Do not put skills/, agents/ or hooks/ inside .claude-plugin/. That directory contains only plugin.json.

#Minimal plugin structure

my-plugin/
├── .claude-plugin/
│   └── plugin.json
└── skills/
    └── review-api/
        └── SKILL.md

plugin.json:

{
  "name": "my-plugin",
  "description": "Team workflows for API review",
  "version": "1.0.0",
  "author": {
    "name": "Your Team"
  }
}

skills/review-api/SKILL.md:

---
description: Review API changes for compatibility, auth, pagination, errors, and observability.
---

Review the API change in $ARGUMENTS.
Check request/response compatibility, auth boundary, pagination, error codes, and logs.
Return findings first, then suggested fixes.

Enable it for testing:

claude --plugin-dir ./my-plugin

Invoke it in the session:

/my-plugin:review-api src/routes/billing.ts

#Skill names and arguments

ItemMeaning
Standalone skillUsually /skill-name
Plugin skillUsually /plugin-name:skill-name
Arguments$ARGUMENTS receives text after the command
Automatic invocationdescription helps Claude decide when to use it
Disable automatic invocationSet disable-model-invocation: true in frontmatter
Restrict toolsUse allowed-tools or permission rules

Namespaces prevent collisions when several plugins define commands such as /deploy or /review.

#When to migrate from .claude/

SignalAction
Several projects copy the same commandsPackage a plugin
Teams need consistent hooks/agentsPackage and version a plugin
Bash PATH needs helper scriptsUse plugin bin/
MCP, LSP or monitors need distributionManage them through the plugin manifest
Rules apply only to this repositoryKeep project .claude/ configuration

A practical progression is standalone configuration, then a stable plugin, then marketplace or internal-repository distribution.

#Plugins and caching

OperationCache effect
Invoke a skillAppends a message; the previous prefix usually remains reusable
Enable a plugin containing only skills/hooks/agentsUsually appends instructions rather than rebuilding the system prompt
Plugin includes MCP serversDepends on tool search; upfront schemas can invalidate the prefix
/reload-pluginsChanges affect the first turn after reload
Disable and re-enableEarlier caches may remain usable within TTL

With many plugins, check whether MCP tools are deferred. Otherwise changing the toolset can cause a cache miss.

#Official references

Support

Need help?

For setup, billing, or model issues, email us. Check the status page for uptime.

WeChat / QQ support is available at the bottom right.