plugins/autorun/skills/mermaid-diagrams/SKILL.md
Render Mermaid diagrams to SVG using beautiful-mermaid and bun. Use when the user asks to "render mermaid", "generate diagram", "create flowchart", "update diagrams", "render SVG from mermaid", "beautiful-mermaid", "regenerate diagrams", or needs to convert Mermaid diagram syntax into styled SVG files. Supports all Mermaid diagram types with 15 themes including tokyo-night.
npx skillsauth add ahundt/autorun mermaid-diagramsInstall 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.
Render Mermaid .mmd files into styled SVG using beautiful-mermaid v1.0.2 and bun.
| File | Purpose |
|------|---------|
| render-mermaid.ts | CLI tool: renders .mmd files to SVG |
| gemini-diagram-prompt.md | Prompt for Gemini image generation |
Only bun is required. The beautiful-mermaid dependency is auto-installed by bun on first run.
# macOS
brew install oven-sh/bun/bun
# Or universal installer
curl -fsSL https://bun.sh/install | bash
render-mermaid — Render Mermaid .mmd files to themed SVG
Usage:
bun run render-mermaid.ts [options] <input.mmd...>
echo 'graph TD; A-->B' | bun run render-mermaid.ts -o out.svg
Options:
-o, --output <file> Output file (single input only)
--outdir <dir> Output directory for multiple files
-t, --theme <name> Theme (default: tokyo-night)
--list-themes List available themes
--help Show this help
Output defaults: Without -o or -d, writes <name>.svg next to each input file.
Shorthand: Set MERMAID=plugins/autorun/skills/mermaid-diagrams/render-mermaid.ts for shorter commands.
MERMAID=plugins/autorun/skills/mermaid-diagrams/render-mermaid.ts
# Render single file (output next to input)
bun run $MERMAID diagram.mmd
# Render to specific output
bun run $MERMAID diagram.mmd -o pretty.svg
# Render all .mmd files to output directory
bun run $MERMAID docs/diagrams/*.mmd --outdir docs/diagrams
# Different theme
bun run $MERMAID -t dracula diagram.mmd
# Pipe from stdin
echo 'graph TD; A-->B-->C' | bun run $MERMAID -o quick.svg
# List themes
bun run $MERMAID --list-themes
Mermaid source files (.mmd) and rendered output (.svg) in docs/diagrams/:
| Source | Description |
|--------|-------------|
| docs/diagrams/autofile-policy.mmd | AutoFile policy flowchart |
| docs/diagrams/three-stage-autorun.mmd | Three-stage autorun flowchart |
| autorun-architecture.mmd | Full architecture (too complex for beautiful-mermaid) |
Regenerate:
bun run $MERMAID docs/diagrams/*.mmd --outdir docs/diagrams
%%{init:...}%% front matter is stripped automatically (beautiful-mermaid applies its own theming).gemini-diagram-prompt.md contains a prompt for Gemini to generate an outcome-focused project overview image. Copy the prompt into a Gemini conversation.
tools
Use this skill when the user asks to "enable cache protection", "block on cache miss", "avoid cache expiration cost", "/ar:cache", "protect against compaction", "cache pressure guard", "cache hit ratio threshold", or "set cache-miss threshold". Covers the /ar:cache slash command family for blocking tool use when the Claude Code prompt cache is cold or context is near compaction.
tools
(Renamed) Search, recover, and analyze sessions from Claude Code, AI Studio, and Gemini CLI — use /ar:ai-session-tools (this is an alias that redirects there).
tools
Expertise in maintaining, debugging, and deploying the autorun hook system for Claude Code and Gemini CLI. Use when the user asks to "fix hooks", "deploy autorun", "debug hook errors", "update autorun version", or when troubleshooting "invisible failures" where safety guards appear inactive, piped commands are blocked, or work appears to have "reverted" after a session.
tools
Search, recover, and analyze AI session histories across Claude Code, AI Studio, and Gemini CLI. Use when user asks to "find that file from last week", "search sessions", "recover context after compaction", "what did the AI do", "export session to markdown", "find corrections", "analyze session quality", "improve CLAUDE.md from past mistakes", or "turn AI mistakes into rules". Contains session search, file recovery, correction detection, self-improvement workflow.