Introduction
Claude Code now supports plugins — modular extensions that let you customize and extend Claude Code’s capabilities by bundling slash commands, agents (subagents), Model Context Protocol (MCP) servers, and hooks.
Plugins provide a lightweight, shareable way to package workflows, integrations, and automation, so you and your team can standardize and reuse custom logic.
Features
Here are the main features and capabilities of Claude Code plugins:
- Slash Commands: You can define custom commands (e.g.
/hello
,/format
) to trigger specific behaviors or shortcuts. - Subagents / Agents: Plugins may include purpose-built agents for specialized tasks.
- MCP Servers Integration: You can bundle MCP server definitions to connect Claude Code to external tools, services, or data sources.
- Hooks / Event Handlers: Plugins can define hooks to run custom logic at key points in the workflow (e.g. on specific events).
- Toggleable / Modular: You can enable or disable plugins to adjust Claude Code’s context footprint and reduce complexity when not needed.
- Plugin Marketplaces: Plugins can be bundled into marketplaces (catalogs), making it easier for teams or the community to share and reuse plugin collections.
- Team / Repository-level Plugins: You can declare in your project’s configuration which marketplaces and plugins should be used, so team members get consistent plugin setups.
Installation / Setup
Here’s a high-level guide on how to install and set up plugins in Claude Code:
Prerequisites
- Claude Code must already be installed and running.
- You should have basic command-line familiarity.
Basic Steps & Quickstart
Create a plugin (for developers):
- Make a directory for the plugin, e.g.
my-first-plugin
, and inside it a.claude-plugin/plugin.json
manifest that describes the plugin (name, version, author, description). - Optionally, add subdirectories for
commands/
,agents/
,hooks/
, etc., containing your plugin logic. - If you want to distribute, create a
marketplace.json
that references your plugin(s).
Install / enable plugins (as a user):
- Inside Claude Code, use the
/plugin
command. - You may first add a marketplace, e.g.:
/plugin marketplace add user-or-org/repo-name
Then browse or install from that marketplace.
- Or use direct install commands, for example:
/plugin install my-plugin@marketplace-name
You can also enable, disable, or uninstall as needed.
- After installing a plugin, you may need to restart Claude Code to activate the new plugin.
Verify the installation:
- Use
/help
to check if new slash commands or features appear. - Use
/plugin → “Manage Plugins”
to inspect installed plugins and see what they provide.
Team / Repository Plugin Setup:
In a project repo’s .claude/settings.json
, you can declare which marketplaces and plugins should be used by all team members.
When users “trust” the repo, Claude Code will auto-install those plugins.
Developing & testing locally:
- Use a local “development marketplace” structure to test plugins in isolation.
- Iterate: uninstall and reinstall the plugin after modifications to test changes.
- Debug by checking directory structure, stepping through individual components, and using provided CLI debugging tools.
Demo (Example Walkthrough)
Here’s a simple example to illustrate how one might build, install, and test a minimal plugin for Claude Code.
Example: Greeting Plugin
Create plugin skeleton
test-marketplace/
.claude-plugin/
marketplace.json
my-first-plugin/
.claude-plugin/
plugin.json
commands/
hello.md
plugin.json (inside my-first-plugin/.claude-plugin/
):
{
"name": "my-first-plugin",
"description": "A simple greeting plugin to learn the basics",
"version": "1.0.0",
"author": {
"name": "Your Name"
}
}
commands/hello.md:
---
description: Greet the user with a personalized message
---
# Hello Command
Greet the user warmly and ask how you can help them today. Make the greeting personal and encouraging.
marketplace.json (in test-marketplace/.claude-plugin/
):
{
"name": "test-marketplace",
"owner": {
"name": "Test User"
},
"plugins": [
{
"name": "my-first-plugin",
"source": "./my-first-plugin",
"description": "My first test plugin"
}
]
}
Launch Claude Code & install plugin
cd test-marketplace
claude
Within Claude Code:
/plugin marketplace add ./test-marketplace
/plugin install my-first-plugin@test-marketplace
Select “Install now” when prompted, and then restart Claude Code if needed.
Test the plugin
- Run
/hello
→ you should see Claude respond using your greeting command. - Run
/help
→ thehello
command should appear in the list.
References:
https://www.anthropic.com/news/claude-code-plugins
https://docs.claude.com/en/docs/claude-code/setup