plugin-architecture
Master plugin folder structure, manifest design, and architectural patterns. Learn to organize plugins for scalability and maintainability.
$ Installieren
git clone https://github.com/pluginagentmarketplace/custom-plugin-design-system /tmp/custom-plugin-design-system && cp -r /tmp/custom-plugin-design-system/skills/plugin-architecture ~/.claude/skills/custom-plugin-design-system// tip: Run this command in your terminal to install the skill
name: plugin-architecture description: Master plugin folder structure, manifest design, and architectural patterns. Learn to organize plugins for scalability and maintainability. sasmp_version: "1.3.0" bonded_agent: 01-plugin-architect bond_type: PRIMARY_BOND
Plugin Architecture
Quick Start
A 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
Plugin Manifest (plugin.json)
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"
}
}
Manifest Rules
- name: lowercase-hyphens, 10-50 chars
- version: semantic (MAJOR.MINOR.PATCH)
- description: 50-256 characters
- agents: array of agent definitions
- commands: array of command definitions
- skills: array of skill definitions
- hooks: optional, points to hooks.json
Agent Structure
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
Naming Convention
01-primary-agent.md
02-secondary-agent.md
03-tertiary-agent.md
Skill Structure
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
SKILL.md Format
---
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]
Command Structure
Commands are entry points for users:
commands/
âââ create.md
âââ design.md
âââ test.md
âââ deploy.md
Command Format
# /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]
Hook Configuration
Hooks automate plugin behavior:
{
"hooks": [
{
"id": "hook-id",
"name": "Hook Name",
"event": "event-type",
"condition": "condition",
"action": "action-name",
"enabled": true
}
]
}
Architectural Patterns
Single Responsibility
Agent 1: Domain A only
Agent 2: Domain B only
Agent 3: Domain C only
Layered Architecture
Commands (User interface)
â
Agents (Logic & guidance)
â
Skills (Knowledge & examples)
â
Hooks (Automation)
Agent Collaboration
Agent A â asks â Agent B
â
Links to shared skills
â
Agent C for final review
File Organization Best Practices
â
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
Scaling Your Plugin
From Simple to Complex
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
Common Mistakes
â 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:
- Designing plugin structure
- Creating plugin.json
- Organizing agents and skills
- Planning plugin growth
Status: â Production Ready | SASMP: v1.3.0 | Bonded Agent: 01-plugin-architect
Repository
