agentleFS
dev-vpandeydev-vpandey/vpandey-skills/drawio-diagram/SKILL.md

drawio-diagram

Skill4 starsChanged 6 months agoMITView on GitHub

Generate draw.io diagrams (.drawio files) for any visual — system design, DSA patterns, LLD class diagrams, Claude Code workflows, interview frameworks, architecture flows, and AWS cloud architectures with native AWS iconography (EC2, S3, Lambda, etc. via mxgraph.aws4). No render pipeline needed. Triggered by "generate diagram", "draw this", "diagram for", "visualise", "aws diagram", "aws architecture", "cloud architecture", "generate architectural diagram using aws", or proactively when a visual would sharpen an explanation.

4 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. About 0 are common, 2 are distinctive, and 5 are 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.

  • 5

    Very specific

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

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

    Every .drawio file follows this wrapper.

    line 20
  2. Very specific:

    Always include <mxCell id="0"/> and <mxCell id="1" parent="0"/> — diagram breaks without them

    line 38
  3. Very specific:

    Every vertex needs vertex="1", every edge needs edge="1" — never mix

    line 39
  4. Very specific:

    Every element needs parent="1" (or a container ID for child elements)

    line 40
  5. Very specific:

    S3 exception: use shape=mxgraph.aws4.resourceIcon;resIcon=mxgraph.aws4.s3;fillColor=#7AA116 — the direct S3 shape renders as a plain …

    line 66
  6. Distinctive:

    Follow ROUTING.md — determines delivery (MCP live editor or file write) and XML rules

    line 74
  7. Distinctive:

    Do not print raw XML in the conversation unless asked — write the file directly.

    line 77

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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.

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

Draw.io Diagram Skill

Generate a .drawio XML file. Open by dragging onto app.diagrams.net or in VS Code (Draw.io Integration extension). No setup, no dependencies, no render loop.

CORE PRINCIPLE: DIAGRAMS ARGUE

The shape IS the meaning. Before writing XML, answer:

  1. What is the core argument this diagram makes?
  2. What visual structure mirrors it — layers, fan-out, convergence, timeline, comparison?

The Isomorphism Test: remove all labels. Does the structure still communicate the concept?

FILE STRUCTURE

Every .drawio file follows this wrapper. Never omit the two root cells.

<mxfile host="app.diagrams.net">
  <diagram name="Page-1" id="diagram-1">
    <mxGraphModel grid="0" gridSize="10" pageWidth="1169" pageHeight="827">
      <root>
        <mxCell id="0"/>
        <mxCell id="1" parent="0"/>
        <!-- all diagram elements go here, parent="1" -->
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>

MANDATORY RULES

  1. Always include <mxCell id="0"/> and <mxCell id="1" parent="0"/> — diagram breaks without them
  2. Every vertex needs vertex="1", every edge needs edge="1" — never mix
  3. Every element needs parent="1" (or a container ID for child elements)
  4. Edges connecting shapes use source="id" and target="id" — never hardcoded coordinates
  5. IDs must be unique across the entire file
  6. whiteSpace=wrap;html=1; on all vertex styles to enable text wrapping

LAYOUT STRATEGIES

╔══════════════════════════╦══════════════════════════════════════════════════════════════╗ ║ Strategy ║ Use for ║ ╠══════════════════════════╬══════════════════════════════════════════════════════════════╣ ║ Vertical layers ║ System architecture, request flow — swimlanes top to bottom ║ ║ Horizontal timeline ║ Workflows, sequences, interview frameworks ║ ║ Fan-out ║ One-to-many — single source, arrows to N targets below ║ ║ Convergence ║ Aggregation, map-reduce — N inputs to one output ║ ║ Two-column comparison ║ Wrong vs right, senior vs staff — left red, right green ║ ║ Tree ║ Class hierarchy, decision trees — root at top ║ ╚══════════════════════════╩══════════════════════════════════════════════════════════════╝

AWS QUICK-START

When a diagram includes AWS services, keep the existing layout unchanged — same swimlanes, zones, edges, and edge labels. Only swap each AWS service box for a 60×60 icon at the same centre position; all non-AWS nodes stay as plain rectangles. Label icons with service name only (sub-details overlap edge labels).

Icon style: sketch=0;outlineConnect=0;fontColor=#232F3E;gradientColor=none;strokeColor=none;fillColor=__COLOR__;labelBackgroundColor=#ffffff;align=left;labelPosition=right;verticalLabelPosition=middle;verticalAlign=middle;html=1;fontSize=11;fontStyle=0;aspect=fixed;shape=mxgraph.aws4.__SHAPE__;whiteSpace=wrap; — size width="60" height="60".

Label to the right keeps the icon's top/bottom connection points clear of edge labels. Include sub-details as a second line: <b>Service Name</b><br/><font style='font-size:9px;color:#555;'>sub detail</font>.

S3 exception: use shape=mxgraph.aws4.resourceIcon;resIcon=mxgraph.aws4.s3;fillColor=#7AA116 — the direct S3 shape renders as a plain coloured box.

Shapes and category colours → AWS-REFERENCE.md

OUTPUT INSTRUCTIONS

  1. Answer: what is the argument? what structure mirrors it?
  2. For AWS diagrams: identify which nodes are AWS services; consult AWS-REFERENCE.md for shape name and colour
  3. Follow ROUTING.md — determines delivery (MCP live editor or file write) and XML rules
  4. One line on what the diagram argues

Do not print raw XML in the conversation unless asked — write the file directly.

REFERENCES

  • Routing decision (MCP vs file, tier selection, XML rules per path) → ROUTING.md
  • Generic shapes, colour system, layout rules → REFERENCE.md
  • AWS service icons and cheat sheet → AWS-REFERENCE.md
  • Worked examples → EXAMPLES.md

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.