Will-hxw GitHub avatar

drawio-diagram-builder-skill

Will-hxw

一个可移植的智能体技能,使基于 LLM 的编程助手能够通过迭代截图反馈循环,从论文、代码库、截图和视觉参考中生成可发表的、可编辑的 draw.io 图表。

Stars

225

7 天增长

暂无数据

Fork 数

8

开放 Issue

0

开源协议

MIT

最近更新

2026-07-02

AI 仓库情报摘要
FR-AI / ANALYSIS

为什么值得关注

它通过强制使用本地预览、截图审查和缺陷日志的可重复工作流程,解决了 LLM 生成的 draw.io XML 常见问题(文本溢出、箭头错误、图标缺失),并提供了捆绑的图标资源和验证脚本。

适合谁使用

  • 需要将论文图表重建为可编辑对象的研究人员
  • 绘制流水线和架构图的机器学习工程师
  • 使用编码智能体(Claude Code, Codex)进行绘图的开发者
  • 从多种输入创建出版风格图表的技术写作人员

典型使用场景

  • 将科学论文图表重建为可编辑的 draw.io 对象
  • 将代码库结构转换为架构图或数据流图
  • 根据研究论文设计包含阶段、模型和数据集的机器学习流水线
  • 将文本要求与多个样式参考组合成一个连贯的图表

项目优势

  • 迭代优化:通过 embed.diagrams.net 本地预览、截图并自我审查可见和语义缺陷
  • 捆绑了 MIT 许可的 Tabler SVG 图标库,用于常见研究符号
  • 验证脚本检查 XML 结构、重复 ID、缺失引用、过大负载和复制工件
  • 通过使用短本地预览 URL 而非巨大的编码 draw.io 链接,避免 Windows 长 URL 崩溃问题

使用前须知

  • 需要浏览器自动化(Playwright, Puppeteer 等)进行视觉验证;否则仅生成原始 XML
  • 高保真复制需要多次截图反馈循环,不能一次完美
  • 捆绑的 SVG 图标未分解为 draw.io 基本单元;完全的对象级可编辑性需要原始配方

README 快速开始

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

项目描述

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

相关仓库与替代方案

根据分类、Topic 和编程语言匹配的相似项目。

lopopolo
精选
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 与机器学习AI 智能体
2,390
slvDev
精选
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 与机器学习大语言模型
1,960
littledivy
精选
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 与机器学习
1,482