skills/drawio-export-tools/SKILL.md
Decision guide for the third-party Draw.io export ecosystem by @rlespinasse. Covers docker-drawio-desktop-headless (base Docker), drawio-exporter (Rust backend), drawio-export (enhanced Docker), and drawio-export-action (GitHub Actions). Use when user mentions diagram export, CI/CD automation, batch processing, or Draw.io files. Helps select the right tool based on context.
npx skillsauth add rlespinasse/agent-skills drawio-export-toolsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Third-party ecosystem by @rlespinasse - NOT official Draw.io
ALWAYS start with context questions, then provide ONLY relevant section.
1. Ask 2-3 targeted questions
2. Provide solution for their specific case (300-500 tokens)
3. Offer: "Need details on [X/Y/Z]? Just ask."
DO NOT dump all options unless explicitly requested.
Ask these questions in order:
Q1: "Where are you exporting diagrams?"
Q2: "What's your goal?" (if not GitHub Actions)
Q3: "Any special requirements?" (if relevant)
| Use Case | Tool | One-Liner |
| -------------- | -------------------------------- | ------------------------------------------- |
| GitHub Actions | drawio-export-action | uses: rlespinasse/drawio-export-action@v2 |
| Custom naming | drawio-export | --output 'path/{basename}.{ext}' |
| Simple export | docker-drawio-desktop-headless | -x diagram.drawio -f pdf |
| Custom tool | drawio-exporter | Rust library |
Docs: All tools at https://github.com/rlespinasse/
When to provide: User mentions GitHub Actions, CI/CD, or automated commits
- uses: rlespinasse/drawio-export-action@v2
with:
format: pdf,png,svg
path: .
Common options: format, path, output, transparent, scale
Offer: "Need custom naming, specific pages, or workflow setup? Let me know."
Full docs: https://github.com/rlespinasse/drawio-export-action
When to provide: User needs custom output structure, batch exports, or organized files
docker run -v $(pwd):/data rlespinasse/drawio-export \
--format pdf \
--output 'dist/{basename}.{ext}' \
diagrams/
Output templates:
{folder} - source path{basename} - filename{format} - pdf/png/svg{ext} - extensionCommon patterns:
exports/{format}/{basename}.{ext}{basename}-diagram.{ext}docs/{folder}/{basename}.{ext}Offer: "Need more template examples or CLI options?"
Full docs: https://github.com/rlespinasse/drawio-export
When to provide: Simple one-off export, validation, or full CLI control
docker run -v $(pwd):/data -w /data \
rlespinasse/drawio-desktop-headless \
-x diagram.drawio -f pdf
Essential options:
-f <format> - pdf, png, svg, jpg-o <output> - custom filename-t - transparent PNG--scale <n> - resolution-a - all pages--check - validate onlyOffer: "Need batch export, page selection, or error handling?"
Full docs: https://github.com/rlespinasse/docker-drawio-desktop-headless
When to provide: User needs custom processing, pre/post hooks, or pipeline integration
Three approaches:
# Modify .drawio file → Export → Restore
sed -i.bak 's/pattern/replacement/g' diagram.drawio
docker run ... drawio-desktop-headless -x diagram.drawio
mv diagram.drawio.bak diagram.drawio
# Export → Transform output → Save
docker run ... drawio-desktop-headless -x diagram.drawio -o temp.pdf
convert temp.pdf [transformations] final.pdf
#!/bin/bash
preprocess_diagrams()
export_with_custom_logic()
postprocess_outputs()
Offer: "What specific processing do you need? (watermarks, metadata, format conversion, etc.)"
When to provide: User is building a custom tool or needs library integration
Use drawio-exporter (Rust library) for:
use drawio_exporter::Exporter;
// Build your custom export pipeline
Full docs: https://github.com/rlespinasse/drawio-exporter
Most users should use Docker tools instead.
Load this section ONLY if user asks: "what are all the CLI options?" or "show me all flags"
Format: -f pdf|png|svg|jpg|vsdx|xml
Output: -o <path>
Quality: -t (transparent), --scale <n>, -q <n> (jpeg quality), --border <n>
Pages: -a (all), -p <n> (index), --page-range <range>
Advanced: --embed-diagram, --crop, --uncompressed, -r (recursive)
Validation: --check
Load this section ONLY if user asks for "all action options" or "complete configuration"
format: pdf,png,svg
path: diagrams/
output: exports/{basename}.{ext}
transparent: true
scale: 2
quality: 100
page-index: 0
page-range: 0-2
border: 10
embed-diagram: true
remove-page-suffix: true
Load this section ONLY if user encounters errors or asks about troubleshooting
Permission errors:
docker run -u $(id -u):$(id -g) -e HOME=/data/home ...
Timeouts:
docker run -e DRAWIO_DESKTOP_COMMAND_TIMEOUT=60s ...
Debug mode:
docker run -e SCRIPT_DEBUG_MODE=true ...
Response:
Use drawio-export-action:
[GitHub Action Section - 150 tokens]
Need custom naming or multi-format exports? Let me know.
Response:
Use drawio-export with output templates:
[Docker Export Section - 200 tokens]
[Show 2-3 common patterns]
Need more examples or other options?
Response:
First, let me understand:
1. What custom processing? (watermarks, metadata, transformations?)
2. Before export, during, or after?
3. GitHub Actions or local?
Then provide: [Advanced Section] tailored to their answer
If user asks: "what can I customize?"
Response:
Depends on your use case. Are you:
1. Using GitHub Actions? → [show action options]
2. Need custom naming? → [show templates]
3. Need custom processing? → [show advanced]
Or would you like a full overview? (This will be comprehensive)
Only if they confirm "full overview" → provide all sections
User: [mentions draw.io export]
Claude:
1. Acknowledge + quick context
2. Ask 2-3 targeted questions
3. [Wait for answer]
User: [provides context]
Claude:
1. Provide ONLY relevant section (300-500 tokens)
2. Include 1-2 practical examples
3. Offer: "Need [other option]? Just ask."
4. If executing commands: confirm understanding first
User: [follow-up or clarification]
Claude:
1. Provide additional requested details
2. Or adjust solution based on clarification
3. Still keep focused on their specific need
"What can I do?" / "How do I customize?" / "What are my options?"
Response pattern:
There are several approaches depending on your need:
[Quick reference table - 100 tokens]
What's your specific use case?
1. [Most common scenario]
2. [Second most common]
3. [Something else]
I'll provide the exact solution once I understand your goal.
Do NOT provide all 4 levels immediately
Efficient conversation:
Less efficient (avoid):
development
Ensures all project content is written in proper French with correct accents, grammar, and typography. Use when user mentions french, français, langue française, accents, orthographe, typographie, or when working on a project that requires French language content. Also use when generating any text-based file (SVG, Mermaid, PlantUML, Draw.io, HTML, CSV, JSON, YAML, etc.) in a French-language project. Helps enforce French writing conventions across all file types.
development
Verifies that features listed in a README (or similar documentation) are actually implemented in the codebase. Use when user mentions verify features, check feature list, confirm README, validate documentation claims, or audit feature accuracy. Helps catch stale, missing, or inaccurate feature descriptions.
development
Checks GitHub Actions CI logs on a pull request, diagnoses failures, and guides the agent to implement fixes. Use when user mentions CI failing, check PR logs, fix pipeline, GitHub Actions errors, workflow failures, build broken, tests failing on PR, or debug CI. Focuses on PR-scoped CI analysis only.
testing
Migrates GitHub Actions workflows to use pinned commit SHAs instead of tags, resolves the latest release versions, flags major version jumps, and configures Dependabot with grouped updates. Use when user mentions pin actions, pinned versions, SHA pinning, GitHub Actions security, dependabot setup, or supply-chain security.