drawio-diagrams-enhanced
This skill should be used when the user asks to "create a diagram", "draw a flowchart", "make a swimlane diagram", "create WBS", "generate RACI matrix", "build network diagram", "create org chart", or mentions draw.io, diagrams.net, BPMN, UML, Gantt, PERT, or project management diagrams. Integrates with next-ai-draw-io MCP server for real-time diagram creation and editing.
What this skill does
# Enhanced Draw.io Diagram Creation with MCP Integration
Create professional diagrams using the next-ai-draw-io MCP server. Generate mxGraphModel XML for real-time browser preview and editing.
## MCP Workflow
### 1. Start Session
Call `start_session` tool first to open browser with real-time preview.
### 2. Create New Diagram
Use `create_new_diagram` tool with mxGraphModel XML (not full mxfile wrapper):
```xml
<mxGraphModel>
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<!-- shapes here -->
</root>
</mxGraphModel>
```
**Critical constraints:**
- Keep elements within x=0-800, y=0-600
- Start from x=40, y=40 with tight spacing
- Use unique IDs starting from "2"
- Set parent="1" for top-level shapes
- Specify exitX/exitY/entryX/entryY for edges to avoid overlaps
### 3. Edit Existing Diagram
For modifications, call `get_diagram` first to see current structure, then use `edit_diagram` with operations array.
### 4. Get Current State
Use `get_diagram` to retrieve current XML including user's manual edits.
## Core Capabilities
### 1. Standard Diagram Types
- **Flowcharts**: Basic flowcharts, decision trees, process flows
- **Cross-Functional Flowcharts (CFF)**: Swimlane diagrams showing processes across departments/roles
- **BPMN Diagrams**: Business Process Model and Notation diagrams
- **UML Diagrams**: Class diagrams, sequence diagrams, use case diagrams
- **Network Diagrams**: Infrastructure, cloud architecture, system design
- **Org Charts**: Organizational hierarchies and team structures
- **Mind Maps**: Conceptual mapping and brainstorming
- **Entity Relationship Diagrams**: Database schemas
### 2. PMP/PMBOK Project Management Diagrams
- **Work Breakdown Structure (WBS)**: Hierarchical decomposition of project deliverables
- **Project Network Diagrams**: PERT charts, CPM, activity dependencies
- **Gantt Charts**: Timeline-based project schedules
- **RACI Matrices**: Responsibility assignment matrices
- **Risk Register Diagrams**: Risk matrices, heat maps, probability-impact grids
- **Stakeholder Maps**: Power-interest grids, influence diagrams
- **Resource Histograms**: Resource allocation and capacity planning
- **Communication Plans**: Information flow diagrams
- **Process Group Diagrams**: Initiating, Planning, Executing, Monitoring & Controlling, Closing
- **Knowledge Area Maps**: Integration, Scope, Schedule, Cost, Quality, Resource, Communications, Risk, Procurement, Stakeholder Management
### 3. Visual Asset Libraries Available
Agents can reference and incorporate shapes from extensive custom libraries:
**Icon & Symbol Libraries**:
- Material Design Icons
- Font Awesome icons
- OSA (Open Security Architecture) Icons
- UN-OCHA Humanitarian Icons
- Flat Color Icons
- Chart & Infographic Icons
- Windows 10 Icons
- Gesture & Fingerprint Icons
**Technology & Infrastructure**:
- Kubernetes Icons
- Cloud Provider Icons (AWS, Azure, GCP, DigitalOcean)
- Network Device Libraries (Cisco, Arista, Fortinet, Commvault)
- DevOps & CI/CD Pipeline Shapes
**Business & General Purpose**:
- Wireframe Components
- Avatars & People Icons
- Form Elements
- Bioicons (Life Sciences)
- Genogram Symbols
- Templates & Building Blocks
**How to Use Custom Libraries**:
When generating diagrams that would benefit from specific icons, Agents can note which libraries to enable:
```
To use this diagram optimally, open it with these custom libraries:
https://app.diagrams.net/?clibs=Uhttps://jgraph.github.io/drawio-libs/libs/templates.xml
```
## XML Format for MCP
**For MCP tools, output only mxGraphModel (not full mxfile):**
```xml
<mxGraphModel>
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<!-- shapes here -->
</root>
</mxGraphModel>
```
**For standalone files, use full mxfile wrapper:**
```xml
<mxfile host="app.diagrams.net">
<diagram id="diagram-1" name="Page-1">
<mxGraphModel dx="1434" dy="759" grid="1" gridSize="10">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<!-- shapes here -->
</root>
</mxGraphModel>
</diagram>
</mxfile>
```
## Core Concepts
### 1. Cells (mxCell)
Everything in draw.io is a cell - shapes, connectors, containers, and even the root elements.
**Basic Shape Cell:**
```xml
<mxCell id="2" value="Process Step" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="100" y="100" width="120" height="60" as="geometry"/>
</mxCell>
```
**Connector Cell:**
```xml
<mxCell id="3" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="2" target="4">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
```
### 2. ID Management
- Each cell must have a unique ID
- Use sequential integers: "2", "3", "4", etc.
- IDs "0" and "1" are reserved for the root cells
- When referencing shapes in connectors, use the same IDs
### 3. Geometry (mxGeometry)
- `x`, `y`: Position (top-left corner)
- `width`, `height`: Dimensions
- `relative="1"`: For connectors (relative positioning)
### 4. Styling
Styles are semicolon-separated key-value pairs:
- **Shape type**: `rounded=1`, `ellipse`, `rhombus`
- **Colors**: `fillColor=#dae8fc`, `strokeColor=#6c8ebf`, `fontColor=#000000`
- **Text**: `fontSize=12`, `fontStyle=1` (bold=1, italic=2, underline=4)
- **Alignment**: `align=center`, `verticalAlign=middle`
- **Spacing**: `spacingLeft=10`, `spacingTop=5`
## PMP/PMBOK Specific Shapes & Styles
### Work Breakdown Structure (WBS)
WBS uses hierarchical tree structure with boxes connected by lines.
**WBS Package Box:**
```
shape=rectangle;rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;fontStyle=1;fontSize=10;
```
**WBS Levels:**
- Level 0 (Project): Large box, 200x80, bold, dark green
- Level 1 (Deliverables): Medium box, 160x60, medium green
- Level 2 (Sub-deliverables): Small box, 140x50, light green
- Level 3 (Work Packages): Smallest box, 120x40, lightest green
### Project Network Diagram (PERT/CPM)
**Activity Node (AON - Activity on Node):**
```
shape=rectangle;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;fontStyle=0;
```
**Node Structure** (divided into sections):
```
┌─────────────────┐
│ Early Start ES │ Duration
├─────────────────┤
│ Activity Name │
├─────────────────┤
│ Late Start LS │ Late Finish LF
└─────────────────┘
```
**Critical Path Highlighting:**
```
fillColor=#f8cecc;strokeColor=#b85450;strokeWidth=3;
```
### RACI Matrix
**Matrix Container:**
```
swimlane;html=1;startSize=40;fillColor=#f5f5f5;strokeColor=#666666;fontStyle=1;
```
**RACI Cells:**
- R (Responsible): `fillColor=#d5e8d4;strokeColor=#82b366;`
- A (Accountable): `fillColor=#dae8fc;strokeColor=#6c8ebf;`
- C (Consulted): `fillColor=#fff2cc;strokeColor=#d6b656;`
- I (Informed): `fillColor=#e1d5e7;strokeColor=#9673a6;`
### Gantt Chart Elements
**Timeline Bar:**
```
rounded=0;whiteSpace=wrap;html=1;fillColor=#60a917;strokeColor=#2D7600;fontColor=#ffffff;
```
**Milestone Diamond:**
```
rhombus;whiteSpace=wrap;html=1;fillColor=#fa6800;strokeColor=#C73500;fontColor=#000000;
```
**Dependency Arrow:**
```
edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;endArrow=block;endFill=1;strokeWidth=2;
```
### Risk Matrix (Probability-Impact Grid)
**Risk Matrix Structure:**
```
5x5 grid with:
- X-axis: Impact (Very Low, Low, Medium, High, Very High)
- Y-axis: Probability (Very Low, Low, Medium, High, Very High)
```
**Risk Level Colors:**
- **Low Risk**: `fillColor=#d5e8d4;strokeColor=#82b366;` (Green)
- **Medium Risk**: `fillColor=#fff2cc;strokeColor=#d6b656;` (Yellow)
- **High Risk**: `fillColor=#ffe6cc;strokeColor=#d79b00;` (Orange)
- **Critical Risk**: `fillColor=#f8cecc;strokeColor=#b85450;` (Red)
### Stakeholder Power-Interest Grid
**Quadrant Structure:**
```
┌─────────────────┬─────────────────┐
│ Manage │ Partner │
│ Closely Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.