Technical specification for plugin directory structure, file formats, and organization.
plugins/[plugin-name]/
├── README.md # Plugin documentation (required)
├── .mcp.json # MCP server configuration (optional)
├── skills/ # Skill definitions (optional)
│ └── [skill-name]/
│ ├── SKILL.md # Skill definition (required)
│ ├── scripts/ # Executable scripts (optional)
│ │ └── *.py, *.sh, *.js
│ ├── references/ # Reference documentation (optional)
│ │ └── *.md
│ └── assets/ # Output resources (optional)
│ └── templates, images, etc.
├── agents/ # Agent persona definitions (optional)
│ ├── [agent-name].md # Agent definition
│ └── [another-agent].md
└── commands/ # Slash command definitions (optional)
└── [command-name].md # Command definition
Purpose: Plugin-level documentation and overview.
Format: Markdown
Required Sections:
- Plugin title and brief description
- Overview with detailed explanation
- Skills section (list all skills with descriptions, if any)
- Agents section (list all agents with descriptions, if any)
- Commands section (list all commands with usage, if any)
- Requirements (dependencies, versions)
- License
Example:
# My Plugin
Brief one-line description.
## Overview
Detailed explanation of plugin purpose and capabilities.
## Skills
### skill-name
Description of what this skill does.
**Usage:**
\```
Use the skill-name skill to [task]
\```
## Agents
### agent-name
Description of the specialized persona this agent provides.
**Expertise:** [Domain/Technology]
**Usage:**
\```
@agent-name [task description]
\```
## Commands
### /command-name
Description and usage.
## Requirements
- .NET SDK 9.0+
- Python 3.x
## License
MITPurpose: Bundles MCP (Model Context Protocol) server configurations with the plugin. When the plugin is enabled, its MCP servers start automatically — no manual setup needed.
Format: JSON
How it works:
- MCP servers defined here start automatically when the plugin is enabled
- MCP tools appear alongside manually configured MCP tools
- Plugin servers are managed through plugin installation (not
/mcpcommands) - Supports stdio, SSE, and HTTP transports
- Use
${CLAUDE_PLUGIN_ROOT}for plugin-relative paths in stdio server configs
Example — remote HTTP server (no auth required):
{
"mcpServers": {
"microsoftdocs": {
"type": "http",
"url": "https://learn.microsoft.com/api/mcp",
"tools": ["*"]
}
}
}Example — local stdio server:
{
"mcpServers": {
"database-tools": {
"command": "${CLAUDE_PLUGIN_ROOT}/servers/db-server",
"args": ["--config", "${CLAUDE_PLUGIN_ROOT}/config.json"],
"env": {
"DB_URL": "${DB_URL}"
},
"tools": ["*"]
}
}
}Reference: Claude Code MCP documentation
Purpose: Contains skill definitions.
Structure: One directory per skill.
Naming: Lowercase with hyphens (e.g., iot-edge-module, skill-creator)
Contents: See Skill Anatomy Reference
Purpose: Contains agent persona definitions.
Structure: One markdown file per agent.
Naming: Lowercase with hyphens (e.g., frontend-developer.md, database-architect.md)
Contents: See Agent Anatomy Reference
Format: Markdown with YAML frontmatter:
---
name: agent-name
description: Brief description of agent expertise
model: sonnet
---
# Agent Name
## Purpose
Define the specialized role...
## Capabilities
List expertise areas...
## Behavioral Traits
Define approach to problems...
## Knowledge Base
Reference authoritative sources...
## Response Approach
Define how the agent structures responses...
## Example Interactions
Provide concrete use case examples...Purpose: Contains slash command definitions.
Structure: One markdown file per command.
Naming: Must match command name exactly (e.g., format-params.md → /format-params)
Format: Markdown with specific structure:
# Command Title
Brief description.
## Instructions
When the user invokes `/command-name [args]`, you should:
1. [Step 1]
2. [Step 2]
3. [Step 3]
## Arguments
- `arg1` (required): Description
- `arg2` (optional): Description, defaults to X
## Examples
/command-name value1 value2
## Error Handling
If [condition]:
- [Action]
- Directory name: Lowercase with hyphens
- Examples:
code-refactoring,azure-iot,common - Avoid: Underscores, spaces, special characters
- Directory name: Lowercase with hyphens
- SKILL.md: Always uppercase, exactly
SKILL.md - Examples:
iot-edge-module/,skill-creator/
- File name: Lowercase with hyphens,
.mdextension - Descriptive of expertise:
frontend-developer.md,database-architect.md - Focus on domain:
react-specialist.mdnotdeveloper1.md - Examples:
mobile-developer.md,security-analyst.md
- File name: Lowercase with hyphens,
.mdextension - Must match command name -
/add-modulerequiresadd-module.md - Examples:
format-params.md,add-iot-edge-module.md
- File name: Descriptive, lowercase with underscores for multi-word
- Extension: Matches language (
.py,.sh,.js, etc.) - Examples:
rotate_pdf.py,init_skill.py,parse_schema.sh
- File name: Descriptive, lowercase with hyphens
- Extension:
.mdfor markdown documentation - Examples:
database-schema.md,api-endpoints.md,conventions.md
- File name: Descriptive, appropriate for asset type
- Examples:
logo.png,template.html,boilerplate/
File: plugin.json
Purpose: Registers plugins for discovery and installation.
Location: Repository root level
Format: JSON
Structure:
{
"name": "marketplace-name",
"version": "1.0.0",
"owner": {
"name": "organization-name",
"email": "contact@example.com"
},
"metadata": {
"description": "Marketplace description",
"version": "1.0.0"
},
"repository": "https://github.com/org/repo",
"plugins": [
{
"name": "plugin-name",
"version": "1.0.0",
"description": "One-sentence plugin description",
"author": {
"name": "Author Name"
},
"source": "./plugins/plugin-name",
"category": "utilities",
"keywords": ["keyword1", "keyword2"],
"homepage": "https://github.com/org/repo",
"repository": "https://github.com/org/repo",
"license": "MIT",
"strict": true
}
]
}See Marketplace Config Reference for detailed specification.
- Group related skills in one plugin
- Keep plugins focused on a specific domain
- Separate concerns - Don't mix unrelated functionality
- Use clear names that indicate purpose
- Complete README.md - Document all features
- Usage examples - Show how to use skills and commands
- Clear requirements - List dependencies explicitly
- Keep updated - Maintain documentation as plugin evolves
- Flat skills directory - Don't nest skills in subdirectories
- Organized assets - Group by type when many assets exist
- Clean references - Remove unused reference files
- Minimal scripts - Only bundle scripts that are reused
- Track all files - Include in git
- Ignore generated files - Use
.gitignorefor build artifacts - Document changes - Use commit messages to explain updates
- Tag releases - Use git tags for plugin versions
plugins/api-documentation/
├── README.md
├── skills/
│ ├── generate-openapi/
│ │ ├── SKILL.md
│ │ ├── scripts/
│ │ │ ├── analyze_controllers.py
│ │ │ └── generate_spec.py
│ │ ├── references/
│ │ │ ├── openapi-3.0-spec.md
│ │ │ └── common-patterns.md
│ │ └── assets/
│ │ └── openapi-template.json
│ └── validate-api-contract/
│ ├── SKILL.md
│ ├── scripts/
│ │ └── validate_spec.py
│ └── references/
│ └── validation-rules.md
└── commands/
├── gen-api-docs.md
└── validate-api.md
README.md: Documents the plugin, lists both skills and commands
Skills:
generate-openapi/- Complex workflow with scripts and referencesvalidate-api-contract/- Another related skill
Commands:
gen-api-docs.md- Quick shortcut for simple casesvalidate-api.md- Quick validation command
- Target: 200-500 words
- Maximum: 1,000 words
- Link to detailed docs if more content needed
- SKILL.md: Under 5,000 words (use references for details)
- References: No limit (loaded as needed)
- Scripts: Keep focused, one responsibility per script
- Command definition: 100-300 words
- Keep concise - Commands are for simple tasks
Before distributing a plugin, verify:
- README.md exists and is complete
- All SKILL.md files have valid YAML frontmatter
- All agent .md files have valid YAML frontmatter
- Agent files follow naming conventions
- Command files match command names
- No unused files or directories
- Scripts are executable (
chmod +xon Unix) - References are properly linked from SKILL.md
- Examples work as documented
- Plugin is registered in marketplace.json (if applicable)