Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Directory structure and conventions for building Claude Code plugins (from the official Anthropic claude-code repo).
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
README.md
1# Plugin Structure Skill23Comprehensive guidance on Claude Code plugin architecture, directory layout, and best practices.45## Overview67This skill provides detailed knowledge about:8- Plugin directory structure and organization9- `plugin.json` manifest configuration10- Component organization (commands, agents, skills, hooks)11- Auto-discovery mechanisms12- Portable path references with `${CLAUDE_PLUGIN_ROOT}`13- File naming conventions1415## Skill Structure1617### SKILL.md (1,619 words)1819Core skill content covering:20- Directory structure overview21- Plugin manifest (plugin.json) fields22- Component organization patterns23- ${CLAUDE_PLUGIN_ROOT} usage24- File naming conventions25- Auto-discovery mechanism26- Best practices27- Common patterns28- Troubleshooting2930### References3132Detailed documentation for deep dives:3334- **manifest-reference.md**: Complete `plugin.json` field reference35- All field descriptions and examples36- Path resolution rules37- Validation guidelines38- Minimal vs. complete manifest examples3940- **component-patterns.md**: Advanced organization patterns41- Component lifecycle (discovery, activation)42- Command organization patterns43- Agent organization patterns44- Skill organization patterns45- Hook organization patterns46- Script organization patterns47- Cross-component patterns48- Best practices for scalability4950### Examples5152Three complete plugin examples:5354- **minimal-plugin.md**: Simplest possible plugin55- Single command56- Minimal manifest57- When to use this pattern5859- **standard-plugin.md**: Well-structured production plugin60- Multiple components (commands, agents, skills, hooks)61- Complete manifest with metadata62- Rich skill structure63- Integration between components6465- **advanced-plugin.md**: Enterprise-grade plugin66- Multi-level organization67- MCP server integration68- Shared libraries69- Configuration management70- Security automation71- Monitoring integration7273## When This Skill Triggers7475Claude Code activates this skill when users:76- Ask to "create a plugin" or "scaffold a plugin"77- Need to "understand plugin structure"78- Want to "organize plugin components"79- Need to "set up plugin.json"80- Ask about "${CLAUDE_PLUGIN_ROOT}" usage81- Want to "add commands/agents/skills/hooks"82- Need "configure auto-discovery" help83- Ask about plugin architecture or best practices8485## Progressive Disclosure8687The skill uses progressive disclosure to manage context:88891. **SKILL.md** (~1600 words): Core concepts and workflows902. **References** (~6000 words): Detailed field references and patterns913. **Examples** (~8000 words): Complete working examples9293Claude loads references and examples only as needed based on the task.9495## Related Skills9697This skill works well with:98- **hook-development**: For creating plugin hooks99- **mcp-integration**: For integrating MCP servers (when available)100- **marketplace-publishing**: For publishing plugins (when available)101102## Maintenance103104To update this skill:1051. Keep SKILL.md lean and focused on core concepts1062. Move detailed information to references/1073. Add new examples/ for common patterns1084. Update version in SKILL.md frontmatter1095. Ensure all documentation uses imperative/infinitive form110