jocyscom/focuslogger/mermaid-rasterize
Claude Code and agent skill by jocyscom/focuslogger
- community
Checking that the SKILL.md file is still in the repository.
Rasterize specific mermaid blocks inside a markdown file into PNG images. Use when mermaid diagrams don't render in the target viewer (GitHub, Notion, PDF, etc.). Triggers on: rasterize diagrams, mermaid isn't rendering, convert mermaid to images, replace mermaid blocks with images.
Install
npx vskill@latest install jocyscom/focuslogger/mermaid-rasterizeSKILL.md
Mermaid Rasterize
Converts user-selected mermaid blocks into a PNG + .mmd source file, then rewrites only those blocks in the markdown with image references.
0. Resolve inputs from context — avoid redundant reads
Before reading any file, check what is already available in the conversation:
| What to resolve | Check first | Fallback | |
|---|---|---|---|
| Mermaid block content | Already in conversation? Use it directly | Read the markdown file | |
| Which blocks to convert | User specified them? Proceed | List found blocks and ask | |
| Markdown file path | Mentioned in conversation? Use it | Ask the user | |
| Output/asset folder | Mentioned in conversation? Use it | Run detection (Step 2) |
Only perform file reads for information that is genuinely missing. Never re-read content already visible in context.
1. Install mmdc
On sandbox errors (Linux/CI), create once and reuse:
Append --puppeteerConfigFile /tmp/puppeteer.json to every mmdc call.
2. Detect asset folder (only if not already known)
Pick the first match:
assets/exists → use itimages/orimg/orstatic/exists → use it- Other images already alongside the
.md→ use same folder - Nothing found → ask the user before continuing
3. Name each diagram
- contextname: markdown filename without extension, slugified (e.g.
sistema-auth) - diagramname: infer from diagram type or first node label; fallback to
diagram-1,diagram-2
Output files per block:
4. Extract, save, and convert
For each confirmed block:
5. Rewrite the markdown
Replace only the converted blocks with a relative image reference. Leave all other blocks untouched.
Save updated .md and generated files to /mnt/user-data/outputs/ mirroring the folder structure.
6. Present outputs
Call present_files with the updated .md first, then each .png. Tell the user which diagrams were converted and which were skipped.
Troubleshooting
| Problem | Fix | |
|---|---|---|
| Sandbox crash | Add --puppeteerConfigFile /tmp/puppeteer.json | |
mmdc not found | export PATH="$PATH:$(npm root -g)/.bin" | |
| Blank PNG | Validate syntax at https://mermaid.live | |
| Broken image links | Verify relative path from .md to asset folder |
Security
- Security scanPassed, 95 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 repositoryChecking.ai/skills/mermaid-rasterize/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/jocyscom/focuslogger/mermaid-rasterize)