plugins/mermaid-to-png/skills/convert-mermaid/SKILL.md
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.
npx skillsauth add richfrem/agent-plugins-skills convert-mermaidInstall 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.
<example>python ./scripts/convert.py -i architecture.mmd -o architecture.png -s 3</example> <example>python ./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.
python ./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:
python ./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.
tools
Ingests repository files into the ChromaDB vector store. Builds or updates the vector index from a manifest or directory scan using ingest.py. Use when new files need to be indexed or the vector store is out of date. <example> user: "Index these new plugin files into the vector database" assistant: "I'll use vector-db-ingest to add them to the vector store." </example> <example> user: "The vector store is missing recent files -- update it" assistant: "I'll use vector-db-ingest to re-index the changes." </example>
data-ai
Removes stale and orphaned chunks from the ChromaDB vector store for files that have been deleted or renamed. Use after files are removed or moved to keep the vector index in sync with the filesystem. <example> user: "Clean up the vector store after I deleted some files" assistant: "I'll use vector-db-cleanup to remove orphaned chunks." </example> <example> user: "The vector database has chunks for files that no longer exist" assistant: "I'll run vector-db-cleanup to prune them." </example>
testing
Audit Vector DB coverage -- compares the live filesystem manifest against the ChromaDB index to identify coverage gaps.
development
3-Phase Knowledge Search strategy for the RLM Factory ecosystem. Auto-invoked when tasks involve finding code, documentation, or architecture context in the repository. Enforces the optimal search order: RLM Summary Scan (O(1)) -> Vector DB Semantic Search -> Grep/Exact Match. Never skip phases.