agentleFS
LeostrukaLeostruka/devin-bundle/skills/architecture-diagrams/SKILL.md

architecture-diagrams

Skill0 starsChanged 3 months agoMITView on GitHub

Use when the deliverable is a physical diagram artifact (.svg/.png) — C4 models, dense class diagrams, network topology rendered via PlantUML. Not for diagrams embedded in Markdown (use Mermaid there).

8 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 4 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 8 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If the user wants a diagram inside a Markdown doc → Mermaid.

    line 26
  2. Very specific:

    Write the PlantUML source to a file (e.g.

    line 37
  3. Very specific:

    Verify ok: true in the JSON output, then open the artifact for the user.

    line 54
  4. Distinctive:

    If the server returns a syntax-error image (non-SVG body), read the error it reports, fix the source, re-check, re-render.

    line 55
  5. Distinctive:

    Use the C4-PlantUML stdlib — always remote-include, never vendor:

    line 60
  6. Very specific:

    Every element gets alias, label, technology, description (4 args).

    line 79
  7. Distinctive:

    Keep aliases stable across levels so diagrams stay cross-referenceable.

    line 81

“Common” is measured: kept by at least 6 in 10 of the 8 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Architecture Diagrams (PlantUML)

Generates physical diagram artifacts via the public PlantUML server — no Java required. Renders C4 models, dense class diagrams, and network topologies that Mermaid cannot express well.

Tool boundary — Mermaid vs PlantUML

Mermaid for diagrams embedded in Markdown — sequence, flow, state, gitgraph, mindmap, ER — quick logic inside docs, wikis (obsidian-workflow), and reports. Validated inline by the validate-mermaid hook.

PlantUML exclusively for physical artifacts (.svg/.png files):

  • C4 models (Context / Container / Component / Deployment)
  • Dense class diagrams (many entities, relations, generics)
  • Network / deployment topology

If the user wants a diagram inside a Markdown doc → Mermaid. If they want a file they can open, print, or attach → PlantUML via this skill.

Where it is

  • Renderer: extensions/diagram-tools/plantuml_renderer.py (installed at %APPDATA%\devin\extensions\diagram-tools\) — stdlib-only; Deflate + PlantUML modified-Base64 + GET to plantuml.com/plantuml/{svg,png}/.

Flow

  1. Write the PlantUML source to a file (e.g. .devin/scratch/diagram.puml or a path the user chooses). Never render from a heredoc — keep the source file as the editable artifact.
  2. Syntax sanity before the network (mandatory):

    python extensions/diagram-tools/plantuml_renderer.py --check diagram.puml

    Fix all reported errors before proceeding.

  3. Render:

    python extensions/diagram-tools/plantuml_renderer.py diagram.puml            # .svg
    python extensions/diagram-tools/plantuml_renderer.py diagram.puml --format png

    Verify ok: true in the JSON output, then open the artifact for the user.

  4. If the server returns a syntax-error image (non-SVG body), read the error it reports, fix the source, re-check, re-render.

C4 model rules

Use the C4-PlantUML stdlib — always remote-include, never vendor:

@startuml
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml

Person(user, "User", "End user")
System_Boundary(sys, "System") {
  Container(app, "App", "Python", "Does X")
  ContainerDb(db, "DB", "SQLite", "Stores Y")
}
Rel(user, app, "Uses")
Rel(app, db, "Reads/Writes")
@enduml
  • Layer !include by depth: C4_Context.puml ⊂ C4_Container.puml ⊂ C4_Component.puml; C4_Deployment.puml for topology.
  • One diagram per abstraction level — do not mix Context and Component.
  • Every element gets alias, label, technology, description (4 args).
  • Rel(a, b, "verb") for every arrow; direction = call order.
  • Keep aliases stable across levels so diagrams stay cross-referenceable.

Gotchas

  • The public server requires network — if offline, say so and keep the .puml source; it renders later unchanged.
  • Server-side syntax errors return an image containing the error — the script detects this and exits non-zero. Treat it as a fix-and-retry.
  • PlantUML is whitespace/keyword-sensitive: @enduml (not @end uml), arrows are --> / ..> not ->.
  • Large C4 models hit URL limits (~8KB encoded); split into per-level files.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.