Install
openclaw skills install prompt-to-drawioGenerate and edit draw.io artifacts from natural-language prompts without a frontend. Use when the user asks for prompt-to-diagram workflows that need `.draw...
openclaw skills install prompt-to-drawioUse this skill to run a CLI-only version of Next AI Draw.io capabilities.
.drawio generation.png, svg, pdf, jpg).txt/md/json/csv/pdf/image) and URLs.aws4, gcp2, azure2, kubernetes, etc.).Primary entrypoint:
/Users/zhaofengli/.codex/skills/prompt-to-drawio/scripts/prompt_to_drawio.pySubcommands:
generateeditexportvalidatelibraryCompatibility:
generate.Mode A (default, recommended): in-session LLM mode
DRAWIO_LLM_API_KEY is not required by the skill workflow.Mode B: standalone CLI mode
prompt_to_drawio.py generate|edit|validate as an independent subprocess that must call a model API by itself, then API key is required.DRAWIO_LLM_API_KEY (preferred) or OPENAI_API_KEY..env from current working directory upward (first match), then reads key variables from it.DRAWIO_DOTENV_FILE=/absolute/path/.env.--api-key/--validation-api-key > existing process env > auto-loaded .env.--no-dotenv: disable .env auto-loading.--dotenv-file /abs/path/.env: use specific dotenv file.--no-config-summary: silence startup effective-config print.--no-model-preflight: skip provider-side model existence preflight.Optional env overrides for standalone CLI mode:
export DRAWIO_LLM_API_KEY="<secret>"
export DRAWIO_LLM_BASE_URL="https://api.openai.com/v1"
export DRAWIO_LLM_MODEL="gpt-4.1"
export DRAWIO_VALIDATION_MODEL="gpt-4.1"
export DRAWIO_VALIDATION_API_KEY="$DRAWIO_LLM_API_KEY"
export DRAWIO_VALIDATION_BASE_URL="$DRAWIO_LLM_BASE_URL"
export DRAWIO_LLM_API_KEY="<google_ai_studio_key>"
export DRAWIO_LLM_BASE_URL="https://generativelanguage.googleapis.com/v1beta/openai/"
export DRAWIO_LLM_MODEL="gemini-3-pro-preview"
export DRAWIO_VALIDATION_API_KEY="$DRAWIO_LLM_API_KEY"
export DRAWIO_VALIDATION_BASE_URL="$DRAWIO_LLM_BASE_URL"
export DRAWIO_VALIDATION_MODEL="gemini-3-pro-preview"
Model naming notes:
gemini-3-pro-preview (or latest model shown by provider model listing).gemini-3-pro unless your provider explicitly lists it.python3 /Users/zhaofengli/.codex/skills/prompt-to-drawio/scripts/prompt_to_drawio.py generate \
--prompt "Create a user login + MFA + session flowchart" \
--out-drawio "/absolute/path/auth-flow.drawio" \
--out-image "/absolute/path/auth-flow.png" \
--validate \
--validate-soft
python3 /Users/zhaofengli/.codex/skills/prompt-to-drawio/scripts/prompt_to_drawio.py generate \
--prompt "Replicate architecture style and improve readability" \
--file "/absolute/path/reference-arch.png" \
--file "/absolute/path/requirements.pdf" \
--url "https://example.com/spec" \
--shape-library aws4 \
--out-drawio "/absolute/path/cloud.drawio" \
--out-image "/absolute/path/cloud.svg"
python3 /Users/zhaofengli/.codex/skills/prompt-to-drawio/scripts/prompt_to_drawio.py edit \
--in-drawio "/absolute/path/cloud.drawio" \
--prompt "Add WAF before ALB and split app tier into two services" \
--out-drawio "/absolute/path/cloud-v2.drawio" \
--out-image "/absolute/path/cloud-v2.png" \
--validate
python3 /Users/zhaofengli/.codex/skills/prompt-to-drawio/scripts/prompt_to_drawio.py export \
--in-drawio "/absolute/path/cloud-v2.drawio" \
--out-image "/absolute/path/cloud-v2.pdf"
python3 /Users/zhaofengli/.codex/skills/prompt-to-drawio/scripts/prompt_to_drawio.py validate \
--in-drawio "/absolute/path/cloud-v2.drawio" \
--fail-on-critical
python3 /Users/zhaofengli/.codex/skills/prompt-to-drawio/scripts/prompt_to_drawio.py library --list
python3 /Users/zhaofengli/.codex/skills/prompt-to-drawio/scripts/prompt_to_drawio.py library --name aws4
Always surface generated file paths exactly as printed by script:
DRAWIO_FILE=...IMAGE_FILE=... (if requested and successful)BACKUP_FILE=... (for edits)VALIDATION_JSON= block when validation runsDiagnostics:
stderr (dotenv source, effective model/base-url, key presence mask).Do not claim export success unless target file exists.