next-ai-draw-io
БесплатноБез исполняемых скриптовНе проверенLets an AI agent draw and edit draw.io diagrams on a live browser canvas that the person can also edit by hand, with versions, undo and export to .drawio…
от TerminalSkills★ 221 звезда на GitHubОб этом скилле
Next AI Draw.io — draw and edit draw.io diagrams with an AI
Overview
Next AI Draw.io (Apache-2.0) comes in three forms: a web app (demo at next-ai-drawio.jiang.jp, or self-hosted) where you chat to draw, a desktop app for Windows, macOS and Linux, and an MCP server for coding agents. The MCP server is the one an agent uses. It is published on npm as @next-ai-drawio/mcp-server (install this scoped package, not the unscoped next-ai-draw-io one). It starts a local preview page with the real draw.io editor; the agent writes draw.io XML through tools, and the person watches the diagram appear, moves shapes, selects some and says "make these blue". The agent reads those hand edits back before changing the diagram again.
The agent uses its own model and its own file access, so the MCP server needs no API key. A model key is only needed for the web app and desktop app, which have their own chat.
Instructions
Install the MCP server
Claude Code:
claude mcp add --scope user drawio -- npx @next-ai-drawio/mcp-server@latest
Codex CLI:
codex mcp add drawio -- npx @next-ai-drawio/mcp-server@latest
Codex asks before every tool that changes the diagram, and codex exec without full access fails with "MCP tool call requires approval". To allow the drawio tools, add to ~/.codex/config.toml:
[mcp_servers.drawio]
command = "npx"
args = ["@next-ai-drawio/mcp-server@latest"]
default_tools_approval_mode = "approve"
Cursor (~/.cursor/mcp.json), Claude Desktop (claude_desktop_config.json), Cline and most others:
{
"mcpServers": {
"drawio": { "command": "npx", "args": ["@next-ai-drawio/mcp-server@latest"] }
}
}
VS Code uses .vscode/mcp.json with a servers key and "type": "stdio" in the entry. Restart the client; in Claude Code, /mcp lists drawio when it is connected.
The tools
Sixteen tools, confirmed from the 0.4.11 package:
start_sessionopens the preview and returns the drawing rules and a URL such ashttp://localhost:6002/shell/?mcp=mcp-.... Optionalsession_idcontinues a saved diagram. Always call it first; "No active session" means it was skipped.create_new_diagramtakesxml(themxCellelements of one page, a bare<mxGraphModel>, or a full<mxfile>) and replaces the whole document. The previous state stays in version history.edit_diagramtakesoperations, each{operation: "add" | "update" | "delete", cell_id, new_xml}, applied all or nothing. It is rejected, with the current XML, if the person edited in the browser since the agent last looked.get_diagramreturns the current XML including hand edits;get_selectionreturns the shapes the person selected.get_shape_library(for exampleaws4) returns icon style names; call it before using AWS, Azure, GCP, Kubernetes or Cisco icons.get_drawing_guiderepeats the drawing rules.screenshot_diagram(orscreenshot: trueon a create or edit) returns a PNG so the agent can check for overlaps.export_diagramtakes an absolutepath; the extension picks the format:.drawio,.png,.svgor.drawio.svg(an image that draw.io can open again).transparent: trueremoves the PNG's white background.load_diagramopens an existing.drawioor.drawio.svgbypathor rawxml. To change a file, load it, edit, then export to the same path; never hand-edit the XML file.list_saved_diagrams,restore_version,list_pages,add_page,rename_page,delete_pagecover history and multi-page diagrams.
The preview needs a browser tab open on the URL; screenshots and PNG/SVG export are rendered by that tab, so keep it visible.
What the agent sends
create_new_diagram accepts only the mxCell elements of one page; the server wraps them in the file structure and adds the two root cells. Cells are siblings (never nested), ids are unique per page and start at "2", parent is used only for shapes inside a container, and XML comments are not allowed. A style used by several cells is defined once with <mxStyle name="..." value="..."/> before the cells. A minimal two-box flow looks like this:
<mxCell id="2" value="API" style="rounded=1;" x="40" y="40" w="120" h="60"/>
<mxCell id="3" value="Postgres" style="shape=cylinder3;" x="240" y="40" w="100" h="80"/>
<mxCell id="4" value="reads and writes" style="endArrow=classic;" edge="1" source="2" target="3"/>
edit_diagram then changes single cells by id, for example {"operations": [{"operation": "delete", "cell_id": "4"}]}. A drawing that uses real cloud icons should fetch the library first with get_shape_library so the style names are correct, not guessed.
Working from files and documents
The agent draws from whatever it can read: a repository, an architecture.md, an OpenAPI file or an existing .drawio. Ask for one diagram type per request (architecture, sequence, ER, flowchart, BPMN, Kubernetes), name the elements you want, and say which pa
Установить next-ai-draw-io в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл next-ai-draw-io?
Lets an AI agent draw and edit draw.io diagrams on a live browser canvas that the person can also edit by hand, with versions, undo and export to .drawio, .png and .svg. Use when the user asks to "draw the architecture of this repo", "make a draw.io diagram", "edit this .drawio file", "export a diagram as PNG or SVG", or to add the drawio MCP server (@next-ai-drawio/mcp-server) to Claude Code, Codex, Cursor or VS Code. Also covers self-hosting the Next AI Draw.io web app.
Как установить скилл next-ai-draw-io?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл next-ai-draw-io запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic