Draft, review, and refactor Structurizr DSL workspaces for C4 architecture diagrams. Use this skill whenever a user mentions Structurizr, C4 model diagrams, system context/container/component/deployment views, `workspace.dsl`, `structurizr validate`, or converting architecture notes into DSL, even if they do not explicitly ask for a "skill".
Installation
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Draft, review, and refactor Structurizr DSL workspaces for C4 architecture diagrams. Use this skill whenever a user mentions Structurizr, C4 model diagrams, system context/container/component/deployment views, `workspace.dsl`, `structurizr validate`, or converting architecture notes into DSL, even if they do not explicitly ask for a "skill".
Structurizr DSL Skill
Use this skill to create, update, or troubleshoot Structurizr DSL files with clean C4 modeling structure.
When to use
Use this skill when the user asks for any of the following:
Create a new Structurizr DSL workspace.
Convert architecture notes into a workspace.dsl model and views.
Add or fix C4 views (systemContext, container, component, deployment, dynamic).
Clean up identifiers, relationships, tags, styles, or view keys.
Diagnose DSL parser/validation errors.
Core workflow
Identify intent and target scope
Determine whether the user needs modeling from scratch, edits to an existing file, or debugging.
workspace "Name" "Description" {
model {
user = person "User"
system = softwareSystem "System" {
webapp = container "Web App" "Delivers UI" "React"
api = container "API" "Business logic" "Kotlin"
db = container "Database" "Stores data" "PostgreSQL"
webapp -> api "Calls"
api -> db "Reads and writes"
}
}
views {
systemContext system "sysctx" {
include *
autoLayout lr
}
container system "containers" {
include *
autoLayout lr
}
styles {
element "Person" {
shape Person
}
element "Container" {
background "#1168bd"
color "#ffffff"
}
}
}
}
View selection heuristics
systemLandscape: enterprise-level context across systems and people.
systemContext: one software system and its external interactions.
container: internals of one software system.
component: internals of one container.
dynamic: behavior/sequence for a scenario using existing static relationships.
deployment: runtime topology by environment.
Relationship quality heuristics
Use short, specific verbs: Uses, Publishes, Queries, Sends command.
Put protocols/tech in technology field when helpful.
Do not over-specify implementation detail at higher C4 levels.
Refactoring patterns
If a model is large, split with !include and keep a clear root workspace file.
If identifiers are inconsistent, normalize naming and update references in one pass.
If views are noisy, replace include * with targeted include/exclude expressions.
If styles are duplicated, centralize tags and style blocks.
Troubleshooting checklist
When the DSL fails or diagrams look wrong, check in this order:
Parse/syntax issues
Missing/extra braces.
Invalid token ordering.
Quoting problems around values with spaces.
Model consistency
Undefined identifiers.
Forward references.
Duplicate names in invalid scopes.
Duplicate relationship descriptions between same source and destination.
View consistency
Wrong scope identifier in systemContext, container, component, or deployment views.