Master plugin folder structure, manifest design, and architectural patterns. Learn to organize plugins for scalability and maintainability.
Designs scalable plugin structures with proper manifest files, agent organization, and skill layouts. Use when creating new plugins or reorganizing existing ones to ensure maintainability and follow architectural best practices.
/plugin marketplace add pluginagentmarketplace/custom-plugin-design-system/plugin install custom-plugin-design-system@pluginagentmarketplace-design-systemThis skill inherits all available tools. When active, it can use any tool Claude has access to.
assets/architecture_config.yamlreferences/ARCHITECTURE_GUIDE.mdscripts/plugin_validator.pyA well-structured plugin follows this minimal layout:
my-plugin/
├── .claude-plugin/
│ └── plugin.json # Required manifest
├── agents/
│ └── agent.md # Agent definition
├── skills/
│ └── skill-name/SKILL.md # Skill definition
├── commands/
│ └── command.md # Command definition
├── hooks/
│ └── hooks.json # Automation hooks
└── README.md
The manifest defines what your plugin does and what it contains.
{
"name": "my-plugin",
"version": "1.0.0",
"description": "What my plugin does",
"author": "Your Name",
"license": "MIT",
"repository": "https://github.com/user/repo",
"agents": [
{
"name": "agent-id",
"description": "What it does",
"file": "agents/agent.md"
}
],
"commands": [
{
"name": "command",
"file": "commands/command.md",
"description": "What it does"
}
],
"skills": [
{
"name": "skill-id",
"file": "skills/skill-id/SKILL.md"
}
],
"hooks": {
"file": "hooks/hooks.json"
}
}
Each agent is a markdown file with YAML frontmatter:
---
description: What this agent does (max 1024 chars)
capabilities:
- "Capability 1"
- "Capability 2"
- "Capability 3"
---
# Agent Name
[Detailed content about what agent does]
## When to Use
Use this agent when:
- Need 1
- Need 2
- Need 3
01-primary-agent.md
02-secondary-agent.md
03-tertiary-agent.md
Skills provide reusable knowledge and examples.
skills/
├── skill-one/
│ ├── SKILL.md # Always named SKILL.md
│ └── resources/ # Optional: additional files
│ ├── example.py
│ └── reference.md
└── skill-two/
└── SKILL.md
---
name: skill-unique-id
description: "What skill teaches (max 1024 chars)"
---
# Skill Name
## Quick Start
[Working code - copy-paste ready]
## Core Concepts
### Concept 1
[Explanation with code]
### Concept 2
[More examples]
## Advanced Topics
[Expert-level content]
## Real-World Projects
[Practical applications]
Commands are entry points for users:
commands/
├── create.md
├── design.md
├── test.md
└── deploy.md
# /command-name - Brief Description
## What This Does
[Clear explanation]
## Usage
/command-name [options]
## Options
| Option | Description |
|--------|-------------|
| `--flag` | What it does |
## Example
[Sample output]
## Next Steps
[What to do next]
Hooks automate plugin behavior:
{
"hooks": [
{
"id": "hook-id",
"name": "Hook Name",
"event": "event-type",
"condition": "condition",
"action": "action-name",
"enabled": true
}
]
}
Agent 1: Domain A only
Agent 2: Domain B only
Agent 3: Domain C only
Commands (User interface)
↓
Agents (Logic & guidance)
↓
Skills (Knowledge & examples)
↓
Hooks (Automation)
Agent A → asks → Agent B
↓
Links to shared skills
↓
Agent C for final review
✅ Logical grouping
├─ All agents together
├─ All skills organized
├─ All commands grouped
└─ Config centralized
✅ Clear naming
├─ agents/01-primary.md
├─ agents/02-secondary.md
├─ skills/skill-one/SKILL.md
└─ commands/action.md
✅ Scalable structure
├─ Easy to add agents
├─ Simple to extend skills
├─ Clear command naming
└─ Organized hooks
Stage 1: 1 agent, 2 skills, 1 command
Minimal viable plugin
Stage 2: 3 agents, 5 skills, 3 commands
Feature-rich plugin
Stage 3: 5-7 agents, 10+ skills, 5+ commands
Enterprise plugin
❌ Unclear structure → Use recommended layout ❌ Mixed concerns → One agent = one domain ❌ Missing manifest → Always include plugin.json ❌ Bad naming → Use lowercase-hyphens ❌ No documentation → Document everything
Use this skill when:
Status: ✅ Production Ready | SASMP: v1.3.0 | Bonded Agent: 01-plugin-architect
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.