Diagram Agent

VerifiedSafe

Diagram generation, editing, export, and visual system management. Specializes in Draw.io diagrams: architecture, flowchart, ER, sequence, class, state, mind-map.

Sby Skills Guide Bot
DocumentationIntermediate
7/22/2026
Claude CodeCursorWindsurf
#drawio#diagrams#architecture#flowchart#export

Recommended for

Automated summary

Generates, edits, validates and exports Draw.io diagrams (architecture, flowchart, ER, sequence, class, state, mind-map) by coordinating several diagram sub-skills with the drawio-mcp server.

Strengths

  • Covers many diagram types with an explicit routing logic that runs from the initial request through to export.
  • Requires the user to approve the inline SVG preview before the diagram is saved or exported.
  • Produces the .drawio source file plus PNG, SVG and PDF exports, with a completeness check before exporting.
  • Leverages shape and icon search and an optional styling skill to apply brand colors or a dark theme.

Limitations

  • Depends on the drawio-mcp server (1.0.0 or later) and the diagram-generate, diagram-export and diagram-validate skills; without that setup the agent cannot produce anything.
  • The full workflow involves several approval round-trips and takes roughly 5 to 30 minutes per diagram.
  • Scope is centered on the Draw.io format: no export to Mermaid, PlantUML or other tools is described.
When to use it

When the diagram itself is the deliverable — architecture, process flow, data model — and you need an editable Draw.io file with multi-format exports.

When not to use it

For a quick sketch to drop into a README or a chat reply, or when no drawio-mcp server is available — a lightweight text diagram such as Mermaid is faster.

Security analysis

Safe
Quality score88/100

The skill is a coordination layer that invokes other skills and uses allowed tools (Read, Bash, Grep) for file inspection and possibly execution via invoked skills, but it does not contain destructive, exfiltration, or obfuscated instructions. It explicitly includes approval gates for MCP egress, indicating transparency and safety. No risky commands are present in the SKILL.md.

No concerns found

How this analysis is made

Examples

Payment service architecture
Draw the architecture of our payment service: an API gateway, three Lambda functions, DynamoDB, and the SQS queue between them. Then export it as PNG and PDF.
ER diagram with validation
Create an ER diagram for the user, order and invoice tables, then validate that every relationship and label is complete before saving the .drawio file.
Edit an existing diagram
Open docs/diagrams/login-flow.drawio and add the MFA step between the password check and session creation, then re-export the SVG.

name: diagram-agent version: 0.1.0 description: | Diagram generation, editing, export, and visual system management. Specializes in Draw.io diagrams: architecture, flowchart, ER, sequence, class, state, mind-map. agents: [_infrastructure] allowed-tools:

  • Read
  • Bash
  • Grep

metadata: category: "visual-system" domain: null tier: "recommended" dependencies: mcps: - name: drawio-mcp min-version: "1.0.0" skills: - diagram-generate - diagram-export - diagram-validate min-agent-arch-version: "0.1.4" training: keywords: [diagram, architecture, flowchart, visual, draw.io, sketch] discovery: related-to: [design-agent, design-html, design-review] approval-gates: policy-required: [mcp-egress] support: maintenance-status: "active" owner-team: "design-systems" last-reviewed: "2026-06-26"

optional-skills:

  • diagram-search
  • diagram-style

{{PREAMBLE}}

Diagram Agent

Specialist agent for diagram generation, editing, export, and visual system management.

When to Use

  • /diagram-agent when user says: "Draw the architecture", "Create a flowchart", "Design a data model"
  • User wants diagrams as primary deliverable (not secondary visuals)
  • Diagram needs editing, styling, or multi-format export
  • Architecture/flow documentation is critical to spec

Skills

This agent coordinates across:

| Skill | Use | Invoked When | |-------|-----|--------------| | diagram-generate | Create diagrams from text | "Draw X", "Create a flowchart", "Visualize the flow" | | diagram-export | Export to PNG/SVG/PDF | "Export to PNG", "I need this as PDF" | | diagram-search | Find shapes, icons, templates | "Find an AWS Lambda shape", "Search AWS icons" | | diagram-validate | Check completeness | Before exporting: all labels? connections complete? | | diagram-style (optional) | Apply design system colors | "Use our brand colors", "Apply dark theme" |

Routing Logic

User Request
    ↓
Is diagram request? → /diagram-agent
    ↓
Need specific type? (architecture, flowchart, ER, sequence, class, state, mind-map)
    ├─ No → Invoke /diagram-generate (agent asks type first)
    └─ Yes → Invoke /diagram-generate with type specified
    ↓
User approves diagram SVG preview?
    ├─ No → /diagram-generate (revise)
    └─ Yes → Continue
    ↓
Need styling? → /diagram-style (optional)
    ↓
Need export? (PNG, SVG, PDF)
    ├─ No → Save .drawio file, done
    └─ Yes → /diagram-export
    ↓
Validate completeness
    ├─ Issues found → /diagram-validate (checklist)
    └─ Complete → Done

Agent Workflows

Workflow 1: Generate + Preview (Minimal)

1. /diagram-generate
   ├─ Ask: diagram type?
   ├─ Ask: scope (components, entities, actors)?
   └─ Generate SVG preview inline

2. User approves or requests revisions
   ├─ Approve → Save .drawio
   └─ Revise → /diagram-generate again

Time: 5-10 minutes

Output: .drawio file + SVG in docs/diagrams/

Workflow 2: Generate + Export (Production)

1. /diagram-generate
   ├─ Create diagram from spec
   ├─ Show SVG preview
   └─ Get approval

2. /diagram-export
   ├─ Export PNG (for docs)
   ├─ Export PDF (for print)
   └─ Export SVG (for embedding)

3. /diagram-validate
   ├─ Check: all labels present?
   ├─ Check: swimlanes correct?
   ├─ Check: connections complete?
   └─ Output: validation report

4. Save all files, commit

Time: 15-30 minutes

Output: diagram.drawio, diagram.png, diagram.pdf, diagram.svg

Workflow 3: Edit Existing Diagram

1. Load .drawio file from repo
2. Ask: what should change?
3. /diagram-generate (load + modify mode)
4. Preview changes
5. Export updated versions
6. Commit changes

Time: 5-15 minutes

Diagram Types Reference

| Type | Best For | Example | |------|----------|---------| | Flowchart | Process flows, decision trees | Login flow, deployment pipeline | | Architecture | System components + connections | Microservices architecture, cloud setup | | ER (Entity-Relationship) | Data models, schema | Database design, entity relationships | | Sequence | Actor interactions, workflows | User journey, API call sequence | | Class | Object-oriented design | Class hierarchy, inheritance | | State | State machines, lifecycle | Order status flow, app states | | Mind-Map | Brainstorming, concepts | Feature breakdown, organization | | Swimlane | Parallel processes, actors | Cross-functional flow, responsibilities |

Decision logic:

  • Complex process? → Flowchart
  • Infrastructure/components? → Architecture
  • Data model? → ER
  • Actor interactions? → Sequence
  • OOP design? → Class
  • State changes? → State machine
  • Exploration? → Mind-map
  • Multi-actor responsibility? → Swimlane

Anti-Patterns

❌ Avoid:

  • Generating without asking type first
  • Creating overly detailed diagrams (15+ components = too complex)
  • Using XML when Mermaid is simpler
  • Exporting before user approves
  • Mixing multiple diagram purposes in one canvas
  • Forgetting to validate before exporting

✅ Do:

  • Ask clarifying questions first
  • Keep diagrams focused and simple
  • Show SVG preview before saving
  • Validate completeness
  • Use consistent styling
  • Save both .drawio (editable) and exports

Policy Requirements

MCP Egress: diagram-generate requires explicit approval to invoke drawio-mcp server.

Set in skill metadata:

approval-gates:
  policy-required: [mcp-egress]

User must approve: "This will connect to drawio-mcp to generate diagrams. OK?"

Diagram Placement & Grid

Diagrams follow rigid grid to simplify layout:

Column position: col * 180 + 40
Row position:    row * 120 + 40

Example: Cell (2, 3) is at (2*180+40, 3*120+40) = (400, 400)

This eliminates overlap checking and simplifies generation.

Integration Points

With /design-agent:

  • Design-agent handles UI component design
  • Diagram-agent handles architecture/flow visualization
  • Collaborate on system architecture diagrams

With /spec-agent:

  • Spec writes requirements
  • Diagram-agent visualizes spec (swimlanes, flows, actors)
  • Diagrams added to spec document

With /orchestrate:

  • Orchestrate coordinates multi-agent work
  • Diagram-agent contributes visual specs
  • Other agents implement based on diagram + spec

Troubleshooting

| Issue | Solution | |-------|----------| | "Too many components" | Break into multiple focused diagrams | | "Layout messy" | Use swimlanes to organize, apply grid | | "Colors look wrong" | Invoke /diagram-style for design system colors | | "Shapes missing" | Invoke /diagram-search to find specific shapes | | "File won't open" | Validate XML syntax: /diagram-validate | | "Export quality poor" | Try PNG with higher DPI or use PDF instead |

Related Skills

See Also

<!-- agent-skills:start -->

Declared Skills

Skills that declare this agent in their frontmatter agents: field.

| Skill | Description | |-------|-------------| | diagram-export | Export Draw.io diagrams to PNG, SVG, PDF with styling options. | | diagram-generate | Generate Draw.io diagrams from text descriptions. | | diagram-search | Search Draw.io shape library for icons, shapes, and templates. | | diagram-style | Apply consistent styling to diagrams. Colors, fonts, themes. | | diagram-validate | Validate diagram completeness and design patterns. | | drawio-mcp-python | Python FastMCP server for opening draw.io diagrams from XML, CSV, and Mermaid |

<!-- agent-skills:end -->

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/diagram-agent-mrwakb3x/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/diagram-agent-mrwakb3x' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/diagram-agent-mrwakb3x/download' --output '.skill-downloads/diagram-agent-mrwakb3x/SKILL.md.part' && mv '.skill-downloads/diagram-agent-mrwakb3x/SKILL.md.part' '.skill-downloads/diagram-agent-mrwakb3x/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/diagram-agent-mrwakb3x/SKILL.md' && test -s '.skill-downloads/diagram-agent-mrwakb3x/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/diagram-agent' && cp -R '.skill-downloads/diagram-agent-mrwakb3x' '.claude/skills/diagram-agent'

Cursor
test -f '.skill-downloads/diagram-agent-mrwakb3x/SKILL.md' && test -s '.skill-downloads/diagram-agent-mrwakb3x/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/diagram-agent' && cp -R '.skill-downloads/diagram-agent-mrwakb3x' '.cursor/skills/diagram-agent'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/diagram-agent-mrwakb3x'

openskills read 'diagram-agent-mrwakb3x'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/diagram-agent-mrwakb3x/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills