AGENT SKILL

architecture-diagrams

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).

License 许可
MIT
最近更新
2026-11-15
Stars
★ 0
Forks
1

01 前言 Front Matter

name
architecture-diagrams
triggers
[ "user" ]
description
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).
argument-hint
What architecture should I diagram?

03 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.

04 同仓库更多 Skills

Leostruka
Leostruka/devin-bundle

montador-de-ideias

Use when assembling, expanding, or elevating a raw project idea or initial prompt into an ultra-detailed, first-principles dossier and compiled master prompt with journalistic OSINT market research, Tech Lead and Staff Architect justifications, atomic and modular hardening/optimization, and high-impact contact surfaces.

★ 0
Leostruka
Leostruka/devin-bundle

git-github-adaptive-engineering

Use when any task touches git history, GitHub issues/PRs/releases/CI, repo governance, or branch and merge decisions. Runs the Fase Zero situational-awareness battery, picks one of five delivery flows via the adaptive decision engine, and enforces commit/PR information-density standards. Orchestrates the gh, git-workflows, github-actions, pr, and debug/finish skills.

★ 0
Leostruka
Leostruka/devin-bundle

adaptive-agenda-calendar-routine-engine

Use when planning or executing work across hours, days, weeks, or sprints. Turns the calendar into a strict time-blocked agenda (HH:MM-HH:MM blocks carrying a routine profile, expected inputs, and a handoff output artifact), runs the 5-stage cognitive flow (Radar and Hunt -> Triage plus Steve Jobs conception -> workbench manifest -> >=32-cycle loop -> Close plus Open-Minded Scrum), and unfolds macro calendar milestones into micro agenda blocks through extensions/gcal/wrapper.py.

★ 0
Leostruka
Leostruka/devin-bundle

demo

Use when demonstrating a skill in a fixture project.

★ 0
Leostruka
Leostruka/devin-bundle

duplicate-skill

Use when testing duplicate skill name detection.

★ 0
Leostruka
Leostruka/devin-bundle

duplicate-skill

Use when testing duplicate skill name detection.

★ 0