Claude Code Plugin Demo
A marketplace demonstrating all types of Claude Code plugins in one comprehensive example.
About This Marketplace
This repository serves as both documentation and a working example of how to create Claude Code plugins. It contains one complete plugin (my-first-plugin) that showcases all five plugin types:
- Commands - Quick slash commands
- Skills - Reusable capabilities
- Agents - Autonomous task executors
- Hooks - Event-driven automation
- MCP Servers - Custom tools and resources
🆕 New to Claude Code plugins? Read PLUGIN_TYPES_EXPLAINED.md for a beginner-friendly introduction to all plugin types!
Quick Start
Install the Marketplace
Option 1: Install from GitHub (Recommended)
# In Claude Code - this will clone the marketplace from GitHub
/plugin marketplace add yasun1/claude-code-plugin-demo
Option 2: Install from Local Directory
# If you've cloned the repository locally
/plugin marketplace add /path/to/your/clone/claude-code-plugin-demo
Note:
- The
username/repository format tells Claude Code to clone from GitHub at https://github.com/yasun1/claude-code-plugin-demo
- GitHub installs are cloned to
~/.claude/plugins/marketplaces/
- Local installs use the path you provide directly
Install the Plugin
/plugin install my-first-plugin@yasun1/claude-code-plugin-demo
Restart Claude Code
After installation, restart Claude Code to load the plugin.
Try It Out
# Test a command
/my-first-plugin:hello
# Use a skill
Use the code-reviewer skill to analyze this code
# Launch an agent
Run the bug-hunter agent to find bugs
Setup MCP Server (Optional)
To use the MCP server tools, you need to:
-
Find your marketplace clone path:
After installing from GitHub, the marketplace is cloned to:
~/.claude/plugins/marketplaces/yasun1-claude-code-plugin-demo/
For local installs, it's the path you specified.
-
Install dependencies in the marketplace clone:
IMPORTANT: Run npm install in the marketplace clone, not in the installed plugin folder.
# For GitHub installs:
cd ~/.claude/plugins/marketplaces/yasun1-claude-code-plugin-demo/my-first-plugin/mcp-server
npm install
# For local installs:
cd /your/local/path/claude-code-plugin-demo/my-first-plugin/mcp-server
npm install
-
Configure in .claude/settings.json:
Use the same marketplace clone path in your configuration:
{
"mcpServers": {
"my-first-plugin": {
"command": "node",
"args": ["~/.claude/plugins/marketplaces/yasun1-claude-code-plugin-demo/my-first-plugin/mcp-server/index.js"]
}
}
}
For local installs, use your local path:
{
"mcpServers": {
"my-first-plugin": {
"command": "node",
"args": ["/your/local/path/claude-code-plugin-demo/my-first-plugin/mcp-server/index.js"]
}
}
}
-
Restart Claude Code
Why use the marketplace clone path?
- MCP Server needs the
node_modules folder created by npm install
- The installed plugin folder (in
~/.claude/plugins/) is just a reference copy
- The marketplace clone is where you should run
npm install and where MCP Server runs from
For detailed setup instructions, see QUICKSTART.md.
What's Included
my-first-plugin
A complete demonstration plugin containing:
-
3 Commands:
/my-first-plugin:hello - Friendly greeting
/my-first-plugin:analyze-code - Code quality analysis
/my-first-plugin:project-stats - Project statistics
-
2 Skills:
code-reviewer - Comprehensive code review
doc-generator - Documentation generation
-
2 Agents:
bug-hunter - Find and fix bugs autonomously
refactor-master - Improve code quality
-
3 Hooks:
pre-edit.sh - Validate before editing
post-write.sh - Auto-format after writing
user-prompt-submit.sh - Log and validate prompts
-
MCP Server with 5 tools:
calculate - Math calculations
uuid_generate - UUID generation
timestamp - Timestamp formatting
base64_encode - Base64 encoding
base64_decode - Base64 decoding
See my-first-plugin/README.md for complete documentation.
Using the Marketplace
Install
/plugin marketplace add yasun1/claude-code-plugin-demo
/plugin install my-first-plugin@yasun1/claude-code-plugin-demo
Update
/plugin marketplace update claude-code-plugin-demo
List Installed Plugins
/plugin list
Learning from This Demo
This repository is designed for learning. Each plugin type is implemented with:
- Clear, well-commented code
- Best practices and patterns
- Real-world use cases
- Complete documentation
For Plugin Developers