Skip to content
Development
Skill

/diagram

Generate advanced .drawio diagrams (ERD, UML class/sequence, C4 model, ML/DL, mindmap/gantt/timeline via Mermaid, complex architecture) — including from existing code (Python/JS/Go/Rust), IaC (Terraform/Kubernetes/docker-compose, or live running infra), SQL DDL, or OpenAPI

From plugin
agentic-awesome-kits
932 skills
Install
$ npx -y skills add KhaiTrang1995/agentic-awesome-kits --skill diagram --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/diagram

Context preview

The summary Claude sees to decide when to auto-load this skill.

Generate advanced .drawio diagrams (ERD, UML class/sequence, C4 model, ML/DL, mindmap/gantt/timeline via Mermaid, complex architecture) — including from existing code (Python/JS/Go/Rust), IaC (Terraform/Kubernetes/docker-compose, or live running infra), SQL DDL, or OpenAPI

SKILL.md

diagram.SKILL.md
name: diagram
description: Generate advanced .drawio diagrams (ERD, UML class/sequence, C4 model, ML/DL, mindmap/gantt/timeline via Mermaid, complex architecture) — including from existing code (Python/JS/Go/Rust), IaC (Terraform/Kubernetes/docker-compose, or live running infra), SQL DDL, or OpenAPI specs. Includes shape search across 10,000+ standard icons (AWS/Azure/GCP/Cisco/K8s/UML/BPMN), style presets, and PNG/SVG/PDF/JPG export via draw.io desktop CLI with vision self-check. Use when `/architecture` or `/flowchart` (hand-authored XML, no CLI dependency) is not enough — need high accuracy, vendor-specific icons, auto-layout for large diagrams, import from real code/infra, or image export.
allowed-tools: Read, Write, Edit, Bash, Glob, Grep
user-invocable: true
argument-hint: "<diagram description> [--type erd|uml|sequence|c4|architecture|ml|flowchart|mermaid] [--from-code <path>] [--from-sql <file>] [--from-iac <path>] [--style <preset>] [--export png|svg|pdf|jpg]"

/diagram — Full-power draw.io diagrams (drawio-skill integration)

Origin & license

This skill packages most of the capability of [drawio-skill](https://github.com/Agents365-ai/drawio-skill) (MIT License © Agents365-ai) — 28 Python scripts, shape search across 10,000+ icons, style-preset system, vision self-check workflow. The kit-root `scripts/`, `references/`, `styles/`, and `data/` trees are near-verbatim copies of upstream — **do NOT modify script internals**; invoke them via Bash only. Original license is preserved in `LICENSE-drawio-skill`.

**Differences from upstream behavior** (to match TechSphereX AI house conventions):

  • Communication language: English (match project / user language if they write in another language).
  • Approval: use this kit’s `approval-gate.md` (L1/L2/L3) instead of upstream’s free-form review loop — essentially equivalent (L3 ≈ upstream self-check + review loop, L1 ≈ “Plan” before writing files, L2 ≈ diff when editing an existing `.drawio`).
  • Default style: **TechSphereX AI palette** (`drawio-conventions.md`) — NOT the upstream `default` preset — unless the user names another preset or has set a personal default.
  • Output path: `docs/diagrams/{feature}/{diagram-type}-{slug}.drawio` (per `drawio-conventions.md` section 7), not the current working directory.
  • **No automatic image export** — default is write `.drawio` only (per “do NOT export static images unless the user explicitly asks” in `drawio-conventions.md`). Export a temporary PNG draft only when vision self-check is needed for a complex diagram, and always tell the user it is temporary.

When to use `/diagram` instead of `/architecture` / `/flowchart`

| Need | Use which skill | |---|---| | Simple architecture/flowchart, no image export, no draw.io CLI dependency | `/architecture`, `/flowchart` | | ERD from SQL DDL, sequence diagram, C4 model, UML class diagram | `/diagram --type erd\|sequence\|c4\|uml` | | Reconstruct structure of a codebase (Python/JS/Go/Rust) or IaC / live running infra | `/diagram --from-code` / `--from-iac` | | Vendor-specific icons (real AWS Lambda, real K8s pod, …) instead of generic rectangles | `/diagram` (use `shapesearch.py`) | | Diagrams > 15 nodes needing auto-layout instead of hand-placed coordinates | `/diagram` (`autolayout.py` or CLI `--layout` ELK) | | Export PNG/SVG/PDF, vision self-check before delivery | `/diagram` | | Learn/apply a custom style (colors, fonts, shapes) from an existing file/image | `/diagram` (Learn flow — see `references/style-presets.md`) |

Prerequisites (confirm on this machine)

  • **draw.io desktop CLI:** installed, **v30.2.6** at `C:\Program Files\draw.io\draw.io.exe` — supports Mermaid→`.drawio` conversion and `--layout` ELK (both require v30+).
  • **Graphviz (`dot`):** may be missing — `scripts/autolayout.py` needs Graphviz for layout. If missing, use CLI `--layout` ELK instead (see `references/autolayout.md`), or tell the user to install `graphviz` if they want `autolayout.py` specifically.
  • Always resolve the real binary path before export commands — on this machine use `"C:\Program Files\draw.io\draw.io.exe"` (NOT bare `drawio`, which may not be on PATH).

Input examples

/diagram microservices architecture: API Gateway, Auth/Order/Payment service, Kafka, Postgres, Redis
/diagram --type erd @schema.sql
/diagram --type sequence OAuth login flow: Client, Auth Server, Resource Server
/diagram --type c4 TOPO system (Context → Container → Component)
/diagram --from-code ./src --lang python --group          # import graph diagram
/diagram --from-iac ./infra --lang terraform               # architecture from Terraform, real cloud icons
/diagram redraw existing container architecture with style "corporate"
/diagram learn style from @docs/diagrams/container/architecture-overview.drawio name it "TechSphereX AI-brand"
/diagram export docs/diagrams/topo/architecture-overview.drawio to PNG

Workflow

Step 0 — Resolve style preset

Per `references/style-presets.md`: 1. Scan the user request for an explicit preset name (“use style X”, “in the X look”). The phrase `with X` does not count if X is a component name, not a style. 2. If none → check whether the user has set any preset `"default": true` (stored under `~/.drawio-skill/styles/` per upstream design, or an equivalent project directory if there is no shared home). 3. If none → **default to the TechSphereX AI palette** (`drawio-conventions.md` sections 2–6). Do NOT use drawio-skill’s built-in `default.json` unless the user explicitly passes `--style default`. 4. Valid preset → load from `styles/built-in/<name>.json` (built-ins: `default`, `corporate`, `handdrawn`, `colorblind-safe`, `dark`) or a user-saved file. Unknown preset name → report error, list available presets, do NOT silently fall back.

Step 1 — Determine diagram type & clarify requirements

If important information is missing, ask at most 1–3 questions:

  • **Diagram type** — see `references/diagram-types.md` to map the user’s
Read more
Ships withagentic-awesome-kits

Reusable AI Skill Kits for coding agents (Claude Code and any other subagent/slash-command-compatible tool).

Get the whole plugin
Stats
9
Stars
3
Forks
Maintained
Maintenance
Python
Language
1mo ago
Last commit
2mo ago
Created

Repo: KhaiTrang1995/agentic-awesome-kits

Other skills on agentic-awesome-kits.