walterfan/lazy-rabbit-skills/diagram-render
- community
Checking that the SKILL.md file is still in the repository.
Render diagrams from code blocks (PlantUML, Mermaid, Graphviz) to PNG/SVG images. Use when the user wants to render a diagram, convert diagram-as-code to an image, generate architecture diagrams, flowcharts, sequence diagrams, mind maps, ER diagrams, class diagrams, or process markdown files containing diagram code blocks.
Install
npx vskill@latest install walterfan/lazy-rabbit-skills/diagram-renderSKILL.md
diagram-render
Render diagram code blocks (PlantUML, Mermaid, Graphviz) to PNG/SVG images.
All scripts/ paths below are relative to the skill directory.
Prerequisites
- Python 3.9+
- requests —
pip install requests(for PlantUML server rendering)
Optional (for local rendering):
- graphviz —
brew install graphvizorpip install graphviz - mermaid-cli —
npm install -g @mermaid-js/mermaid-cli
Install dependencies:
Trigger Scenarios
- User asks to render a PlantUML, Mermaid, or Graphviz diagram
- User wants to convert a
.puml,.mmd, or.dotfile to an image - A markdown file contains diagram code blocks that need rendering
- User asks to generate architecture, sequence, flow, or ER diagrams
Contract
- scope_in: PlantUML, Mermaid, and Graphviz diagram sources;
.puml,.mmd,.dot, and markdown files with supported diagram code blocks; requests to render PNG or SVG output. - scope_out: Hand-drawn diagrams, unsupported diagram syntaxes, heavy diagram design/editing beyond rendering, and arbitrary image editing.
- Preconditions: The user provides diagram source text or an input file; the required runtime or renderer is available for the chosen backend.
- Postconditions: The requested diagram is rendered or a concrete blocker is reported; the output format and destination are explicit; any fallback used is stated.
Execution
Phase 1: Identify input
- Entry: Diagram source, file path, or markdown file is available.
- Steps:
- Detect the diagram type and desired output format.
- Confirm whether the request targets a single source file, stdin, or markdown extraction.
- Exit: Renderer, input source, and output target are known.
- On fail: Stop and ask for the missing diagram source, file path, or type instead of guessing.
Phase 2: Render
- Entry: Phase 1 completed.
- Steps:
- Run
scripts/render_diagram.pywith the correct type, input, and output arguments. - Use the local renderer when available; otherwise use the supported fallback path documented by the script and references.
- Exit: A render attempt completes with an output file or explicit error.
- On fail: Report the exact missing dependency or renderer error and fall back to another supported backend only if it preserves the requested diagram semantics.
Verification
Hard gates
- Output file exists at the requested path.
- Output format matches the requested
pngorsvg. - The selected renderer matches the detected diagram type.
Soft gates
- Output is readable and non-empty.
- The response includes the command or script invocation used.
- Any fallback, limitation, or unsupported syntax is called out explicitly.
Feedback
- Failure modes: Missing renderer dependency, unsupported syntax, malformed diagram source, or markdown extraction that finds no supported code blocks.
- Boundary examples: Reject unsupported diagram engines or generic image-generation requests; redirect image editing to a more appropriate skill.
- Improvement triggers: Update this skill when
scripts/render_diagram.pyadds new diagram engines, new output formats, or different dependency requirements.
Quick Start
- Write diagram source to a file (or pass via stdin)
- Run the render script:
``bash python scripts/render_diagram.py <type> -i <input_file> -o <output_file> ``
- Verify the output image exists
Supported types: plantuml, mermaid, graphviz (or dot)
Output formats: png (default), svg (via -f svg)
Examples
PlantUML mind map
Input: mindmap.puml
Command:
Mermaid sequence diagram
Input: auth.mmd
Command:
Graphviz directed graph
Input: flow.dot
Command:
Render from stdin
Base64 output
Additional Resources
- For CLI argument details, batch processing, error handling, and tips, see references/detailed-guide.md
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/diagram-render/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/walterfan/lazy-rabbit-skills/diagram-render)