diagram-generator
Diagram Generator
Create Mermaid diagrams for architecture visualization.
Activation
Activate when you detect:
- "Create diagram for X"
- "Visualize the architecture"
- "Show me the data flow"
- "Draw the entity relationships"
Workflow
1. Determine Diagram Type
Ask if unclear:
What should this diagram show?
1. Data flow (how data moves through system)
2. Service relationships (dependencies between services)
3. Entity relationships (database structure)
4. Sequence (interaction over time)
5. State (entity lifecycle)
2. Gather Elements
Based on type, ask:
Data Flow:
- What is the starting point?
- What are the processing steps?
- What is the final destination?
Service Relationships:
- What is the main service?
- What does it depend on?
- Are there event subscribers?
Entity Relationships:
- What entities are involved?
- What are the relationships (one-to-many, etc.)?
3. Generate Diagram
Create appropriate Mermaid code:
Data Flow:
flowchart LR
A[Input] --> B[Process]
B --> C[Output]
Service Dependencies:
graph TD
A[MainService] --> B[Dependency1]
A --> C[Dependency2]
Entity Relationships:
erDiagram
ENTITY1 ||--o{ ENTITY2 : has
ENTITY1 ||--|| ENTITY3 : references
Sequence:
sequenceDiagram
Actor->>Component: Action
Component-->>Actor: Response
State:
stateDiagram-v2
[*] --> State1
State1 --> State2
State2 --> [*]
4. Present Diagram
Show the Mermaid code to user and ask:
Here's the diagram:
{mermaid code block}
Adjustments needed? (describe changes or "looks good")
5. Add to Architecture
Once approved, use Edit tool to add to appropriate architecture file:
## {Diagram Title}
{One sentence describing what this shows}
\`\`\`mermaid
{diagram code}
\`\`\`
Diagram Templates
Drupal Request Flow
flowchart LR
A[Request] --> B[Routing]
B --> C[Controller]
C --> D[Service]
D --> E[Entity]
E --> F[Response]
Plugin System
graph TD
A[PluginManager] --> B[Discovery]
A --> C[Factory]
B --> D[Annotations]
B --> E[YAML]
C --> F[Plugin Instance]
Form Submit Flow
sequenceDiagram
User->>Form: Submit
Form->>Form: validateForm()
Form->>Form: submitForm()
Form->>Service: Process data
Service-->>Form: Result
Form-->>User: Redirect/Message
Stop Points
STOP and wait for user:
- After asking diagram type
- After showing generated diagram
- Before adding to architecture file
More from camoa/claude-skills
html-generator
Use when generating branded HTML pages and components from a design system. Creates standalone HTML components and composes them into full pages with embedded CSS, responsive design, and brand integration.
43memory-manager
Use after completing any phase activity - updates project_state.md, project registry, ensures files are in correct locations, maintains lean memory
39code-quality-audit
Use when checking code quality, running security audits, testing coverage, finding SOLID/DRY violations, or setting up quality tools. Use when user says "audit this code", "check security", "run PHPStan", "code quality", "find violations", "SOLID check", "DRY check", "test coverage", "lint this", "security review", "is this production ready", "check for vulnerabilities", "code review", "grade this code". Supports Drupal (PHPStan, PHPMD, Psalm, Semgrep, Trivy, Gitleaks via DDEV) and Next.js (ESLint, Jest, Semgrep, Trivy, Gitleaks). Use proactively before deployment or after significant code changes.
20requirements-gatherer
Use when gathering project requirements - asks structured questions about project type, scope, integrations, and constraints to populate project_state.md
17generating-infographics
Use when creating infographics, data visualizations, process diagrams, timelines, or comparisons - generates branded infographics using @antv/infographic with 114 templates across 7 categories. Triggers on "create infographic", "make infographic", "visualize data", "timeline", "process diagram".
17paper-test
Use when testing code, skills, commands, or configs through mental execution — trace logic line-by-line with concrete values to find bugs, logic errors, edge cases, contract violations, and AI hallucinations. Use when user says "paper test", "trace this", "find bugs", "check for edge cases", "audit this code", "verify AI code", "test this skill", "validate this implementation", "review this logic", "check dependencies", "check this config". MUST verify external calls — never assume methods exist. Use proactively before deploying changes or after AI generates code.
16