import-drawio

import-drawio is a command for Claude Code from nikeyes/stepwise-dev. It costs 20 tokens per session (951 once invoked), scanned A, a copy of import-drawio, Apache-2.0.

A command for turning a draw.io file into an editorial-style diagram in HTML, SVG, or PNG. draw.io is a tool and file format for making diagrams; the command supports several draw.io file variants and can choose how much detail to show.

In plain words
What is it for?
Use it to convert architecture, process, dependency, or other draw.io diagrams for documents, slides, print, or sharing.
Why use it?
It avoids manually rebuilding an existing draw.io diagram when you need a different visual style, size, or output format.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: positional $N argument.

Part of the diagram-design plugin — 1 skill, 5 commands shipped together

Good fit Use it to convert architecture, process, dependency, or other draw.io diagrams for documents, slides, print, or sharing.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/nikeyes/stepwise-dev/import-drawio
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/nikeyes/stepwise-dev

Made for: Claude Code.

Or install diagram-design, the plugin that ships this one along with the rest of its 1 skill, 5 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for import-drawio

README.md
[![agentmods](https://agentmods.dev/badge/commands/nikeyes/stepwise-dev/import-drawio/github.svg)](https://agentmods.dev/commands/nikeyes/stepwise-dev/import-drawio)
Your own site
<a href="https://agentmods.dev/commands/nikeyes/stepwise-dev/import-drawio"><img src="https://agentmods.dev/badge/commands/nikeyes/stepwise-dev/import-drawio/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for import-drawio

Your own site · 80×15
<a href="https://agentmods.dev/commands/nikeyes/stepwise-dev/import-drawio"><img src="https://agentmods.dev/badge/commands/nikeyes/stepwise-dev/import-drawio.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 951 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00020 $0.00951
Opus 5 $0.00010 $0.00476
Sonnet 5 $0.00004 $0.00190
Haiku 4.5 $0.00002 $0.00095

Measured today against content hash 1ce7c65e84e4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

import-drawio scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to import-drawio — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

diagrams/commands/import-drawio.md · 52 lines

How it starts

The opening of the file, as written. The whole thing — 52 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Redraw the draw.io file at $1 as a diagram in this skill's design system, following skills/diagram-design/references/import-drawio.md and skills/diagram-design/references/output-spec.md. Treat those references as the source of truth — don't reimplement the logic here.

Full argument string: $ARGUMENTS

Accepts .drawio, .drawio.xml, .xml, .drawio.png, and .drawio.svg.

Defaults

  • --format=html — a self-contained HTML file next to the source.
  • --size=doc-inlineviewBox 0 0 960 600.
  • --detail=balanced · --audience=mixed.
  • --variant=light — the minimal light template.
  • A single-page file selects its only page; a multi-page file lists pages and asks which to use.
  • Type is chosen from the extracted structure; --type forces one of the visual types in SKILL.md §3.

Flags

  • --formathtml (default), svg, png, or html+png. Non-HTML formats are produced from the HTML via references/export.md, never hand-authored.
  • --size — any preset in output-spec.md §2: doc-inline, doc-wide, slide-16x9, slide-4x3, social-og, social-square, print-a4-landscape, print-letter-landscape, fit.
  • --detailfaithful (≤24 nodes, zoned), balanced (≤12), simplified (≤7).
  • --audienceengineer, mixed, executive. Governs wording, not element count.
  • --type — force a diagram type instead of inferring it.
  • --page — page index, page name, or all (one file per page).
  • --variantlight, dark, or full editorial template.
  • --output — output base path; the extension is appended per format.

Required behaviour

  1. No file provided → ask which .drawio file. Don't guess.
  2. Always locate the installed skill and run <skill-dir>/scripts/drawio_extract.py first. Never assume the skill is under the current working directory, and never read a .drawio file directly — most are compressed, and the raw XML is noise.
  3. Extractor exits non-zero → report its message verbatim and stop.
  4. Digest shows 0 nodes → the source is image-only or encrypted. Say so; ask for the original file. Don't invent content.
  5. Multi-page file with no --page → list the pages with their node/edge counts and ask which one.
  6. Requested detail level is impossible at the requested size (e.g. faithful on a 40-node source at slide-16x9) → say so before drawing and propose overview + per-zone detail.
  7. --detail=faithful above 9 nodes → zone the layout; above 24 nodes, split into overview + detail files.
  8. Never carry over source coordinates, colors, or fonts. The output is a redraw in the project's style-guide.md skin.
  9. Run the SKILL.md §9 taste gate and the output-spec.md §6 checklist before writing.

Read the full file on GitHub · 52 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 52 lines · 20 tokens per session scan A 1ce7c65e84e4

Subscribe to this mod's changes

import-drawio is a command published in the GitHub repository nikeyes/stepwise-dev (24 stars, last pushed yesterday), licensed Apache-2.0. It adds 20 tokens to every session and 951 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to import-drawio, differing in 0 lines, and is treated as a copy.