c4-graph
Skill1 starsChanged 23 days agoApache-2.0View on GitHub
Use when drawing or converting a software architecture diagram following the C4 model — system context, container, or landscape — as a draw.io file rendered in VS Code or draw.io and embedded as .drawio.svg in GitLab, GitHub, or a README, from a text description, a DOT digraph, or a draw.io file or model. Also use when the user mentions C4, draw.io C4 shapes, line jumps, crossing arrows, diagram unreadable on dark theme, or asks to convert a .drawio file or a draw.io SVG export.
In this repository11 other files it gives its agents.
- bias-analysisSkill
- code-reviewSkill
- create-grafana-dashboardsSkill
- debugSkill
- evidence-based-analysisSkill
- git-conventionsSkill
- planSkill
- retroSkill
- skillSkill
- software-engineerSkill
- tddSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
Read drawio-rules.md first.
- Distinctive: line 23
Never lay out: give vertices distinct, non-overlapping positions and let the human run Arrange > Layout > Vertical Flow in the editor.
- Very specific: line 28
Keep sequence flows out of the C4 diagram — a separate mermaid sequenceDiagram block in the markdown.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
C4 graph
When to use
- User asks for an architecture diagram, a C4 diagram, or a system landscape
- User wants a diagram that opens in VS Code or draw.io and renders as SVG in GitLab, GitHub, or a README
- User provides a DOT digraph, a draw.io file, or a pasted draw.io model to convert
- Arrows cross heavily, or a diagram is unreadable on a dark theme
Overview
Produce C4 diagrams as .drawio files built from the draw.io C4 palette: person, system, container, boundary, and relationship shapes with line jumps where arrows cross. Claude writes the model; the human opens it in VS Code (draw.io extension) or draw.io, runs the Vertical Flow layout, and exports <name>.drawio.svg — one file that re-opens in draw.io and renders in GitLab, GitHub, and VS Code.
Reference: drawio-rules.md. Read it before the first line of diagram code. Reference: inputs.md. Read it when converting from a source, validating output, or handing over.
Rules
- Read drawio-rules.md first; copy its styles, object attributes, and labels verbatim.
- Never lay out: give vertices distinct, non-overlapping positions and let the human run Arrange > Layout > Vertical Flow in the editor.
- Respect C4 levels — one level per diagram, 15 elements at most. Level 1 (System Context): persons and systems only, containers collapsed into their owning system. Level 2 (Container): one diagram per in-focus system — its containers plus direct neighbours. Over 15 elements or mixed levels: split per the Levels section of drawio-rules.md, one file per level, context first.
- Draw one-way relationships with verb descriptions ("Notifies", "Reads"); two-way traffic is two relationships.
- In convert mode, extract per inputs.md; the output edge set must equal the source's. Report dangling edges, never drop them silently.
- Validate the model before handing over (inputs.md: parse, edge ids, edge multiset), then give the open-and-export steps and ask for a preview check. Claude never renders.
- Keep sequence flows out of the C4 diagram — a separate mermaid
sequenceDiagramblock in the markdown.
Boundaries
This skill never emits mermaid C4 or flowcharts, never renders, and never hand-draws SVG: the .drawio.svg comes from the human's export. Commits and MR text belong to git-conventions; multi-session planning to plan.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

