/SKILL.md
Create, edit, export, and review draw.io diagrams. Use for native .drawio XML generation, PNG/SVG/PDF export, SVG overlap, border-overlap, label-intrusion, label-rect, short-terminal, text-contrast, text-emphasis, and text-overflow linting, layout adjustment, and AWS icon usage.
npx skillsauth add sunwood-ai-labs/draw-io-skill draw-ioInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill when an agent needs to:
.drawio XML.drawio filepng, svg, pdf, or jpgThis skill intentionally combines:
The repository layout and bundled workflow pieces are summarized in the diagram below.

The repository also ships:
assets/draw-io-skill-structure.drawio*assets/draw-io-skill-structure-icons.drawio* plus a Japanese-localized companion under assets/draw-io-skill-structure-icons.ja.drawio*assets/draw-io-skill-structure-shapes.drawio with exports at assets/draw-io-skill-structure-shapes.drawio.png and assets/draw-io-skill-structure-shapes.drawio.svgassets/draw-io-skill-structure.ja.drawio*docs/guide/showcase.md and docs/ja/guide/showcase.mdfixtures/basic, fixtures/border-overlap, fixtures/large-frame-border-overlap, fixtures/shape-border-overlap, fixtures/label-rect-overlap, fixtures/text-cell-overflow, fixtures/text-contrast, fixtures/text-emphasis, and fixtures/shape-text-overflowWhen working inside this repository, these are the main maintenance commands:
npm install
npm run check
npm run verify
npm ci
npm run docs:build
npm run docs:dev
uv run python -m py_compile scripts/find_aws_icon.py
Use them this way:
npm run check: script syntax plus fixture-based lint verificationnpm run verify: full repository signoff, including docs buildnpm run docs:build: one-shot docs buildnpm run docs:dev: interactive docs previewIf you need to attach the repo as a skill in a local assistant environment, the repository docs use these conventions:
C:\Users\YOUR_NAME\.codex\skills\draw-io -> D:\Prj\draw-io-skill~/.claude/skills/drawioThe repository uses three QA layers:
That keeps the technical tooling and the user-facing docs aligned in CI.
Follow this order unless the user asks for something narrower:
.drawio file first..drawio as the editable source of truth for repository work..drawio.png, .drawio.svg, .drawio.pdf, or .drawio.jpg.*.drawio.svg if possible, run the lint script, and explicitly report any reduced coverage such as parsed 0 edges; then run a manual or scripted geometry sanity check for arrows, labels, and box intrusions before surfacing the image.If the user only asks for a diagram and does not request a format, stop at the .drawio file.
.drawio files directly..drawio.png, .drawio.svg, or .drawio.pdf files.Examples:
login-flow.drawiologin-flow.drawio.pnger-diagram.drawio.svgarchitecture-overview.drawio.pdf| Format | Embedded XML | Recommended use |
|--------|--------------|-----------------|
| .drawio | n/a | Editable source diagram |
| png | Yes | Docs, slides, chat attachments |
| svg | Yes | Docs, scalable output, lint input |
| pdf | Yes | Review and print |
| jpg | No | Last-resort lossy export |
For repository workflows, prefer:
.drawio while editing.drawio.svg when running lint.drawio.png or .drawio.svg for documentation embedsUse the bundled helper first:
node scripts/export-drawio.mjs architecture.drawio --format png --open
node scripts/export-drawio.mjs architecture.drawio --format svg
node scripts/export-drawio.mjs architecture.drawio --output architecture.drawio.pdf
What it does:
png, svg, and pdf--drawio <path> when automatic CLI discovery fails--delete-source when the user explicitly wants only the embedded exportIf draw.io CLI discovery fails, rerun with an explicit executable path:
node scripts/export-drawio.mjs architecture.drawio --drawio "C:\\Program Files\\draw.io\\draw.io.exe" --format svg
On macOS or Linux, point --drawio at the installed executable for that environment.
If needed, call draw.io directly:
drawio -x -f png -e -s 2 -t -b 10 -o architecture.drawio.png architecture.drawio
drawio -x -f svg -e -b 10 -o architecture.drawio.svg architecture.drawio
drawio -x -f pdf -e -b 10 -o architecture.drawio.pdf architecture.drawio
drawio -x -f jpg -b 10 -o architecture.drawio.jpg architecture.drawio
Key flags:
-x: export mode-f: output format-e: embed diagram XML in png/svg/pdf-o: output file path-b: border width-t: transparent background for PNG-s: scale factor-a: all pages for PDF-p: page index (1-based)For existing shell workflows, the original helper remains available:
bash scripts/convert-drawio-to-png.sh architecture.drawio
Linting is a required preflight before presenting a diagram to the user or embedding it in docs/articles. Do not wait for the user to ask whether lint was run.
After exporting SVG, run the bundled lint:
node scripts/check-drawio-svg-overlaps.mjs architecture.drawio.svg
node scripts/check-drawio-svg-overlaps.mjs fixtures/border-overlap/border-overlap.drawio.svg
node scripts/check-drawio-svg-overlaps.mjs fixtures/large-frame-border-overlap/large-frame-border-overlap.drawio.svg
node scripts/check-drawio-svg-overlaps.mjs fixtures/shape-border-overlap/shape-border-overlap.drawio.svg
node scripts/check-drawio-svg-overlaps.mjs fixtures/label-rect-overlap/label-rect-overlap.drawio
node scripts/check-drawio-svg-overlaps.mjs fixtures/text-cell-overflow/text-cell-overflow.drawio
node scripts/check-drawio-svg-overlaps.mjs fixtures/text-contrast/text-contrast.drawio
node scripts/check-drawio-svg-overlaps.mjs fixtures/text-emphasis/text-emphasis.drawio
The lint script currently checks:
edge-edge: edge crossings and collinear overlapsedge-rect-border: lines that run along or visibly overlap a box or large frame borderedge-shape-border: lines that run along supported non-rect shape borders such as document, hexagon, parallelogram, and trapezoidedge-rect: lines penetrating boxesedge-terminal: final arrow runs that are too short after the last bendedge-label: routed lines crossing label text boxeslabel-rect: label text boxes colliding with another box or cardrect-shape-border: box or frame borders that run along those supported non-rect shape borderstext-contrast: text whose font color is too close to its fill color for the current font sizetext-emphasis: compact dark cards whose title/body copy is still flattened into a single dense text blocktext-overflow(width): text likely too wide for its boxtext-overflow(height): text likely too tall for its boxNotes:
.drawio or .drawio.svg.drawio, the checker also reads the companion draw.io geometry so label-rect and text-fit checks stay aligned with the editable source.drawio, a companion same-name.drawio.svg is expected for routed-edge checks; if it is missing, export it first instead of treating the failure as non-actionableparsed 0 edges, the SVG did not provide usable edge geometry; report that limitation and supplement with visual inspection or a small coordinate/geometry check for arrow-label overlap, arrow-box intrusion, and text overflowtext-contrast currently requires explicit hex fillColor and fontColoredge-terminal, edge-label, label-rect, and text-emphasis are heuristic checks intended to catch the common "tiny arrowhead tail", "line through label", "note card covering a label", and "dark card text visually blending together" draw.io failures seen in repository diagramsWhen investigating findings:
edge-rect-border, edge-shape-border, or rect-shape-border is intentional, keep the routing obvious, visually review the output, and document the exception in the surrounding workflowedge-terminal fires, add a longer straight segment before the arrowhead or move the last bend farther away from the targetedge-label fires, reroute the edge or move the label so the text keeps clean breathing roomlabel-rect fires, move the note/card/box or shift the label so they no longer partially overlaptext-contrast fires, increase foreground/background contrast instead of relying on opacity, texture, or stroketext-emphasis fires, split the title from the body with a chip, separate text cell, stronger hierarchy, or more breathing roomtext-overflow looks like a false positive, first try widening the box, shortening the label, adding an intentional line break, or setting explicit fontsEvery diagram must use native mxGraphModel XML:
<mxGraphModel>
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
</root>
</mxGraphModel>
All normal diagram cells should live under parent="1" unless you intentionally use container parents.
Every edge cell must contain geometry:
<mxCell id="e1" edge="1" parent="1" source="a" target="b" style="edgeStyle=orthogonalEdgeStyle;">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
Never use self-closing edge cells.
For diagrams with Japanese text or slide usage, set the font family explicitly:
<mxGraphModel defaultFontFamily="Noto Sans JP" ...>
Also set fontFamily in text styles:
style="text;html=1;fontSize=18;fontFamily=Noto Sans JP;"
edgeStyle=orthogonalEdgeStyle for most technical diagramsExample with waypoints:
<mxCell id="e1" style="edgeStyle=orthogonalEdgeStyle;rounded=1;jettySize=auto;" edge="1" parent="1" source="a" target="b">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="300" y="150"/>
<mxPoint x="300" y="250"/>
</Array>
</mxGeometry>
</mxCell>
Do not fake containment by simply placing boxes on top of bigger boxes.
parent="containerId" for child elementsswimlane when the container needs a visible title bargroup;pointerEvents=0; for invisible containerscontainer=1;pointerEvents=0; when using a custom shape as a containerAllow roughly 30 to 40px per Japanese character.
<mxGeometry x="140" y="60" width="400" height="40" />
If text is mixed Japanese and English, err on the wider side.
<br> for intentional two-line labelsWhen appropriate, include title, description, last updated, author, or version.
Split complex systems into multiple diagrams when one canvas becomes dense:
When working on AWS diagrams:
mxgraph.aws4.* icon referencesSearch icons with:
uv run python scripts/find_aws_icon.py ec2
uv run python scripts/find_aws_icon.py lambda
.drawio file.drawio.<format> when exported<mxGeometry relative="1" as="geometry"/>edge-terminal findings remain unless a tiny terminal run is intentionally acceptededge-label or label-rect findings remainedge-rect-border findings remain unless a box or frame border overlap is intentionally acceptededge-shape-border or rect-shape-border findings remain unless a supported non-rect border contact is intentionally acceptedtext-contrast findings remaintext-emphasis findings remain on compact dark cards unless the treatment is intentionally accepted after visual reviewtext-overflow(width) or text-overflow(height) findings remainFor repo-facing documentation and onboarding:
Docs-specific repo note:
/draw-io-skill/This local version is intentionally a blended skill:
softaworks/agent-toolkitjgraph/drawio-mcpReferenced repositories and sources:
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.
development
Run, watch, debug, and extend OpenClaw QA testing with qa-lab and qa-channel. Use when Codex needs to execute the repo-backed QA suite, inspect live QA artifacts, debug failing scenarios, add new QA scenarios, or explain the OpenClaw QA workflow. Prefer the live OpenAI lane with regular openai/gpt-5.4 in fast mode; do not use gpt-5.4-pro or gpt-5.4-mini unless the user explicitly overrides that policy.
development
End-to-end Parallels smoke, upgrade, and rerun workflow for OpenClaw across macOS, Windows, and Linux guests. Use when Codex needs to run, rerun, debug, or interpret VM-based install, onboarding, gateway smoke tests, latest-release-to-main upgrade checks, fresh snapshot retests, or optional Discord roundtrip verification under Parallels.