
Plugin development in Claude Code unlocks powerful extensibility beyond basic configurations. Learn to create shareable plugins with custom skills, agents, and MCP servers that your team can install across projects—complete with proper namespacing and version control.
Your Claude Code setup works fine for personal projects, but what happens when you want to share that brilliant custom skill with your team? Or when you need the same agent behavior across multiple codebases?
That's where Claude Code plugins come in—the difference between scattered configuration files and professional, shareable extensions.
Most developers start with standalone configuration in their .claude/ directory. It's quick, it works, and skills get clean names like /hello or /review. But this approach hits walls fast:
/code-review skill without copy-pasting filesPlugins solve these problems by packaging your extensions into distributable, versioned bundles. Yes, you get namespaced skill names like /my-plugin:hello instead of just /hello, but that's the price of professional tooling.
The choice isn't really between plugins and standalone config—it's between personal scripts and professional tools that scale with your team.
The decision matrix is clearer than most documentation suggests:
Use standalone configuration (.claude/ directory) when:
/deploy or /testUse plugins when:
Start standalone, migrate to plugins when you hit sharing friction. The conversion process is straightforward once you understand the structure.
Let's build a plugin that demonstrates the core concepts without getting lost in complexity.
Every plugin needs a specific directory structure. The plugin manifest lives in .claude-plugin/plugin.json, while everything else goes at the plugin root:
mkdir my-first-plugin
mkdir my-first-plugin/.claude-plugin
Create your plugin manifest at 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"
}
}
The name field becomes your namespace prefix—skills in this plugin will be called /my-first-plugin:skillname. Choose wisely, because changing it breaks existing users.
Skills are the most common plugin component. Each skill lives in its own folder under skills/ with a SKILL.md file:
mkdir -p my-first-plugin/skills/hello
Create my-first-plugin/skills/hello/SKILL.md:
---
description: Greet the user with a personalized message
disable-model-invocation: true
---
# Hello Skill
Greet the user named "$ARGUMENTS" warmly and ask how you can help them today. Make the greeting personal and encouraging.
The frontmatter (YAML between --- lines) configures skill behavior:
description: Shows up in help text and plugin browsersdisable-model-invocation: Prevents Claude from calling external APIs for this simple skill$ARGUMENTS: Captures everything after the skill nameThe --plugin-dir flag lets you test plugins without installing them:
claude --plugin-dir ./my-first-plugin
Once Claude Code starts, try your namespaced skill:
/my-first-plugin:hello Alex
Claude should greet you by name. Run /help to see your skill listed under the plugin namespace section.
Plugin development follows a tight feedback loop: edit the skill file, restart Claude Code with
--plugin-dir, test the change, repeat.
Once you master basic skills, plugins unlock much more sophisticated functionality.
Plugins can package custom agents alongside skills. Create an agents/ directory and define specialized AI assistants:
mkdir my-first-plugin/agents
Agents get their own configuration files and can have plugin-specific skills that only work within that agent context.
Model Context Protocol (MCP) servers give Claude access to external systems—databases, APIs, file systems. When packaged in plugins, MCP servers become shareable infrastructure:
{
"name": "database-plugin",
"mcp": {
"servers": {
"postgres": {
"command": "mcp-server-postgres",
"args": ["--connection-string", "${DATABASE_URL}"]
}
}
}
}
This plugin would give Claude SQL querying capabilities in any project where it's installed.
The hooks/ directory lets plugins respond to Claude Code events:
Hooks turn plugins into active development tools, not just collections of skills.
Development plugins need robust testing workflows:
--plugin-dir for rapid iteration without installationclaude --debug to see plugin loading errorsAlready have skills in .claude/? The migration path is mechanical:
mkdir my-plugin && mkdir my-plugin/.claude-pluginskills/, agents/, hooks/ from .claude/ to plugin rootplugin.json with proper metadata/skillname to /plugin-name:skillname in your workflows--plugin-dir to verify everything worksThe functionality remains identical—you're just adding professional packaging.
Once your plugin works locally:
1.0.0 format and bump appropriately for changesPlugin development is software development—apply the same rigor you'd use for any tool your team depends on.
Claude Code plugins transform scattered configuration files into professional, shareable development tools. While standalone configurations work fine for personal experiments, plugins become essential once you need to share functionality across team members or projects. The namespacing trade-off (longer skill names) pays dividends in conflict prevention and professional polish. Start with standalone skills for rapid prototyping, then migrate to plugins when you hit sharing friction—your future self and teammates will thank you for the investment in proper tooling.
Rate this tutorial