Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Specialized skill for generating C4 model architecture diagrams. Supports Structurizr DSL, PlantUML, and Mermaid formats with multi-level abstraction (Context, Container, Component, Code).
.claude/skills/a5c-ai-c4-diagram-generator/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 44% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 77% | 0% |
| case-15 | ✗→✓ | ▲ Improved | 147% | 0% |
| case-16 | ✗→✓ | ▲ Improved | 51% | 0% |
| case-22 | ✗→✓ | ▲ Improved | 38% | 0% |
You are c4-diagram-generator - a specialized skill for generating C4 model architecture diagrams following Simon Brown's methodology. This skill enables AI-powered architecture visualization at multiple abstraction levels.
This skill enables comprehensive C4 model diagram generation including:
Generate C4 diagrams using Structurizr DSL:
structurizrworkspace "System Name" "Description" { model { user = person "User" "A user of the system" softwareSystem = softwareSystem "Software System" "Description" { webapp = container "Web Application" "Delivers the static content" "React" api = container "API Application" "Provides functionality via REST API" "Node.js" database = container "Database" "Stores data" "PostgreSQL" "Database" } user -> webapp "Uses" webapp -> api "Makes API calls to" "HTTPS/JSON" api -> database "Reads from and writes to" "SQL/TCP" } views { systemContext softwareSystem "SystemContext" { include * autoLayout } container softwareSystem "Containers" { include * autoLayout } styles { element "Software System" { background #1168bd color #ffffff } element "Container" { background #438dd5 color #ffffff } element "Database" { shape Cylinder } element "Person" { shape Person background #08427b color #ffffff } } } }
Generate C4 diagrams using PlantUML C4 library:
plantuml@startuml C4_Context !include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Context.puml LAYOUT_WITH_LEGEND() title System Context diagram for Internet Banking System Person(customer, "Personal Banking Customer", "A customer of the bank") System(banking_system, "Internet Banking System", "Allows customers to view accounts and make payments") System_Ext(mail_system, "E-mail System", "Microsoft Exchange") System_Ext(mainframe, "Mainframe Banking System", "Stores core banking data") Rel(customer, banking_system, "Uses") Rel(banking_system, mail_system, "Sends e-mail", "SMTP") Rel(banking_system, mainframe, "Uses") Rel(mail_system, customer, "Sends e-mails to") @enduml
Generate C4 diagrams using Mermaid:
mermaidC4Context title System Context diagram for Internet Banking System Person(customer, "Personal Banking Customer", "A customer of the bank") System(banking_system, "Internet Banking System", "Allows customers to view accounts and make payments") System_Ext(mail_system, "E-mail System", "Microsoft Exchange") System_Ext(mainframe, "Mainframe Banking System", "Stores core banking data") Rel(customer, banking_system, "Uses") Rel(banking_system, mail_system, "Sends e-mail", "SMTP") Rel(banking_system, mainframe, "Uses")
javascript// Context diagram configuration const contextDiagram = { level: 'context', scope: 'system', elements: { people: ['Customer', 'Admin'], systems: ['Our System'], externalSystems: ['Payment Provider', 'Email Service'] }, relationships: [ { from: 'Customer', to: 'Our System', description: 'Uses' }, { from: 'Our System', to: 'Payment Provider', description: 'Processes payments' } ] };
javascript// Container diagram configuration const containerDiagram = { level: 'container', scope: 'Our System', containers: [ { name: 'Web App', technology: 'React', description: 'Frontend SPA' }, { name: 'API Gateway', technology: 'Kong', description: 'Routes requests' }, { name: 'User Service', technology: 'Node.js', description: 'User management' }, { name: 'Database', technology: 'PostgreSQL', description: 'Stores data' } ] };
javascript// Component diagram configuration const componentDiagram = { level: 'component', scope: 'User Service', components: [ { name: 'User Controller', description: 'REST endpoints' }, { name: 'User Service', description: 'Business logic' }, { name: 'User Repository', description: 'Data access' }, { name: 'Auth Middleware', description: 'JWT validation' } ] };
javascript// Code diagram configuration (UML class diagram) const codeDiagram = { level: 'code', scope: 'User Repository', classes: [ { name: 'UserRepository', methods: ['findById()', 'save()', 'delete()'], dependencies: ['DatabaseConnection', 'UserMapper'] } ] };
bash# Using Structurizr CLI structurizr-cli export -workspace workspace.dsl -format plantuml -output ./diagrams # Using PlantUML java -jar plantuml.jar -tsvg diagram.puml # Using Mermaid CLI mmdc -i diagram.mmd -o diagram.svg -t neutral # Using Kroki (cloud service) curl -X POST https://kroki.io/plantuml/svg --data-binary @diagram.puml -o diagram.svg
This skill can leverage the following MCP servers:
| Server | Description | Installation | |--------|-------------|--------------| | UML-MCP Server | PlantUML, Mermaid, D2 diagram generation | GitHub | | Mermaid MCP Server | 50+ pre-built templates, 22+ diagram types | mcpservers.org | | Claude Mermaid | Preview diagrams in Claude | GitHub | | MCP Kroki Server | Multi-format rendering via Kroki.io | Glama |
yaml# C4 Color Scheme colors: person: "#08427b" software_system: "#1168bd" container: "#438dd5" component: "#85bbf0" external_system: "#999999" database: "#438dd5"
This skill integrates with the following processes:
c4-model-documentation.js - Primary diagram generationsystem-design-review.js - Architecture visualizationmicroservices-decomposition.js - Service boundary diagramscloud-architecture-design.js - Infrastructure visualizationWhen generating diagrams, provide structured output:
json{ "operation": "generate", "level": "container", "format": "structurizr", "status": "success", "diagrams": [ { "name": "Container-SystemName", "level": "container", "format": "svg", "path": "./docs/diagrams/container.svg" } ], "elements": { "containers": 5, "relationships": 8 }, "artifacts": ["workspace.dsl", "container.svg", "container.png"], "warnings": [], "errors": [] }
| Error | Cause | Resolution | |-------|-------|------------| | Invalid DSL syntax | Malformed Structurizr DSL | Validate syntax with CLI | | Circular dependency | Circular relationship in model | Review and fix relationships | | Missing element reference | Referencing undefined element | Define all elements before use | | Rendering timeout | Complex diagram or server issues | Simplify diagram or use local renderer |
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 14,088 | 19,044 | +35% | 1 | 1 | 0% | 3,267 | 4,890 | +50% | 0 | 0 | — |
case-02 | fail→pass | 18,813 | 7,934 | -58% | 1 | 1 | 0% | 2,832 | 4,068 | +44% | 0 | 0 | — |
case-03 | fail→pass | 17,596 | 15,946 | -9% | 1 | 1 | 0% | 2,591 | 4,588 | +77% | 0 | 0 | — |
case-04 | pass→pass | 15,074 | 19,689 | +31% | 1 | 1 | 0% | 3,237 | 5,516 | +70% | 0 | 0 | — |
case-05 | pass→pass | 23,075 | 33,177 | +44% | 1 | 1 | 0% | 4,040 | 8,403 | +108% | 0 | 0 | — |
case-06 | pass→pass | 17,790 | 19,351 | +9% | 1 | 1 | 0% | 3,759 | 6,487 | +73% | 0 | 0 | — |
case-07 | pass→pass | 5,288 | 10,698 | +102% | 1 | 1 | 0% | 964 | 3,404 | +253% | 0 | 0 | — |
case-08 | pass→pass | 9,995 | 8,712 | -13% | 1 | 1 | 0% | 936 | 3,083 | +229% | 0 | 0 | — |
case-09 | pass→pass | 10,095 | 10,228 | +1% | 1 | 1 | 0% | 1,007 | 3,220 | +220% | 0 | 0 | — |
case-10 | pass→pass | 13,427 | 12,033 | -10% | 1 | 1 | 0% | 2,258 | 4,312 | +91% | 0 | 0 | — |
case-11 | pass→pass | 9,341 | 17,300 | +85% | 1 | 1 | 0% | 1,604 | 4,541 | +183% | 0 | 0 | — |
case-12 | pass→pass | 8,222 | 3,953 | -52% | 1 | 1 | 0% | 640 | 2,993 | +368% | 0 | 0 | — |
case-13 | pass→pass | 11,532 | 8,712 | -24% | 1 | 1 | 0% | 1,259 | 3,006 | +139% | 0 | 0 | — |
case-14 | pass→pass | 2,903 | 2,223 | -23% | 1 | 1 | 0% | 538 | 2,690 | +400% | 0 | 0 | — |
case-15 | fail→pass | 6,660 | 9,365 | +41% | 1 | 1 | 0% | 1,262 | 3,119 | +147% | 0 | 0 | — |
case-16 | fail→pass | 18,361 | 11,226 | -39% | 1 | 1 | 0% | 2,338 | 3,539 | +51% | 0 | 0 | — |
case-17 | pass→pass | 10,453 | 12,020 | +15% | 1 | 1 | 0% | 1,660 | 4,359 | +163% | 0 | 0 | — |
case-18 | pass→pass | 18,437 | 19,960 | +8% | 1 | 1 | 0% | 2,228 | 5,044 | +126% | 0 | 0 | — |
case-19 | pass→pass | 11,753 | 14,079 | +20% | 1 | 1 | 0% | 2,042 | 3,982 | +95% | 0 | 0 | — |
case-20 | pass→pass | 11,872 | 16,847 | +42% | 1 | 1 | 0% | 2,118 | 4,577 | +116% | 0 | 0 | — |
case-21 | pass→pass | 11,428 | 9,579 | -16% | 1 | 1 | 0% | 1,113 | 3,164 | +184% | 0 | 0 | — |
case-22 | fail→pass | 17,000 | 2,171 | -87% | 1 | 1 | 0% | 2,003 | 2,768 | +38% | 0 | 0 | — |
case-23 | pass→pass | 9,510 | 4,061 | -57% | 1 | 1 | 0% | 781 | 3,037 | +289% | 0 | 0 | — |
case-24 | fail→pass | 11,672 | 10,821 | -7% | 1 | 1 | 0% | 1,195 | 3,344 | +180% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 24 cases were attempted. The headline lift of +25 percentage points is the difference between those two pass rates over the 24 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.