Architecture
Structure
Fifty editorial diagram types, one rule above all: delete until nothing can be removed.
A Claude/Cursor skill that writes self-contained HTML with inline SVG in a skinnable editorial system. It routes a request through 9 semantic patterns to 50 type references, ships importers for draw.io, Excalidraw, Mermaid and PlantUML, and backs its charts with geometry verifiers. I read the skill at f6db0de, ran plantuml_extract.py on the shipped fixtures and verify_geometry.py --all (239 assets, 0 findings). The highest-quality move is usually deletion.
Anyone who wants a diagram that looks designed rather than generated: architecture, charts, journeys, maps.
One HTML file per diagram, optional SVG/PNG export, and a brand profile you can save and reload.
The skill is a router. Behavior picks the pattern, the pattern picks the nearest layout, and the plan is confirmed before anything is drawn.
Style gate. If they are still the shipped defaults (paper #f5f5f5, ink #2d3142, accent #bf4520), pause and ask the user.
Semantic pattern. When behavior, state, enforcement, or risk carries the meaning, first load semantic-patterns.md.
Visual type. Always load the chosen type reference linked in the guide before drawing.
Confirm. Before rendering, state the plan in one short message: the chosen visual type (and semantic pattern, if routed), the size preset, and anything the complexity budget (§7) will force out.
Density. Target density: 4/10. Enough to be technically complete. Not so dense it needs a guide. Above 9 nodes, it's probably two diagrams.
| Behavioral trigger | Pattern | Nearest type |
|---|---|---|
| Fan-in, queue depth, finite capacity, bottleneck | Fan-in queue / bottleneck | Data flow |
| Repeated Question / Input / Governance / Output slots across stages | Stage framework with semantic slots | Process |
| Conversation or loose input becomes a structured durable artifact | Unstructured input → structured artifact | Data flow |
| Two rule traces need pass/fail/skipped/not-reached and first divergence | Paired policy-evaluation traces | Flowchart |
| Trust boundaries plus permitted/forbidden ingress or deploy paths | Secure paved road | Architecture |
| Controls grouped by where they are enforced | Governance / control catalog | Layer stack |
| Defenses compensate for prior gaps and residual risk propagates | Compensating security layers | Layer stack |
| Hierarchical, ID-addressable decomposition needing per-block I/O, constraints, and a code link | Traceable block decomposition | Tree |
| One subject progresses through phases, waits, retries, cancellation, and terminal outcomes | Lifecycle phase map | State Machine |
Pick a type. The tag is the row from the SKILL.md §3 guide; How it works lists the reference file’s layout conventions; the quotes are its own anti-patterns, all checked at build time.
Screenshots shipped in docs/screenshots, one per type. Click to enlarge.
Structure
Structure
Structure
Flow & behavior
Flow & behavior
Flow & behavior
Structure
Flow & behavior
Time & planning
Flow & behavior
Charts
Charts
Charts
Flow & behavior
Structure
Structure
Structure
Structure
Spatial
Spatial
Charts
Charts
Charts
Charts
Charts
Charts
Charts
Time & planning
Charts
Structure
Flow & behavior
Structure
Flow & behavior
Structure
Structure
Flow & behavior
Time & planning
Time & planning
Time & planning
Flow & behavior
Flow & behavior
Structure
Structure
Structure
Time & planning
Structure
Flow & behavior
Structure
Flow & behavior
Charts
Seven slash commands drive the workflow. Eight stdlib-first scripts do the deterministic work; I ran the two new ones at this pin, and the earlier six on a prior checkout.
The universal anti-patterns from SKILL.md §4, verbatim.
| Anti-pattern | Why it fails |
|---|---|
| Dark mode + cyan/purple glow | Looks "technical" without design decisions |
| JetBrains Mono as blanket "dev" font | Mono is for technical content — ports, commands, URLs. Names go in Geist sans. |
| Identical boxes for every node | Erases hierarchy |
| Legend floating inside the diagram area | Collides with nodes |
| Arrow labels with no masking rect | Bleeds through the line |
Vertical writing-mode text on arrows | Unreadable |
| 3 equal-width summary cards as default | Generic grid — vary widths |
| Shadow on any element | Shadows are out. Borders are in. |
rounded-2xl on boxes | Max radius 6–10px or none |
| Coral on every "important" node | Coral is 1–2 editorial accents, not a signaling system |
| Reproducing Mermaid's renderer layout | Imports automatic spacing and routing instead of making an editorial layout |
| Any breach of the six §6 connector rules | Automatic fail: diagonal slants, labels touching their stroke, masks clipped by a later node, overlapping paths, shared attach points, transit behind a non-endpoint box |
The 74 repository checks plus the original 6 skill scripts were run at commit 7a12007. At f6db0de I ran only the two new skill scripts (stdlib, no network). The repo now has 91 test-/verify- scripts; those were not re-run here.
| Run | Result | Note |
|---|---|---|
| 74 repo checks, first pass (7a12007) | 59 pass, 15 fail | 12 verifiers exit 2 when given no paths; 3 Playwright tests fail before Chromium is installed. |
| Same 15, rerun correctly (7a12007) | 15/15 pass | After playwright install chromium and adding --all (or --shipped for verify-motion). |
| self_check.py over 217 assets (7a12007) | 215 OK, 2 FAIL | icons.html and index.html are galleries, not diagrams; exit code 1 for the batch. |
| 3 extractors on fixtures (7a12007) | pass | draw.io: 12 nodes / 8 edges, node budget flagged OVER (max 9). |
| export_svg / export_png (7a12007) | pass | 9 KB SVG and 38 KB PNG from example-waterfall.html. |
| plantuml_extract.py fixtures (f6db0de) | pass | sequence 3n/8e, class 4n/3e, adversarial labels kept as data. No PlantUML runtime. |
| verify_geometry.py --all (f6db0de) | 239 files, 0 findings | Label-mask paint order plus connector routing (diagonal, border-riding, corner ports, stacked trunks). |
| git status after all runs | clean | No files written into the repo. |
Most verifiers take --all; verify-motion takes --shipped and rejects --all. Without a flag they print usage and exit 2, which reads like a failure in CI.
Three tests and PNG export need a downloaded Chromium. The export command documents this; the test scripts just crash with a stack trace.
plugin.json says 2.6.164; SKILL.md metadata says 2.6.
drawio_extract and excalidraw_extract print the file name markdown-escaped (sample\-architecture\.drawio); mermaid_extract does not.
The Excalidraw and Mermaid extractors treat labels as data and discard links and payloads. That is the right default for anything an agent reads.
Waterfall, Sankey, beeswarm and others check the rendered geometry against declared values, so a plausible-but-wrong chart fails.
One reference file per output type. Each has Best for, layout rules and anti-patterns. The agent loads only the one it needs.
Route by meaning before layout. A semantic pattern picks the behavior; the type picks geometry.
Gate on brand tokens. Refuse to ship defaults into a branded project without asking.
Confirm the plan in one message. Type, size and what the budget cuts, before drawing.
Ship the checker. self_check.py lets the agent verify its own file.
Each quote on this page is compared with its source file at build time; the build fails on any mismatch.