agentleFS
soujavasoujava/agent-skills/skills/drawio/SKILL.md

drawio

Skill10 starsChanged 4 months agoMITView on GitHub

Create draw.io overview diagrams with consistent visual style and shape mappings for BCE, package-by-layer, package-by-feature, and hexagonal Java architectures. Use when asked to create, generate, or edit draw.io diagrams, architecture diagrams, component diagrams, or visual overviews of systems and modules. Triggers on "draw.io", "drawio", "create a diagram", "architecture diagram", "component diagram", or requests to visualize high-level system structure. Not for sequence diagrams or class diagrams.

25 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use excalidraw and handoff.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • lookfreeSkill

    excalidraw

    Generate architecture diagrams as .excalidraw files from codebase analysis. Use when the user asks to create architecture diagrams, system diagrams, visualize codebase structure, or generate excalidraw files.

    Also in 3 projects that use this

  • MicrosoftSkill

    handoff

    Compact the current conversation into a handoff document for another agent to pick up.

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 19 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    when invoked via diagrams, use the architecture it detected — the router is architecture-neutral

    line 17
  2. Distinctive:

    no clear architecture → use the Default mapping

    line 18
  3. Distinctive:

    never mix mappings inside one diagram

    line 19
  4. Distinctive:

    Use when no architecture mapping applies.

    line 52
  5. Distinctive:

    avoid crossing lines where possible

    line 133
  6. Very specific:

    use container shapes (container=1;) for subsystem, layer, or module grouping

    line 134
  7. Very specific:

    if a node blends into its container's fill (e.g.

    line 135
  8. Very specific:

    default node size: width=160;height=60.

    line 136
  9. Distinctive:

    use short, descriptive names

    line 140
  10. Distinctive:

    avoid technical jargon unless domain-specific

    line 141
  11. Distinctive:

    do not use italic font

    line 144

“Common” is measured: kept by at least 6 in 10 of the 19 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

Draw.io Overview Diagrams

Generate valid draw.io XML and save as <name>.drawio using the Write tool.

Mapping Selection

  • pick the shape mapping matching the architecture the user named or the composed skill implies:
    • BCE business components, or sdd4j-bce in context → BCE mapping
    • technical layer packages, or sdd4j-package-by-layer in context → Package By Layer mapping
    • feature/capability packages, or sdd4j-package-by-feature in context → Package By Feature mapping
    • ports-and-adapters layout, or sdd4j-hexagonal in context → Hexagonal mapping
  • when invoked via diagrams, use the architecture it detected — the router is architecture-neutral
  • no clear architecture → use the Default mapping
  • never mix mappings inside one diagram

Lines

  • rounded routing: edgeStyle=orthogonalEdgeStyle;rounded=1;
  • black stroke: strokeColor=#000000;
  • arrow at target: endArrow=block;endFill=1;
  • async/optional dependencies: add dashed=1;
  • label without shadow: shadow=0; on the label cell
  • when an edge crosses container boundaries (source or target is nested in a container), pin explicit exitX/exitY on the source and entryX/entryY on the target so the orthogonal router does not take ugly paths; when multiple edges share a target, give each a distinct entry point to prevent overlap

Style

  • all nodes: rounded=1;whiteSpace=wrap;html=1;shadow=1;
  • corner radius: arcSize=10;
  • font: fontColor=#000000;fontSize=13;fontStyle=0;
  • grouping: container with title bar (container=1;collapsible=0;verticalAlign=top;), fill #f5f5f5, border #666666

Palette

Colors carry the same meaning across all mappings — and match the mermaid skill, so mixed-format diagrams stay visually consistent:

ColorFillBorderMeaning
Blue#dae8fc#6c8ebfcapability / business component
Green#d5e8d4#82b366entrypoint / boundary
Purple#e1d5e7#9673a6application / control
Yellow#fff2cc#d6b656domain / entity
Gray#f5f5f5#666666infrastructure / shared / grouping container
Dashed yellow#fff2cc#d6b656 dashedexternal service

Default Mapping

Use when no architecture mapping applies.

ElementShapeFillBorder
Componentrounded rectangle#dae8fc#6c8ebf
Groupingcontainer with title bar#f5f5f5#666666
External servicerounded rectangle, dashed=1#fff2cc#d6b656

BCE Mapping

ElementShapeFillBorder
Business Component (BC)rounded rectangle#dae8fc#6c8ebf
Subsystem containercontainer with title bar#f5f5f5#666666
External servicerounded rectangle, dashed=1#fff2cc#d6b656
Boundary layerrounded rectangle#d5e8d4#82b366
Control layerrounded rectangle#e1d5e7#9673a6
Entity layerrounded rectangle#fff2cc#d6b656

BCE Robustness Icons (built-in)

Drawio ships with the Jacobson BCE icons. Use these — never reconstruct them from primitives (lines + ellipses + triangles).

  • Boundary Object: shape=umlBoundary;whiteSpace=wrap;html=1;
  • Control Object: ellipse;shape=umlControl;whiteSpace=wrap;html=1;
  • Entity Object: ellipse;shape=umlEntity;whiteSpace=wrap;html=1;

Color them by adding fillColor=#ffffff;strokeColor=<layer-border>;. Typical icon size: width=30;height=32. These icons are BCE-specific — do not use them in other mappings.

Package By Layer Mapping

Layers are containers; nodes are the capability's classes inside each layer.

ElementShapeFillBorder
Capability (spec contract)rounded rectangle#dae8fc#6c8ebf
Layer groupingcontainer with title bar#f5f5f5#666666
Entrypoint (controller, resource, handler, listener, CLI)rounded rectangle#d5e8d4#82b366
Application operation (service, use case)rounded rectangle#e1d5e7#9673a6
Domain/model type (entity, model, DTO)rounded rectangle#fff2cc#d6b656
Infrastructure (repository, client, adapter)rounded rectangle#f5f5f5#666666
External servicerounded rectangle, dashed=1#fff2cc#d6b656

Package By Feature Mapping

Nodes are feature packages; containers group by module or base package. Drawing inside a feature package reuses the element styles from the Package By Layer mapping.

ElementShapeFillBorder
Feature package (capability)rounded rectangle#dae8fc#6c8ebf
Module groupingcontainer with title bar#f5f5f5#666666
Shared package (declared exception)rounded rectangle, dashed=1#f5f5f5#666666
External servicerounded rectangle, dashed=1#fff2cc#d6b656

Hexagonal (Ports & Adapters) Mapping

Nodes are adapters, ports, use cases, and domain types. Lay out driving side left, driven side right; the hexagon boundary is a shape=hexagon container (container=1) holding ports, use cases, and domain when expanding a component, or a plain shape=hexagon node per capability in system view. Edges show call flow through ports — interface indirection is elided.

ElementShapeFillBorder
Capability coreshape=hexagon (node, or container=1 boundary)#dae8fc#6c8ebf
Driving adapter (REST resource, consumer, CLI, scheduler)rounded rectangle#d5e8d4#82b366
Inbound port (use case interface)rounded rectangle#e1d5e7#9673a6
Use case / application servicerounded rectangle#e1d5e7#9673a6
Domain typerounded rectangle#fff2cc#d6b656
Outbound portrounded rectangle#e1d5e7#9673a6
Driven adapter (persistence, client, publisher)rounded rectangle#f5f5f5#666666
External servicerounded rectangle, dashed=1#fff2cc#d6b656

Content

  • visualize only high-level concepts and modules
  • show dependencies between components as directed arrows
  • omit implementation details, classes, and methods
  • group related components visually
  • limit diagram to essential relationships

Layout

  • arrange components in logical flow (top-to-bottom or left-to-right)
  • consistent spacing: 40px between nodes, 20px padding inside containers
  • avoid crossing lines where possible
  • use container shapes (container=1;) for subsystem, layer, or module grouping
  • if a node blends into its container's fill (e.g. gray infrastructure inside a gray layer container), set fillColor=none on the container
  • default node size: width=160;height=60;

Labels

  • use short, descriptive names
  • avoid technical jargon unless domain-specific
  • label arrows only when relationship type is ambiguous
  • black font color for all labels
  • do not use italic font
  • connection labels must be without shadow
  • connection labels must use fontSize=16;

XML Structure

Minimal skeleton — every .drawio file must follow this hierarchy:

<mxfile>
  <diagram name="Overview" id="diag1">
    <mxGraphModel dx="1024" dy="768" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="827" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>
        <!-- nodes and edges here, parent="1" -->
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>

Example — Minimal 2-Node BCE Diagram

<mxfile>
  <diagram name="Overview" id="d1">
    <mxGraphModel dx="1024" dy="768" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="827" math="0" shadow="0">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>
        <mxCell id="2" value="Orders" style="rounded=1;whiteSpace=wrap;html=1;shadow=1;arcSize=10;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#000000;fontSize=13;fontStyle=0;" vertex="1" parent="1">
          <mxGeometry x="100" y="200" width="160" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="3" value="Payments" style="rounded=1;whiteSpace=wrap;html=1;shadow=1;arcSize=10;fillColor=#dae8fc;strokeColor=#6c8ebf;fontColor=#000000;fontSize=13;fontStyle=0;" vertex="1" parent="1">
          <mxGeometry x="380" y="200" width="160" height="60" as="geometry"/>
        </mxCell>
        <mxCell id="4" value="charges" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;strokeColor=#000000;fontColor=#000000;fontSize=16;fontStyle=0;endArrow=block;endFill=1;shadow=0;" edge="1" source="2" target="3" parent="1">
          <mxGeometry relative="1" as="geometry"/>
        </mxCell>
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>

File Output

  • save as <name>.drawio using the Write tool
  • see references/example-bce.drawio, references/example-layered.drawio, references/example-feature.drawio, and references/example-hexagonal.drawio for complete per-mapping examples

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.

Reviews can't be read right now.

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.