with one click
mermaid-render
Render .mmd or .md files to SVG images
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Render .mmd or .md files to SVG images
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Use when checking Paperclip org health, reviewing agent efficiency, diagnosing token waste, verifying governance compliance, or before and after making org changes. Also use when agents seem idle or unproductive, costs spike, tasks stall, heartbeats fail silently, you see 409 conflicts, stale locks, blocked deadlocks, or suspect agents burning tokens with no progress.
This skill should be used when the user asks to "show dev-setup config", "change the worktrees directory", "update the port pattern", "configure dev-setup settings", or wants to view or update settings in .claude/dev-setup.json.
Generate dev server lifecycle scripts (start/stop/status/ports) from detected project structure
This skill should be used when the user asks to "create a worktree", "set up an isolated workspace", "create a branch for a feature", "start working on a new branch", or before executing an implementation plan that needs an isolated git workspace.
Scan a codebase and auto-generate relevant diagrams from its structure
Generate a D2 diagram from a text description
| name | mermaid-render |
| description | Render .mmd or .md files to SVG images |
| argument-hint | ["path"] |
| allowed-tools | Read, Bash, Write |
User request: "$ARGUMENTS"
Render Mermaid diagrams from an existing .mmd file or a .md file with Mermaid blocks to SVG image files.
Resolve Plugin Path:
find "$HOME/.claude/plugins/cache" -type d -name "mermaid" -path "*/skills/mermaid" 2>/dev/null | head -1
If empty, run fallback:
find "$HOME" -maxdepth 8 -type d -name "mermaid" -path "*/skills/mermaid" 2>/dev/null | head -1
Use the returned path as PLUGIN_DIR.
Ensure Dependencies:
bash "$PLUGIN_DIR/scripts/ensure-deps.sh"
If .claude/mermaid.json does not exist, display a one-time nudge before continuing:
First time using the mermaid plugin? Run
/mermaid-configto pick a theme and output settings. Using defaults for now (zinc-light,./diagrams).
Read Config: If .claude/mermaid.json exists, read:
theme (default: zinc-light)output_directory (default: ./diagrams)output_format (default: svg)Resolve output path:
output_directory is "same" AND an input file path is known:
OUTPUT_DIR=$(dirname {input_file})output_directory is "same" AND no argument was provided:
OUTPUT_DIR=./diagramsOUTPUT_DIR=<output_directory from config>Determine Input:
.mmd file → render directly.md file → extract Mermaid blocks first:
node "$PLUGIN_DIR/scripts/extract_mermaid.js" {file}.mmd files:
find {dir} -name "*.mmd" -not -path "*/node_modules/*"Render:
Run for each input file. resilient_diagram.js renders SVG via beautiful-mermaid and maps errors to troubleshooting.md.
Theme handling:
If theme == "custom" and themeVariables is present in config:
node "$PLUGIN_DIR/scripts/resilient_diagram.js" {input_file} --output-dir $OUTPUT_DIR --custom-theme '{"bg":"#...","fg":"#..."}'
Pass the serialized themeVariables JSON as the --custom-theme value.
If theme == "custom" but themeVariables is absent from config: render without custom theme and display a note:
Custom theme configured but no themeVariables found — run
/mermaid-config→ option 6 to define colors.
Otherwise:
node "$PLUGIN_DIR/scripts/resilient_diagram.js" {input_file} --output-dir $OUTPUT_DIR --theme {theme}
Report:
/mermaid-config → health check to diagnose missing dependencies."Rendered 3 diagrams:
✅ diagrams/sequence-auth.svg
✅ diagrams/er-users.svg
✅ diagrams/architecture.svg