prompt-to-drawio-skill

Generate and edit draw.io diagrams from natural-language prompts via a Python CLI.

4|Updated Feb 12, 2026
One-click install
npx skills add https://github.com/lzfxxx/prompt-to-drawio-skill --skill prompt-to-drawio-skill
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prompt-to-drawio-skill
Source: https://github.com/lzfxxx/prompt-to-drawio-skill/tree/main
Command: npx skills add https://github.com/lzfxxx/prompt-to-drawio-skill --skill prompt-to-drawio-skill

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

Generates and edits draw.io diagrams from natural-language prompts, enabling diagram work without a frontend and supporting optional exports, context ingestion, and shape-library lookups.

Core Features & Use Cases

  • Prompt -> .drawio generation
  • Edit existing diagrams by ID with backups and shape-library access
  • Export to PNG/SVG/PDF/JPG and ingest context from files, URLs, images, or PDFs
  • Shape library guidance and visual-validation loops for quality control
  • History snapshots before edits for traceability

Quick Start

Create a new diagram from a prompt and save it as a .drawio file.

Frequently Asked Questions about prompt-to-drawio-skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate draw.io diagrams from a natural-language prompt via CLI?

You generate draw.io diagrams from a natural-language prompt by running a Python CLI that automates .drawio file creation using OpenAI-compatible APIs. The CLI processes your text input and outputs a structured diagram file without needing a frontend interface.

Can I edit an existing draw.io diagram and export it to PNG or SVG?

Yes, you can edit existing draw.io diagrams by their ID and export them to PNG, SVG, PDF, or JPG. The CLI creates history snapshots before edits for traceability and allows shape-library lookups during the modification process.

What is the best way to add context from external files or URLs when creating a draw.io diagram?

The best way to add context to draw.io diagram generation is by ingesting data directly from files, URLs, images, or PDFs. The CLI integrates this external context into your natural-language prompt to enrich the automated diagram output.

Does the draw.io diagram generation CLI support visual validation loops?

Yes, the draw.io diagram generation CLI supports visual validation loops for quality control. It uses a dedicated validate subcommand to check the generated diagram structure against shape-library guidance and your original prompt intent.

Do I need an OpenAI API key to automate draw.io diagram generation?

Yes, you need an OpenAI-compatible API key, along with a configurable base URL and model specification, to automate draw.io diagram generation. These API credentials allow the Python CLI to interpret your natural-language prompts.

What are the limitations of using a CLI for draw.io diagram generation?

A limitation of using a CLI for draw.io diagram generation is the absence of a visual frontend, meaning you must rely entirely on text prompts and command-line outputs. Complex visual adjustments may require multiple prompt iterations using the validation loop.