Skip to content
Back to skills

Convert Mermaid

ASecurity

Translate .mmd diagram files into PNG images with configurable resolution, supporting binary linting and Puppeteer-based rendering.

  • 7 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 2, 2026
ai-agentspythonbash

Security analysis

A100/100

Pro scans all 13 files and shows the line behind each finding

Scanned October 3, 2026

npx -y skills add richfrem/agent-plugins-skills --skill convert-mermaid --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Convert Mermaid?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Convert Mermaid
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/richfrem-convert-mermaid-agent-plugins-skills/badge)](https://www.skillsdirectory.com/skills/richfrem-convert-mermaid-agent-plugins-skills)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: convert-mermaid
plugin: dev-utils
description: Translate .mmd diagram files into PNG images with configurable resolution, supporting binary linting and Puppeteer-based rendering.
allowed-tools: Bash, Read, Write
---

# Mermaid Diagram Converter (`convert-mermaid`)

Orchestrates the conversion of `.mmd` syntax files into high-resolution `.png` binary images with deterministic verification.

## Contents

- [Critical Constraints](#critical-constraints)
- [Quick start](#quick-start)
- [Workflow](#workflow)
- [Verification](#verification)
- [References](#references)

## Critical Constraints

1. **Never Write Binary Streams Directly**: LLMs cannot safely generate raw `.png` bitstreams in context.
2. **Never `cat` Binary Files**: Reading binary `.png` files into context corrupts agent memory; always use `scripts/verify_png.py`.
3. **Always Verify Output**: Immediately verify output files using `scripts/verify_png.py`.

## Quick start

Convert a diagram with 3x retina scaling and verify binary integrity:

```bash
python3 scripts/convert.py -i architecture.mmd -o architecture.png -s 3
python3 scripts/verify_png.py architecture.png
```

## Workflow

1. **Engine Execution**: Invoke `scripts/convert.py` with input and output paths. Set `-s 3` or `-s 4` for retina/HQ requests.
2. **Delegated Verification**: Run `scripts/verify_png.py` to confirm the generated output is a valid non-empty PNG binary.
3. **Outcome Resolution**:
   - `"status": "success"` -> Output verified. Proceed.
   - `"status": "errors_found"` -> Review JSON error logs and consult [Fallback Tree](references/fallback-tree.md).

## Verification

Run the verification script against the generated PNG:

```bash
python3 scripts/verify_png.py architecture.png
```

## References

- [acceptance-criteria.md](references/acceptance-criteria.md) — Image generation standards and acceptance criteria.
- [fallback-tree.md](references/fallback-tree.md) — Failure triage and escalation tree for rendering errors.

Files in this skill

  • SKILL.md3.1 KB
  • acceptance-criteria.md605 B
  • evals/evals.json629 B
  • evals/results.tsv2.5 KB
  • fallback-tree.md1.6 KB
  • references/acceptance-criteria.md42 B
  • references/convert-mermaid-flow.mmd44 B
  • references/convert-mermaid-flow.png44 B
  • references/mermaid-to-png-architecture.mmd51 B
  • references/mermaid-to-png-architecture.png51 B
  • requirements.txt22 B
  • scripts/convert.py27 B
  • scripts/verify_png.py30 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…