Translate .mmd diagram files into PNG images with configurable resolution (retina/HQ/scale), supporting rasterization (raster, rasterize, rasterization). V2 includes L5 Delegated Constraint Verification via verify_png for strict binary linting and Puppeteer-based rendering.
From mermaid-to-pngnpx claudepluginhub richfrem/agent-plugins-skills --plugin mermaid-to-pngThis skill is limited to using the following tools:
acceptance-criteria.mdevals/eval_progress.pngevals/evals.jsonevals/results.tsvfallback-tree.mdreferences/acceptance-criteria.mdreferences/convert-mermaid-flow.mmdreferences/convert-mermaid-flow.pngreferences/fallback-tree.mdreferences/mermaid-to-png-architecture.mmdreferences/mermaid-to-png-architecture.pngreferences/reference.mdrequirements.txtscripts/convert.pyscripts/verify_png.pyGuides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Migrates code, prompts, and API calls from Claude Sonnet 4.0/4.5 or Opus 4.1 to Opus 4.5, updating model strings on Anthropic, AWS, GCP, Azure platforms.
Configures VPN and dedicated connections like Direct Connect, ExpressRoute, Interconnect for secure on-premises to AWS, Azure, GCP, OCI hybrid networking.
<example>python3 ./scripts/convert.py -i architecture.mmd -o architecture.png -s 3</example> <example>python3 ./scripts/verify_png.py architecture.png</example>
This skill requires Python 3.8+ and standard library only. No external packages needed.
To install this skill's dependencies:
pip-compile ./requirements.in
pip install -r ./requirements.txt
See ./requirements.txt for the dependency lockfile (currently empty — standard library only).
You are a specialized conversion agent. Your job is to orchestrate the translation of .mmd or .mermaid syntax files into high-resolution .png binary images.
scripts/convert.pyscripts/verify_png.pyWhen a user requests .mmd to .png conversion, execute these phases strictly.
Invoke the appropriate Python converter script wrapper.
If the user asks for "high resolution", "retina", or "HQ", set -s to 3 or 4.
python3 ./scripts/convert.py -i architecture.mmd -o architecture.png -s 3
CRITICAL: Do not trust that the headless browser correctly generated the .png.
Immediately after the convert.py wrapper finishes, execute the verification engine:
python3 ./scripts/verify_png.py "architecture.png"
"status": "success", the generated image is a valid PNG binary."status": "errors_found", review the JSON log (e.g., MissingMagicBytes, EmptyFile). Puppeteer likely crashed or wrote raw text to the file. Consult the references/fallback-tree.md.Never attempt to write raw .png bitstreams natively from your context window. LLMs cannot safely generate binary blobs this way.
Never attempt to use cat or read a generated .png file back into your chat context to "verify" it. It is raw binary data and will instantly corrupt your context window. You MUST use the verify_png.py script to inspect the file mathematically.
Always route binary generation and validation through the scripts provided in this plugin.
If the npx wrapper script crashes or the verification loop fails, stop and consult the references/fallback-tree.md for triage and alternative conversion strategies.