skills/beautiful-drawio/SKILL.md
Create high-quality draw.io diagrams with better layout for architecture diagrams, flowcharts, block diagrams, system maps, data flows, and complex connection-heavy visuals. Use when draw.io routing becomes messy, edges overlap, blocks cross too much, or the user wants cleaner diagram layout than the default drawio skill.
npx skillsauth add cyberelf/agent_skills beautiful-drawioInstall 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.
Create native .drawio diagrams with a layout-first workflow designed for dense block diagrams, architecture maps, and connection-heavy systems.
This skill exists because the baseline drawio workflow focuses on XML generation and export, while high-quality diagrams require an explicit layout pass before any mxGraph XML is written.
For complex diagrams, do not rely on natural-language layout instructions alone. The preferred path is now a typed JSON specification plus either an ELK-backed layout engine or a structured row/column packer, so the agent describes structure, hierarchy, and sibling order rather than hand-authoring absolute coordinates.
.drawio output but wants the visual quality closer to a Mermaid/ELK layout.drawio: write mxGraph XML directly, then adjust routing ad hoc.beautiful-drawio: design topology first, reduce crossings before placement, route edges by lane and hierarchy, then emit mxGraph XML.drawio: treats layout as a side effect of coordinates.beautiful-drawio: treats layout as a first-class design step.If the diagram has more than a handful of nodes or any nontrivial crossing pressure, use the structured pipeline:
product-block, technical-architecture, data-flow, or deployment.Load the JSON contract before creating the input.
Choose one primary layout model:
If the diagram mixes multiple models, pick one dominant topology and demote the others to annotations or secondary edges.
Before writing XML, normalize the content:
If the diagram still feels dense after reduction, split it into two pages or two diagrams instead of forcing everything onto one canvas.
For diagrams with any of the following:
First draft the topology in Mermaid using flowchart TD and layout: 'elk' only if it helps the agent reason about clusters or dependencies. Then convert that topology into the typed JSON contract for the ELK script.
Why:
Use Mermaid only as an internal planning step unless the user explicitly asks for Mermaid output too.
Use containers for every major boundary:
Rules:
Separate edges into classes and style them consistently:
Routing rules:
edgeStyle=orthogonalEdgeStyle.Load layout heuristics before drawing dense diagrams.
For structured requests:
.drawio file.Only skip the script for tiny diagrams where direct placement is obviously sufficient.
When writing .drawio XML:
<mxGeometry relative="1" as="geometry" /> for every edge.Run a fast checklist:
If the answer to the last question is yes, split the diagram.
.drawio XML, not Mermaid saved as text..drawio source with the draw.io CLI and keep the source if export is unavailable.When invoking skill resources, follow the standard skill pattern:
diagramType and sibling order instead of absolute x and y values.kind values such as primary, control, audit, or optional.layoutMode: "structured" when the hierarchy already defines the intended bands, rows, or columns..beautiful-drawio-input.json instead of leaving *.layout.json files in user-facing folders.Run the script by absolute path, not by assuming a repo-relative current directory.
Preferred pattern:
node "/absolute/path/to/.github/skills/beautiful-drawio/scripts/elk_layout_to_drawio.mjs" --input - --format drawio --output result.drawio
Example via stdin:
cat "$TMPDIR/.beautiful-drawio-input.json" | node "/absolute/path/to/.github/skills/beautiful-drawio/scripts/elk_layout_to_drawio.mjs" --input - --format json
Runtime note:
elkjs into an OS temp cache on first use.npm install in the skill folder.node with the resolved absolute script path.npx ./scripts/elk_layout_to_drawio.mjs ...; npx is for package resolution, not for invoking this local script path.json: optimized nodes and routed edge waypoints for further inspectiondrawio: complete native draw.io XML for one or more pagesid="0" and id="1".<mxGeometry relative="1" as="geometry" /> element.parent="containerId" for contained nodes..drawio file when no export format was requested.flowchart TD reasoning over LR reasoning for dense systems.tools
Agent-first graph-backed knowledge wiki builder with a self-contained CLI. Use for Graphwiki init/build/ingest/update, source indexing, semantic entity and relationship extraction, generated wiki pages, graph JSON/HTML explorer, evidence line ranges, query/explain question answering, synthesis pages, HTML reports, adding confirmed entity types, applying patches, cleanup, validation, tasks, and SQLite cache generation.
development
Use when the user asks to export a local HTML file, web page, or invitation page to a single-page PDF, a no-pagination PDF, a long PDF with auto-calculated height, or a PDF without headers and footers. Trigger on phrases like 单页 PDF, 不分页, 自动计算长度, 长图 PDF, 去掉页眉页脚, export HTML to single-page PDF, or print page to one PDF page.
development
Build and expand an insight-ready raw-material layer by discovering page-level sources, deduplicating them with an internal pre-crawl link index, capturing raw Markdown, verifying metadata in place, and keeping ingest/register state aligned. Use for additive source harvesting, raw webpage capture, source registry maintenance, source/ingest tracking, source/raw downloads, and in-place verification rather than final synthesis.
development
Generate a structured, illustrated Q&A HTML document from the current conversation. Scans the conversation for conceptual questions the user asked and Claude's answers, then produces a self-contained HTML file with styled cards and SVG diagrams for technical/architectural topics. If a Q&A HTML file already exists in the current project directory, appends the new Q&As to it instead of creating a new file. Trigger this skill whenever the user asks to "generate Q&A", "create Q&A from conversation", "save Q&A", "document our Q&A", "turn this chat into Q&A", or anything suggesting they want the conversation's questions and answers captured as a document — even if they don't use the exact phrase "Q&A skill".