Demo Plugin1 Description
You can install this plugin from any of these themed marketplaces. Choose one, add it as a marketplace, then install the plugin.
Choose your preferred installation method below
A marketplace is a collection of plugins. Every plugin gets an auto-generated marketplace JSON for individual installation, plus inclusion in category and themed collections. Add a marketplace once (step 1), then install any plugin from it (step 2).
One-time setup for access to all plugins
When to use: If you plan to install multiple plugins now or later
Step 1: Add the marketplace (one-time)
/plugin marketplace add https://claudepluginhub.com/marketplaces/all.json
Run this once to access all plugins
Step 2: Install this plugin
/plugin install demo-plugin1@all
Use this plugin's auto-generated marketplace JSON for individual installation
When to use: If you only want to try this specific plugin
Step 1: Add this plugin's marketplace
/plugin marketplace add https://claudepluginhub.com/marketplaces/plugins/demo-plugin1.json
Step 2: Install the plugin
/plugin install demo-plugin1@demo-plugin1
Demo implementation of Claude Code plugin system
Demo repository showing implementation examples of Claude Code plugins
claude-code-plugins-demo/
├── .claude-plugin/
│ └── marketplace.json # Plugin marketplace configuration
├── plugins/ # Plugin definitions directory
│ ├── demo-plugin1/ # Demo plugin 1
│ │ ├── .claude-plugin/
│ │ │ └── plugin.json # Plugin metadata
│ │ ├── agents/ # Sub-agent definitions
│ │ │ └── greeting-translation.md
│ │ ├── commands/ # Slash command definitions
│ │ │ ├── greeting.md
│ │ │ └── greeting-translation.md
│ │ ├── hooks/ # Hook definitions
│ │ │ ├── hooks.json
│ │ │ └── greeting.sh
│ │ ├── resources/ # Resource files
│ │ │ └── greeting.md
│ │ └── .mcp.json # MCP server configuration (within plugin)
│ └── demo-plugin2/ # Demo plugin 2
│ └── hooks/
│ ├── hooks.json
│ └── greeting.sh
├── plugin-client-demo/ # Demo project using plugins
│ ├── .mcp.json # MCP server configuration (project root)
│ └── .claude/
│ └── README.md
├── LICENSE
└── README.md # This file
Demo plugin implementing major Claude Code plugin features
Slash Commands
/greeting
: Returns a simple greeting/greeting-translation
: Translates time-based greetings into 4 random languagesSub-agents
greeting-translation
: Multilingual greeting translation agent (with country/region info)Hooks
SessionStart
: Displays greeting message at session startStop
: Shows macOS notification at session stopResources
greeting.md
: Greeting definitionSecond plugin implementation example
⚠️ Note: This plugin is not registered in .claude-plugin/marketplace.json
Hooks
SessionStart
: Executes custom script (greeting.sh) at session startStop
: Shows macOS notification at session stop (Plugin2 identifier)When using plugins from remote repositories, environment variables in .mcp.json
within the plugin may not be resolved
Issue: Environment variables like ${GITHUB_PERSONAL_ACCESS_TOKEN}
in plugin's .mcp.json
may not be accessible
Solution: Place configuration files using environment variables (.mcp.json
) at the project root
See plugin-client-demo/.claude/README.md
for details
The following special variables are available within plugins
${CLAUDE_PLUGIN_ROOT}
: Plugin root directory pathExample:
@${CLAUDE_PLUGIN_ROOT}/resources/greeting.md
Plugin implementing various features
Plugin implementing hook functionality
Implementation example of a project using plugins
1.0.0