Will-hxw GitHub avatar

drawio-diagram-builder-skill

Will-hxw

A portable agent skill that enables LLM-powered coding agents to produce publication-quality, editable draw.io diagrams from papers, codebases, screenshots, and visual references through an iterative screenshot-feedback loop.

Stars

225

7-day growth

No data

Forks

8

Open issues

0

License

MIT

Last updated

2026-07-02

AI repository intelligence
FR-AI / ANALYSIS

Why it is worth attention

It addresses common failures of LLM-generated draw.io XML (text overflow, wrong arrows, missing icons) by enforcing a repeatable workflow with local preview, screenshot review, and defect logging — plus bundled icon assets and validation scripts.

Who it is for

  • Researchers needing to recreate paper figures as editable objects
  • ML engineers drawing pipeline and architecture diagrams
  • Developers using coding agents (Claude Code, Codex) for diagramming
  • Technical writers creating publication-style figures from mixed inputs

Use cases

  • Recreate a scientific paper figure as editable draw.io objects
  • Convert a repository structure into an architecture or data-flow diagram
  • Design an ML pipeline with stages, models, and datasets from a research paper
  • Combine text requirements and multiple style references into one coherent diagram

Strengths

  • Iterative refinement: previews locally via embed.diagrams.net, screenshots, and self-reviews visible/semantic defects
  • Bundled MIT-licensed Tabler SVG icon inventory for common research-figure symbols
  • Validation scripts check XML structure, duplicate IDs, missing references, oversized payloads, and replication artifacts
  • Avoids Windows long-URL crash by using short local preview URLs instead of giant encoded draw.io links

Considerations

  • Requires browser automation (Playwright, Puppeteer, etc.) for visual verification; without it only raw XML is produced
  • High-fidelity reproduction takes multiple screenshot-feedback passes — not one-shot perfect
  • Bundled SVG icons are not decomposed into draw.io primitive cells; full object-level editability requires primitive recipes

README quick start

Research Draw.io Diagram Skill

A portable agent skill for producing publication-style, editable diagrams.net / draw.io figures from papers, prompts, codebases, project context, screenshots, and one or more visual references.

npx skills add Will-hxw/drawio-diagram-builder-skill

中文版

Quick Install With An Agent

Copy this prompt into Codex, Claude Code, or another local coding agent:

Install and test the drawio-diagram-builder skill from:
https://github.com/Will-hxw/drawio-diagram-builder-skill

After installing, run its smoke test and tell me the exact skill path.

After installation, ask the agent to run the bundled update check against its installed skill path:

python \scripts\check_skill_update.py

Prerequisites

RequirementWhy
Python 3 (3.7+)Preview and validation scripts
Browser automation (Playwright MCP, Puppeteer, browser tools, etc.)Screenshot feedback loop — the skill is evidence-driven
Internet accessPreview loads https://embed.diagrams.net/

Without browser automation the agent can still generate .drawio XML, but cannot visually verify the result. The iterative refinement loop is the skill's main value.

Why This Exists

LLMs can write draw.io XML, but the first result is usually not right:

  • text overlaps or escapes boxes
  • arrows route incorrectly
  • loop arrows look wrong
  • icons are missing or inconsistent
  • reference figures get embedded as images instead of redrawn as editable objects
  • large diagrams crash on Windows with long-URL failures

This skill gives the agent a repeatable workflow: synthesize the user's text and image inputs into a diagram brief → create editable XML → preview through a local URL (not a giant encoded one) → screenshot → self-review visible and semantic defects → fix → repeat → validate.

For reference-image replication, the skill now enforces a stricter protocol: the agent must write a visual spec, coordinate layout grid, asset ledger, and defect log before drawing. Final handoff must include a screenshot-reviewed defect log, not just valid XML.

For prompt, paper, codebase, or mixed-input diagrams, the skill now also requires a self-supervision protocol: classify each input as content, structure, style, layout, or asset evidence; define connector semantics before drawing arro

Description

Portable agent skill for research-style editable draw.io diagrams and screenshot-driven refinement

Related repositories

Similar projects matched by category, topics, and programming language.

lopopolo
Featured
lopopolo GitHub avatar

harness-engineering

Harness Engineering is a methodology for improving coding agent outputs by carefully crafting the environment around them—providing curated context, tools, and executable constraints that encode an organization’s nonfunctional requirements and cumulative lessons.

AI & Machine LearningAI Agents
2,390
slvDev
Featured
slvDev GitHub avatar

esp32-ai

A 28.9 million parameter language model runs on an $8 ESP32-S3 microcontroller entirely on-device, generating simple stories at about 9.5 tokens per second.

AI & Machine LearningLarge Language Models
1,960
littledivy
Featured
littledivy GitHub avatar

mimic

mimic captures traffic from any iOS or web app and automatically generates a Python client library that lets you call the app's API like a regular library.

AI & Machine Learning
1,482