| name | plugin-structure |
| description | This skill should be used when the user asks to "create a plugin", "scaffold a plugin", "validate a plugin", "understand plugin structure", "organize plugin components", "set up plugin.json", "register in marketplace", or needs guidance on Claude Code plugin layout, manifest configuration, or meaganewaller-marketplace registration. |
Plugin Structure
Guidance for organizing Claude Code plugins and validating marketplace layout.
Standard Layout
plugin-name/
├── .claude-plugin/
│ └── plugin.json # Required manifest
├── commands/ # Slash commands (.md)
├── agents/ # Subagent definitions (.md)
├── skills/ # skill-name/SKILL.md
├── hooks/
│ └── hooks.json
├── .mcp.json # Optional MCP config
├── src/ # Optional MCP source
└── README.md
Critical rules:
- Manifest must live at
.claude-plugin/plugin.json
- Component directories must be at plugin root, not inside
.claude-plugin/
- Use kebab-case for directory and file names
- Create only directories the plugin actually uses
Plugin Manifest
Minimum required field:
{
"name": "plugin-name"
}
Recommended fields for this marketplace:
{
"author": { "name": "meaganewaller" },
"description": "Brief plugin purpose",
"keywords": [],
"license": "BlueOak-1.0.0",
"name": "plugin-name",
"version": "1.0.0"
}
Name must be kebab-case and unique among installed plugins.
Component Discovery
| Component | Location | Format |
|---|
| Commands | commands/*.md | Markdown + YAML frontmatter |
| Agents | agents/*.md | Markdown + YAML frontmatter |
| Skills | skills/*/SKILL.md | Directory per skill |
| Hooks | hooks/hooks.json | JSON event configuration |
| MCP | .mcp.json | MCP server definitions |
Custom paths in plugin.json supplement defaults; they do not replace them.
Portable Paths
In hooks, scripts, and MCP config, use ${CLAUDE_PLUGIN_ROOT} instead of
hardcoded absolute paths:
{
"type": "command",
"command": "bash ${CLAUDE_PLUGIN_ROOT}/scripts/validate.sh"
}
Marketplace Registration
New plugins in meaganewaller-marketplace must also be registered in:
.claude-plugin/marketplace.json — alphabetically by name
release-please-config.json — under packages, alphabetically by path
.release-please-manifest.json — initial version entry
Use /create-plugin or follow references/marketplace-checklist.md for the
full registration workflow. After scaffolding, run bun run lint-staged on
staged files.
Validation Workflow
When validating an existing plugin:
- Confirm directory layout and manifest fields
- Verify component files use correct extensions and frontmatter
- Check marketplace and release-please entries if this is a marketplace plugin
- Confirm README documents installed components
- Report findings by severity (critical, warning, suggestion)
For a command-driven audit, use /meta:validate-plugin. For scored validation with
README reconciliation and JSON output, delegate to the plugin-validator agent.
Common Patterns
Minimal plugin — manifest + one command.
Skill-focused plugin — manifest + skills/ only.
Full-featured plugin — commands, agents, skills, hooks, optional MCP.
Additional Resources
references/marketplace-checklist.md — Registration and lint steps for this repo