A Claude Code plugin can bundle things such as Skills, custom agents, hooks, MCP servers, LSP servers, and background monitors. Instead of rebuilding the same setup for every project, you can package it once and share it with teammates or a community.
.claude/plugin.json.claude/ configurationThink of a plugin like a toolbox. Your toolbox can contain several reusable tools, and Claude Code can load that toolbox when you need it.
company-java-tools and reuse it.
.claude/Claude Code supports both standalone configuration and plugins. A useful beginner rule is: start locally, package when you want to share.
| Approach | Example name | Best for |
|---|---|---|
Standalone.claude/ |
/hello |
One project, personal customization, experiments and quick iteration. |
| Plugin | /my-plugin:hello |
Team/community sharing, reusable capabilities, versioned releases and marketplaces. |
mkdir my-first-plugin
A plugin is a self-contained directory. The directory can contain its manifest and the components you want to ship.
mkdir my-first-plugin/.claude-plugin
Create:
my-first-plugin/.claude-plugin/plugin.json
{
"name": "my-first-plugin",
"description": "A greeting plugin to learn the basics",
"version": "1.0.0",
"author": {
"name": "Your Name"
}
}
| Field | Meaning |
|---|---|
name | Plugin identity and the namespace used by plugin Skills. |
description | Description shown in the plugin manager. |
version | Optional version. If used, bump it when you want version-based updates. |
author | Optional attribution information. |
.claude-plugin/ directory is for the manifest.
Do not put your normal skills/, agents/, hooks/, etc.
inside that directory. Those belong at the plugin root.
mkdir -p my-first-plugin/skills/hello
Create:
my-first-plugin/skills/hello/SKILL.md
---
description: Greet the user with a friendly message
disable-model-invocation: true
---
Greet the user warmly and ask how you can help them today.
The folder name hello becomes the Skill name. Because the plugin is named
my-first-plugin, the invocation becomes:
/my-first-plugin:hello
claude --plugin-dir ./my-first-plugin
Then inside Claude Code:
/my-first-plugin:hello
You can also use /help to find the Skill under the plugin namespace.
The $ARGUMENTS placeholder captures text supplied after the Skill name.
---
description: Greet the user with a personalized message
---
# Hello Skill
Greet the user named "$ARGUMENTS" warmly and ask how you can help them today.
Now:
/my-first-plugin:hello Alex
The Skill can use Alex as the argument supplied by the user.
After changing the plugin, use:
/reload-plugins
A plugin can grow from one simple Skill into a complete development toolkit.
my-plugin/
├── .claude-plugin/
│ └── plugin.json
├── skills/
│ └── code-review/
│ └── SKILL.md
├── agents/
│ └── security-reviewer.md
├── hooks/
│ └── hooks.json
├── .mcp.json
├── .lsp.json
├── monitors/
│ └── monitors.json
├── bin/
└── settings.json
| Path | Purpose |
|---|---|
.claude-plugin/ | Contains plugin.json manifest. |
skills/ | Skills stored as folders containing SKILL.md. |
commands/ | Flat Markdown command files; Skills directory is preferred for new plugins. |
agents/ | Custom agent definitions. |
hooks/ | Event handlers, typically configured in hooks.json. |
.mcp.json | MCP server configurations. |
.lsp.json | LSP server configurations for code intelligence. |
monitors/ | Background monitor configuration. |
bin/ | Executables added to Bash PATH while the plugin is enabled. |
settings.json | Default settings applied when the plugin is enabled. |
my-plugin/.claude-plugin/skills/.
Use my-plugin/skills/.
The plugin root is the important boundary.
Reusable instructions/workflows that extend Claude's capabilities.
skills/name/SKILL.md
Custom specialized Claude workers with their own configuration.
agents/
Event-driven actions that can react to Claude Code events.
hooks/hooks.json
External tool/server integrations packaged with the plugin.
.mcp.json
Language-server based code intelligence for supported languages.
.lsp.json
Background watchers that can send notifications to Claude.
monitors/monitors.json
my-plugin/
├── .claude-plugin/plugin.json
└── skills/
└── code-review/
└── SKILL.md
The Skill's description helps Claude understand when it should use the Skill.
For example:
---
description: Reviews code for best practices and potential issues.
Use when reviewing code, checking PRs, or analyzing code quality.
---
When reviewing code, check:
1. Code organization and structure
2. Error handling
3. Security concerns
4. Test coverage
The documentation shows that an LSP plugin can define a language server in
.lsp.json. For example:
{
"go": {
"command": "gopls",
"args": ["serve"],
"extensionToLanguage": {
".go": "go"
}
}
}
[
{
"name": "error-log",
"command": "tail -F ./logs/error.log",
"description": "Application error log"
}
]
A background monitor can watch logs, files or external status. Each stdout line from the configured command can be delivered to Claude as a notification during the session.
Instead of passing --plugin-dir every time, Claude Code can scaffold a plugin
in the skills directory:
claude plugin init my-tool
The current documentation describes this as creating
~/.claude/skills/my-tool/ with a manifest and starter Skill.
On the next session it can load as my-tool@skills-dir.
A plugin can include settings.json at its root. The current documentation states
that the supported keys here are agent and subagentStatusLine.
{
"agent": "security-reviewer"
}
This example activates the plugin's security-reviewer custom agent as the main
thread, applying that agent's system prompt, tool restrictions and model.
plugin.json → describes the pluginsettings.json → provides default behavior when enabled
claude --plugin-dir ./my-plugin
This loads the plugin directly without requiring a normal installation.
claude --plugin-dir ./my-plugin.zip
claude --plugin-dir ./plugin-one \
--plugin-dir ./plugin-two
/reload-plugins
The reload operation can reload plugin-related Skills, agents, hooks, plugin MCP servers and plugin LSP servers. Some non-interactive MCP changes may wait until the next session.
claude --plugin-url https://example.com/my-plugin.zip
This loads a packaged ZIP for that session. Only use URLs for plugin archives you control or trust.
Current Claude Code versions can also load a folder containing multiple plugins. The documentation notes that this behavior requires Claude Code v2.1.265 or later.
plugins/
├── java-tools/
│ └── .claude-plugin/plugin.json
├── frontend-tools/
│ └── .claude-plugin/plugin.json
└── security-tools/
└── .claude-plugin/plugin.json
claude --plugin-dir ./plugins
Claude Code examines the folder's immediate subfolders. A subfolder with a valid
.claude-plugin/plugin.json can load as a plugin.
When the plugin is ready for other people:
README.md with installation and usage instructions.| Marketplace | Purpose | Important point |
|---|---|---|
claude-plugins-official |
Curated official Anthropic plugins. | Anthropic decides what is included; there is no normal application process for inclusion. |
claude-community |
Public community marketplace for third-party submissions. | Submissions go through review and automated safety screening. |
Users can add the community marketplace with:
/plugin marketplace add anthropics/claude-plugins-community
Before submitting a plugin, validate it locally:
claude plugin validate ./your-plugin
Strict validation can treat warnings as errors:
claude plugin validate ./your-plugin --strict
.claude/ Configuration to a PluginSuppose you already have a project with:
.claude/
├── commands/
├── agents/
├── skills/
└── settings.json
You can package those capabilities into a plugin.
mkdir -p my-plugin/.claude-plugin
{
"name": "my-plugin",
"description": "Migrated from standalone configuration",
"version": "1.0.0"
}
cp -r .claude/commands my-plugin/
cp -r .claude/agents my-plugin/
cp -r .claude/skills my-plugin/
mkdir my-plugin/hooks
Create my-plugin/hooks/hooks.json and move the hooks configuration from the
existing settings into the plugin's hooks configuration.
{
"hooks": {
"PostToolUse": [
{
"matcher": "Write|Edit",
"hooks": [
{
"type": "command",
"command": "jq -r '.tool_input.file_path' | xargs npm run lint:fix"
}
]
}
]
}
}
claude --plugin-dir ./my-plugin
| Standalone | Plugin |
|---|---|
| Usually tied to one project. | Can be shared through marketplaces. |
Commands under .claude/commands/. | Commands/Skills live under the plugin root. |
| Hooks in settings. | Hooks can live in hooks/hooks.json. |
| Manual copying for sharing. | Install and distribute as a plugin. |
Skill can be /skill-name. | Plugin Skill becomes /plugin-name:skill-name. |
Imagine a team building Spring Boot applications. They repeatedly want Claude to perform the same checks:
A conceptual plugin could look like:
company-java-tools/
├── .claude-plugin/
│ └── plugin.json
├── skills/
│ ├── spring-review/
│ │ └── SKILL.md
│ └── test-review/
│ └── SKILL.md
├── agents/
│ └── security-reviewer.md
├── hooks/
│ └── hooks.json
└── settings.json
Then the team can reuse the same package across many repositories rather than rebuilding the configuration each time.
For a frontend team, a plugin might package capabilities around:
frontend-tools/
├── .claude-plugin/
│ └── plugin.json
├── skills/
│ ├── component-review/
│ │ └── SKILL.md
│ ├── accessibility-review/
│ │ └── SKILL.md
│ └── performance-review/
│ └── SKILL.md
├── agents/
│ └── frontend-reviewer.md
└── hooks/
└── hooks.json
| Mistake | Why it is a problem | Better approach |
|---|---|---|
Putting skills/ inside .claude-plugin/ |
Components belong at the plugin root. | Use plugin/skills/. |
Forgetting plugin.json |
The plugin may not have the expected identity/metadata. | Create the manifest when using the manifest-based layout. |
| Testing only after marketplace publication | Feedback cycle becomes slow. | Use --plugin-dir during development. |
| Changing files but not reloading | Current session may still use the old plugin state. | Use /reload-plugins when appropriate. |
| Assuming LSP binary is installed | Plugin configuration does not install the language server. | Ensure the required binary exists on the user's machine. |
| Trusting every third-party plugin | Plugins can contain powerful functionality. | Review and trust the source before installing. |
| Duplicating migrated configuration | Standalone and plugin copies may both remain active. | Clean up the original configuration after verifying migration. |
--plugin-dir./reload-plugins during iteration.| Thing | Think of it as | Main purpose |
|---|---|---|
| Skill | A reusable instruction/workflow | Teach Claude how to perform a repeatable task. |
| Agent | A specialized worker | Give Claude a focused role/configuration. |
| Hook | An event reaction | Run behavior when a matching Claude Code event occurs. |
| MCP | An external tool connection | Connect Claude Code to external tool servers. |
| LSP | Code intelligence | Provide language-server based understanding of code. |
| Monitor | A background watcher | Watch logs/files/status and notify Claude. |
| Plugin | A package/toolbox | Bundle and distribute these capabilities together. |
| Goal | Command / File |
|---|---|
| Create plugin directory | mkdir my-plugin |
| Create manifest directory | mkdir my-plugin/.claude-plugin |
| Manifest | .claude-plugin/plugin.json |
| Skill | skills/name/SKILL.md |
| Test plugin | claude --plugin-dir ./my-plugin |
| Test ZIP | claude --plugin-dir ./my-plugin.zip |
| Reload changes | /reload-plugins |
| Plugin URL | claude --plugin-url https://... |
| Initialize skills-directory plugin | claude plugin init my-tool |
| Validate | claude plugin validate ./your-plugin |
| Strict validation | claude plugin validate ./your-plugin --strict |
| Community marketplace | /plugin marketplace add anthropics/claude-plugins-community |
.claude/ configuration instead of a plugin?.claude-plugin/plugin.json?$ARGUMENTS do inside a Skill?skills/ live?.claude/ setup be migrated into a plugin?Create my-first-plugin with one hello Skill. Test it using
--plugin-dir.
Modify the Skill to accept $ARGUMENTS and personalize the response.
Create a code-review Skill with a checklist for readability, security and tests.
Create a sample .claude/ setup and convert it into a plugin.
Create a minimal .lsp.json configuration and identify which external binary it requires.
Design a company plugin containing a Skill, agent, hook and default settings.
Standalone configuration is great for experimenting and project-specific behavior.
Plugin is what you package when the capability should be reusable, versioned, shareable or distributed.
The normal learning path is: build → test locally → reload → validate → document → share.
Claude Code plugins are best understood as reusable extension packages. They give you a structured way to move from a small personal Claude Code customization to something that can be reused across projects and shared with a team or community.
If you remember only three things, remember:
.claude/ is excellent for local/project experimentation.--plugin-dir before sharing.