jrjsmrtn/c4-skills/structurizr-dsl
Claude Code and agent skill by jrjsmrtn/c4-skills
- community
Checking that the SKILL.md file is still in the repository.
Structurizr DSL syntax reference and patterns for writing C4 architecture models. Use when writing or editing workspace.dsl files, looking up DSL syntax, implementing specific patterns, or troubleshooting DSL errors.
Install
npx vskill@latest install jrjsmrtn/c4-skills/structurizr-dslSKILL.md
The same SKILL.md was published earlier as jrjsmrtn/c4-skills/structurizr-dsl.
Structurizr DSL
Comprehensive reference for the Structurizr DSL — the text-based language for defining C4 architecture models.
When to Use
- Writing a new
workspace.dslfrom scratch - Adding elements, relationships, or views to an existing model
- Looking up syntax for a specific DSL construct
- Implementing patterns (deployment, groups, themes, expressions)
- Troubleshooting parse errors or unexpected behavior
Syntax Fundamentals
- Lines are processed sequentially — no forward references
- Keywords are case-insensitive (
softwareSystem=softwaresystem) - Double quotes are optional for single-word values without spaces
- Opening
{must be on the same line as the statement - Closing
}must be on its own line - Comments:
//or#(single-line),/* ... */(multi-line) - Line continuation:
\at end of line - Identifier characters:
a-zA-Z_0-9
Constants and Variables
Workspace Structure
Model Elements
Person
Default tags: Element, Person
Software System
Default tags: Element, Software System
Container
Default tags: Element, Container
Component
Default tags: Element, Component
Group
Style groups with the Group:Name tag. For nested groups:
Relationships
Default tags: Relationship
Uniqueness
Relationships between the same source and destination must have unique descriptions. This is the only way the DSL distinguishes multiple relationships between the same pair.
Identifiers
Flat (default)
All identifiers are globally scoped. Every identifier must be unique across the entire workspace.
Hierarchical (recommended)
Identifiers are scoped to their parent. Reference as parent.child:
Views
System Landscape
System Context
Container View
Component View
Dynamic View
Interactions are automatically numbered in order. To set explicit ordering:
Deployment View
Filtered View
Creates a view on top of another, filtering elements by tags. The base view is hidden when a filtered view exists.
Image View
AutoLayout
Include/Exclude with Expressions
Element Expressions
Combine with && (AND) and || (OR):
Relationship Expressions
Reluctant Wildcard
Styles
Element Styles
Shapes: Box, RoundedBox, Circle, Ellipse, Hexagon, Diamond, Cylinder, Pipe, Person, Robot, Folder, WebBrowser, Window, Terminal, MobileDevicePortrait, MobileDeviceLandscape, Component
Relationship Styles
Styling All Elements/Relationships
Use the default tags:
Light/Dark Mode
Standard Style Recipe
Themes
Built-in cloud themes:
amazon-web-services-2020.04.30microsoft-azure-2021.01.26google-cloud-platformkubernetes
Custom styles override theme defaults.
Directives
!include
Content is literally inlined into the parent document. Relative paths resolve from the parent file's directory and must stay within the same directory or a subdirectory — ../ paths are not allowed.
Key behaviors:
- Directory includes are recursive — subdirectories are processed too
- Alphabetical ordering — files sorted with
Arrays.sort, so use numeric prefixes for ordering control - Hidden files skipped —
.DS_Storeand dotfiles are ignored - No deduplication — the same file included from multiple places is inlined multiple times
Duplicate identifier restriction: if an included fragment defines an identifier that the including file also defines, Structurizr errors. There is no merge or override — plan fragment boundaries carefully.
!docs and !adrs
Can also be scoped to a softwareSystem or container:
Path restriction: same as !include — paths must be within or below the DSL file's directory. Use a symlink (architecture/docs -> ../docs) if workspace.dsl is in a subdirectory.
!docs authoring conventions
Do not point `!docs` at Diátaxis directories (explanation/, howto/, etc.). Structurizr silently strips h1 headings — it auto-generates h1 from the element name. Diátaxis docs use h1 as their title, so those titles would vanish. Use a dedicated docs/architecture/ directory for Structurizr-specific documentation, separate from Diátaxis content.
Files in the !docs directory are imported alphabetically by filename — use numeric prefixes for ordering:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/structurizr-dsl/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/jrjsmrtn/c4-skills/structurizr-dsl)