drawio-headless

drawio-headless is a skill for Claude Code, Codex from kevinnft/ai-agent-skills. It costs 25 tokens per session (1,965 once invoked), scanned B, original, MIT.

A tool for exporting draw.io architecture diagrams to image or document files on computers and servers without a graphical desktop.

In plain words
What is it for?
It helps generate PNG, SVG, and PDF versions of existing .drawio files in scripts or automated build jobs.
Why use it?
It lets automated jobs create diagram files where draw.io cannot open a normal window, such as Docker containers, virtual servers, WSL2, or build pipelines.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It helps generate PNG, SVG, and PDF versions of existing .drawio files in scripts or automated build jobs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kevinnft/ai-agent-skills/drawio-headless
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.

Any agent
npx skills add kevinnft/ai-agent-skills --skill drawio-headless
Clone the repo
git clone --depth 1 https://github.com/kevinnft/ai-agent-skills

Made for: Claude Code, Codex.

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 drawio-headless

README.md
[![agentmods](https://agentmods.dev/badge/skills/kevinnft/ai-agent-skills/drawio-headless/github.svg)](https://agentmods.dev/skills/kevinnft/ai-agent-skills/drawio-headless)
Your own site
<a href="https://agentmods.dev/skills/kevinnft/ai-agent-skills/drawio-headless"><img src="https://agentmods.dev/badge/skills/kevinnft/ai-agent-skills/drawio-headless/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 drawio-headless

Your own site · 80×15
<a href="https://agentmods.dev/skills/kevinnft/ai-agent-skills/drawio-headless"><img src="https://agentmods.dev/badge/skills/kevinnft/ai-agent-skills/drawio-headless.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,965 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found 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.00025 $0.01965
Opus 5 $0.00013 $0.00983
Sonnet 5 $0.00005 $0.00393
Haiku 4.5 $0.00003 $0.00197

Measured 11d ago against content hash 1b35e25c4657, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade B, and why

drawio-headless scanned grade B with 2 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 11d ago.

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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

sudo snap install drawio

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

wget https://github.com/jgraph/drawio-desktop/releases/download/v28.2.5/drawio-amd64-28.2.5.deb
skills/creative/drawio-headless/SKILL.md · 289 lines

How it starts

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

Draw.io Headless Diagram Generation

Generate professional architecture diagrams from .drawio XML files in headless environments (WSL2, VPS, Docker) where GUI is not available.

When to Use

  • Server/VPS without X11 display
  • WSL2 Ubuntu (no native GUI)
  • Docker containers
  • CI/CD pipelines
  • Automated diagram generation

Prerequisites

Required packages:

# Install draw.io (snap - easiest)
sudo snap install drawio

# Install Xvfb (virtual framebuffer for headless rendering)
sudo apt-get update
sudo apt-get install -y xvfb

Alternative: .deb package

# Download latest .deb
wget https://github.com/jgraph/drawio-desktop/releases/download/v28.2.5/drawio-amd64-28.2.5.deb

# Install
sudo dpkg -i drawio-amd64-28.2.5.deb
sudo apt-get install -f  # Fix dependencies

Verification

# Check draw.io installation
which drawio
# Expected: /snap/bin/drawio or /usr/bin/drawio

# Test with xvfb-run
xvfb-run -a drawio --version
# Expected: draw.io version number (e.g., 28.2.5)

Usage

Basic Export

# Export .drawio to PNG
xvfb-run -a drawio -x -f png -o output.png input.drawio

# Export to SVG
xvfb-run -a drawio -x -f svg -o output.svg input.drawio

# Export to PDF
xvfb-run -a drawio -x -f pdf -o output.pdf input.drawio

Flags Explained

  • xvfb-run -a — Run in virtual framebuffer (headless)
  • -x — Export mode
  • -f <format> — Output format (png, svg, pdf, jpg)
  • -o <output> — Output file path
  • <input> — Input .drawio file

Pitfalls

1. Snap Confinement (File Access)

Problem: Snap-installed draw.io cannot access /tmp or arbitrary directories due to confinement.

Solution: Use home directory or snap-accessible paths:

# ❌ FAILS (snap cannot access /tmp)
xvfb-run -a drawio -x -f png -o /tmp/diagram.png /tmp/input.drawio

# ✅ WORKS (home directory accessible)
cd ~/diagrams
xvfb-run -a drawio -x -f png -o diagram.png input.drawio

Snap-accessible paths:

  • ~/ (home directory)
  • /home/<user>/
  • /media/ (removable media)
  • /mnt/ (mounted filesystems)

Read the full file on GitHub · 289 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 11d ago First seen · 289 lines · 25 tokens per session scan B 1b35e25c4657

Subscribe to this mod's changes

drawio-headless is a skill published in the GitHub repository kevinnft/ai-agent-skills (14 stars, last pushed 1mo ago), licensed MIT. It adds 25 tokens to every session and 1,965 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 2 findings (asks for root, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

architecture-diagram

Dark-themed SVG architecture/cloud/infra diagrams as HTML.

mateaix/mateclaw · 15 tokens

code-to-diagram

Analyze codebases and automatically generate architecture diagrams, flowcharts, and org charts. Uses AST parsing to map import dependencies for Python, JS/TS, Go, and Java, outputting Mermaid or SVG files. Triggered when users ask to visualize code architecture, understand dependencies, draw a flowchart, or create a…

serejaris/kimi-skills · 74 tokens

mermaid-diagrams

Create software diagrams using Mermaid syntax. Use when users need to create, visualize, or document software through diagrams including class diagrams, sequence diagrams, flowcharts, ERDs, C4 architecture diagrams, state diagrams, git graphs, and other diagram types. Triggers include requests to diagram, visualize…

wpank/ai · 77 tokens

design-dna

Extract, define, and apply design DNA across three dimensions: design system (tokens), design style (qualitative feel), and visual effects (Canvas, WebGL, 3D, particles, shaders, scroll effects, etc.). Use this skill when: (1) a user wants to see the full 3-dimension design structure/schema, (2) a user provides…

zanwei/design-dna · 192 tokens

aws-architecture-diagram

AWS architecture diagrams — generate visual network topology diagrams from live AWS infrastructure. Use when drawing AWS network diagrams, visualizing VPCs, mapping Transit Gateway topology, or generating architecture documentation.

automateyournetwork/netclaw · 43 tokens

fin-arch-diagram

A tool for creating architecture diagrams, process flowcharts, and hierarchy trees. These show how system parts, business steps, decisions, or organizational levels relate to one another.

csmar432/finai-research · 72 tokens