drawio skills for cc,codex
npx skills add https://github.com/bahayonghang/drawio-skills --skill drawio使用 CLI 安装这个技能,并在你的工作区中直接复用对应的 SKILL.md 工作流。
Important: Draw.io Skill 2.2.0 is a desktop-first hybrid workflow. The default path is local generation through
YAML/CLI -> .drawio + sidecars, optionally enhanced by draw.io Desktop for PNG/PDF/JPG and embedded SVG export. The next-ai-draw-io MCP server (@next-ai-drawio/mcp-server) is now an optional live-editing layer, not a hard dependency.
English | 中文文档 | Documentation
Draw.io Skill is a YAML-first, offline-first draw.io skill for engineering diagrams, academic figures, network diagrams, and structured redraws. It accepts natural language, YAML, Mermaid, CSV, and imported .drawio files, then normalizes everything into a consistent design-system-backed workflow.
.drawio, .spec.yaml, and .arch.json aligned for repeatable local editing..drawio.svg when available.create, edit, and replicate.tech-blue, academic, academic-color, nature, dark, high-contrast.architecture, roadmap, or workflow before layout and export.router, switch, firewall, server, load_balancer, subnet, internet, ap), Phase B star/mesh layout improvements, and automatic link labels from interface/IP/VLAN/bandwidth metadata.aws.alb, aws.ec2, cisco.ap), and vendor/device auto-mapping via network.vendor + network.device..drawio into a YAML-first bundle with --input-format drawio --export-spec.Use the skill in this order unless the user explicitly wants live browser editing:
.drawio locally and keep sidecars in sync.npx skills add bahayonghang/drawio-skills
Restart your client after installation so it reloads the skill.
skills/drawio into your client's skill directory.Common locations:
~/Library/Application Support/Claude/skills/~/.config/Claude/skills/%APPDATA%\Claude\skills\~/Library/Application Support/gemini/skills/~/.gemini/skills/%APPDATA%\gemini\skills\~/.codex/skills/%USERPROFILE%\.codex\skills\Normal create/edit/export work does not require MCP. Configure @next-ai-drawio/mcp-server only if you want browser sessions.
macOS / Linux:
{
"mcpServers": {
"drawio": {
"command": "npx",
"args": ["--yes", "@next-ai-drawio/mcp-server@latest"]
}
}
}
Windows:
{
"mcpServers": {
"drawio": {
"type": "stdio",
"command": "cmd",
"args": ["/c", "npx", "--yes", "@next-ai-drawio/mcp-server@latest"]
}
}
}
config.tomlmacOS / Linux:
[mcp_servers.drawio]
command = "npx"
args = ["--yes", "@next-ai-drawio/mcp-server@latest"]
Windows:
[mcp_servers.drawio]
type = "stdio"
command = "cmd"
args = ["/c", "npx", "--yes", "@next-ai-drawio/mcp-server@latest"]
Create a new diagram:
/drawio create a horizontal tech-blue login flow with 6 nodes
Create a network topology with structured metadata:
/drawio create a tech-blue network topology with a firewall, core switch, two app servers, and a private database subnet. Label interfaces and VLANs on the links.
Replicate an uploaded image:
/drawio replicate
Color mode: preserve-original
[upload screenshot]
Import an existing .drawio file into the offline bundle:
node skills/drawio/scripts/cli.js existing.drawio --input-format drawio --export-spec --write-sidecars
Render and validate a bundle:
node skills/drawio/scripts/cli.js input.yaml output.drawio --validate --write-sidecars
node skills/drawio/scripts/cli.js input.yaml output.svg --validate --write-sidecars
Academic-paper bundle flow:
node skills/drawio/scripts/cli.js skills/drawio/references/examples/system-architecture-paper.yaml academic-system.svg --validate --write-sidecars --strict-warnings
This produces the paper-mode default deliverables together: .drawio, .spec.yaml, .arch.json, and .svg.
Use strict mode for review-grade output:
node skills/drawio/scripts/cli.js input.yaml output.svg --validate --write-sidecars --strict-warnings
Use draw.io Desktop when you need raster or PDF export:
node skills/drawio/scripts/cli.js input.yaml output.pdf --validate --use-desktop
node skills/drawio/scripts/cli.js input.yaml output.png --validate --use-desktop
When the diagram will continue evolving, keep these files together:
<name>.drawio<name>.spec.yaml<name>.arch.jsonThis is the preferred edit surface for the offline workflow.
For academic-paper requests, treat this editable bundle plus .svg as the default delivery set. Add .png only for thesis, A4, Word, raster-first, screenshot rebuild, or explicit PNG requests when draw.io Desktop export is available.
The current network-topology workflow supports:
router, switch, firewall, server, load_balancer, subnet, internet, and apsrcInterface, dstInterface, ip, vlan, bandwidth, and linkTypehierarchical, star, and meshicon fields or network.vendor + network.deviceRepresentative specs now ship in skills/drawio/references/examples/:
campus-lan-topology.yamlaws-vpc-topology.yamlonprem-dmz-topology.yamlvendor-device-mapping.yamlsystem-architecture-paper.yamlresearch-pipeline.yamltechnical-roadmap-paper.yamlRender one directly:
node skills/drawio/scripts/cli.js skills/drawio/references/examples/vendor-device-mapping.yaml output.drawio --validate --write-sidecars
npm install
npm test
npm run docs:build
Repository layout:
skills/drawio/: skill, CLI, references, themes, examplesdocs/: VitePress sitetests/: repo-level integration testsThis skill builds on top of next-ai-draw-io, but wraps it in a YAML-first workflow with offline sidecars, design-system references, and route-specific guidance.
The official @drawio/mcp server is intentionally not the default integration surface for this repository because its tool model does not match the offline-first edit/replicate workflow.
This repository currently declares ISC in package.json.
The optional upstream next-ai-draw-io MCP server is licensed under Apache-2.0: