Plugin Creator Workflow Diagram
This diagram shows the complete agentic workflow for creating Claude Code plugins.
High-Level Flow
flowchart LR
P0[Phase 0: RT-ICA] --> P1[Phase 1: Research]
P1 --> P2[Phase 2: Design]
P2 --> P3[Phase 3: Implementation]
P3 --> P4[Phase 4: Validation]
P4 --> P5[Phase 5: Documentation]
P5 --> P6[Phase 6: Final Verification]
P0 -.-> |BLOCKED| REQ[Request Missing Info]
REQ -.-> P0
P6 -.-> |NOT COMPLETE| P4
Phase 0: RT-ICA Prerequisite Check
flowchart TD
REQ[User Request] --> RTICA[Invoke rt-ica Skill]
RTICA --> CHECK{Prerequisites Complete?}
CHECK -->|NO| BLOCKED[BLOCKED: Request missing info]
BLOCKED --> REQ
CHECK -->|YES| APPROVED[APPROVED: Continue to Phase 1]
subgraph Prerequisites
A[Purpose clarity]
B[Target users]
C[Component selection]
D[Existing solutions]
E[Source material]
F[Verification method]
end
Phase 1: Research
flowchart TD
subgraph "Parallel Research Tasks"
T1A[Task 1a: Check Existing Solutions]
T1B[Task 1b: Gather Domain Knowledge]
T1C[Task 1c: Fetch Official Docs]
end
T1A --> E1[Explore Agent]
T1B --> E2[Explore Agent]
T1C --> GP[general-purpose Agent + mcp__Ref__ref_read_url]
E1 --> REPORT[Research Report]
E2 --> REPORT
GP --> REPORT
subgraph "Research Outputs"
REPORT --> O1[Similar plugins with paths/URLs]
REPORT --> O2[Authoritative sources with dates]
REPORT --> O3[Official schema fields verified]
REPORT --> O4[Discrepancies flagged]
end
Phase 2: Design
flowchart TD
RESEARCH[Research Report] --> T2A[Task 2a: Architecture Planning]
T2A --> PLAN1[Plan Agent]
PLAN1 --> ARCH[Architecture Document]
ARCH --> COMP[Component list]
ARCH --> TREE[File tree]
ARCH --> DEPS[Dependencies]
ARCH --> T2B[Task 2b: Skill Content Planning]
T2B --> PLAN2[Plan Agent per skill]
PLAN2 --> OUTLINE[Content Outlines]
OUTLINE --> SKILL[SKILL.md structure]
OUTLINE --> REFS[Reference file list]
OUTLINE --> FM[Frontmatter values]
Phase 3: Implementation
flowchart TD
DESIGN[Design Documents] --> CHOICE{Implementation Option}
CHOICE -->|Option A| SCRIPT[Scaffolding Script]
CHOICE -->|Option B| MANUAL[Manual Creation]
SCRIPT --> UV["uv run create_plugin.py"]
MANUAL --> DIRS[Create directories]
MANUAL --> FILES[Write files]
UV --> PLUGIN[Plugin Created]
DIRS --> PLUGIN
FILES --> PLUGIN
subgraph "Consider Advanced Features"
AF1[Dynamic context injection]
AF2[Subagent execution]
AF3[Visual output scripts]
AF4[Hook automation]
AF5[MCP/LSP integration]
end
Phase 4: Validation
flowchart TD
PLUGIN[Created Plugin] --> T4A[Task 4a: Automated Validation]
PLUGIN --> T4B[Task 4b: Verify vs Official Docs]
T4A --> SCRIPTS["create_plugin.py validate + plugin_validator.py"]
T4B --> GP[general-purpose Agent + mcp__Ref__ref_read_url]
SCRIPTS --> RESULTS[Validation Results]
GP --> RESULTS
RESULTS --> T4C[Task 4c: Quality Assessment]
T4C --> ASSESSOR[plugin-assessor Agent]
ASSESSOR --> REPORT[Validation Report]
REPORT --> S1[Schema OK?]
REPORT --> S2[Frontmatter valid?]
REPORT --> S3[Quality score]
Phase 5: Documentation
flowchart TD
VALIDATED[Validated Plugin] --> DOCS[plugin-docs-writer Agent]
DOCS --> README[README.md]
DOCS --> SKILLS_DOC[docs/skills.md]
DOCS --> CONFIG[Configuration guide]
Phase 6: Final Verification
flowchart TD
DOCUMENTED[Documented Plugin] --> VERIFY[Invoke verify Skill]
VERIFY --> CHECKLIST{Verification Checklist}
CHECKLIST --> W[Works Check: validation passed?]
CHECKLIST --> Q[Quality Gates: no critical issues?]
CHECKLIST --> D[Docs Check: README accurate?]
CHECKLIST --> H[Honesty Check: sources cited?]
W --> DECISION{All Passed?}
Q --> DECISION
D --> DECISION
H --> DECISION
DECISION -->|NO| NOTCOMPLETE[NOT COMPLETE: Fix issues]
NOTCOMPLETE --> FIXPHASE[Return to relevant phase]
DECISION -->|YES| COMPLETE[COMPLETE: Plugin ready]
Agent Delegation Map
flowchart LR
subgraph Research
R1[Explore Agent] --> R1T[Code discovery]
R2[Explore Agent] --> R2T[Domain knowledge]
R3[general-purpose Agent] --> R3T[Official docs fetch via mcp__Ref__ref_read_url]
end
subgraph Design
D1[Plan Agent] --> D1T[Architecture]
D2[Plan Agent] --> D2T[Content structure]
end
subgraph Validate
V1[Scripts] --> V1T[Schema validation]
V2[general-purpose Agent] --> V2T[Docs verification via mcp__Ref__ref_read_url]
V3[plugin-assessor Agent] --> V3T[Quality assessment]
end
subgraph Document
DOC[plugin-docs-writer Agent] --> DOCT[README generation]
end
Orchestrator Rules
flowchart TD
subgraph "DELEGATE TO"
A1[Explore agent] --> A1T[Domain research]
A2[Explore agent] --> A2T[Code discovery]
A3[mcp__Ref__ref_read_url tool] --> A3T[Official docs]
A4[Validation scripts] --> A4T[Schema checks]
A5[plugin-assessor agent] --> A5T[Quality review]
A6[plugin-docs-writer agent] --> A6T[Documentation]
end
subgraph "NEVER DO DIRECTLY"
B1[Read docs yourself]
B2[Grep/search yourself]
B3[Assume from training]
B4[Manual field checking]
B5[Review own work]
B6[Write README yourself]
end
Failure Recovery Paths
flowchart TD
F0[Phase 0 BLOCKED] --> F0R[Request missing info] --> F0A[Re-run RT-ICA]
F1[Phase 1 Incomplete] --> F1R[Spawn more Explore agents]
F1 --> F1B[Fetch more official docs]
F4[Phase 4 Validation Failures] --> F4A[Schema errors] --> F4AF[Fix plugin.json]
F4 --> F4B[Frontmatter errors] --> F4BF[Fix SKILL.md]
F4 --> F4C[Quality issues] --> F4CF[Improve content]
F4AF --> REVAL[Re-validate]
F4BF --> REVAL
F4CF --> REASSESS[Re-assess]
F6[Phase 6 NOT COMPLETE] --> F6A[Identify failing check]
F6A --> F6B[Return to relevant phase]
F6B --> F6C[Fix and re-verify]
Tool Inventory Reference
Built-in Claude Code Agents
| Agent Name | Model | Purpose |
|---|---|---|
general-purpose |
inherit | Complex operations requiring reasoning |
Explore |
haiku | Fast read-only codebase navigation |
Plan |
inherit | Research with reasoning capability |
SOURCE: CLAUDE.md global instructions (accessed 2026-01-28)
MCP Tools for Documentation
| Tool | Purpose | Required For |
|---|---|---|
mcp__Ref__ref_read_url |
Read documentation URLs | Official docs fetching |
mcp__Ref__ref_search_documentation |
Search documentation | Finding relevant docs |
SOURCE: Lines 9-12 of claude-plugins-reference-2026/SKILL.md
Validation Scripts
| Script | Purpose | Location |
|---|---|---|
create_plugin.py |
Plugin scaffolding + validation | ${CLAUDE_PLUGIN_ROOT}/scripts/ |
plugin_validator.py |
Frontmatter schema validation | ${CLAUDE_PLUGIN_ROOT}/scripts/ |
validate-skill-structure.sh |
Skill quality checks | ${CLAUDE_PLUGIN_ROOT}/scripts/ |
SOURCE: Verified from plugin-creator plugin scripts directory
Plugin-Specific Agents
| Agent | Model | Purpose |
|---|---|---|
plugin-assessor |
sonnet | Plugin quality analysis |
plugin-docs-writer |
sonnet | README generation (if exists in repo) |
refactor-planner |
sonnet | Refactoring plan creation |
refactor-executor |
sonnet | Refactoring task execution |
refactor-validator |
sonnet | Refactoring validation |
SOURCE: Lines 130-138 of plugin-creator/CLAUDE.md
Agent Discovery Mechanism
Claude Code discovers agents in this order:
- Project agents:
.claude/agents/*.mdin current repository - User agents:
~/.claude/agents/*.mdin home directory - Plugin agents:
{plugin-root}/agents/*.mdfor all enabled plugins
Agent Selection:
- Agents are matched based on
descriptionfield trigger keywords - Multiple matching agents may be presented to user
- User can manually invoke with
@agent-name
SOURCE: Agent system documentation (accessed 2026-01-28)
Source
This workflow diagram documents the agentic plugin creation process defined in SKILL.md.