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.

7 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use codegen-diagram, codegen-doc and 6 more.

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.
  • xstongxueSkill

    codegen-diagram

    基于当前项目/代码生成 Draw.io 图表,支持技术栈图、系统架构图、数据结构图、E-R 图四种类型。输出符合 Draw.io 语法的 .drawio 文件(mxGraph XML),可直接导入 Draw.io 编辑。当用户提到技术栈、系统架构、数据结构、E-R 图时使用。

    Also in 3 projects that use this

  • xstongxueSkill

    codegen-doc

    基于当前项目/代码生成各类文档,支持论文章节、项目梳理、重点问题、简历项目描述四种类型。当用户提到生成论文章节、项目梳理、技术难点、简历项目描述时使用。要给新同事看的上手文档(新人文档、架构文档、代码导读、onboarding)用 project-docs。

    Also in 3 projects that use this

  • garfield-bbSkill

    wechat-article-writer

    公众号文章自动化写作流程。支持资料搜索、文章撰写、爆款标题生成、排版优化。当用户提到写公众号、微信文章、自媒体写作、爆款文章、内容创作时使用此 skill。

    Also in 3 projects that use this

  • LaoK2017Skill

    web-access

    所有联网操作必须通过此 skill 处理,包括:搜索、网页抓取、登录后操作、网络交互等。触发场景:用户要求搜索信息、查看网页内容、访问需要登录的网站、操作网页界面、抓取社交媒体内容(小红书、微博、推特等)、读取动态渲染页面、以及任何需要真实浏览器环境的网络任务。

    Also in 4 projects that use this

  • BlockSkill

    frontend-design

    Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

    Also in 3 projects that use this

  • +3 more from xstongxue

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 2 are distinctive, and 5 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 2

    Distinctive

    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 measured: kept by at least 6 in 10 of the 3 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 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.