convert-mermaid

convert-mermaid is a skill for Claude Code from richfrem/agent-plugins-skills. It costs 60 tokens per session (718 once invoked), scanned A, original, MIT.

A converter that turns Mermaid diagram text files into PNG images, including high-resolution output and checks that the generated file is valid.

In plain words
What is it for?
Use it to render architecture, flow, or other Mermaid diagrams for documentation and presentations.
Why use it?
It lets developers share diagrams as ordinary image files and catches rendering or file-format problems.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the dev-utils plugin — 17 skills shipped together

Good fit Use it to render architecture, flow, or other Mermaid diagrams for documentation and presentations.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/richfrem/agent-plugins-skills/convert-mermaid
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add richfrem/agent-plugins-skills --skill convert-mermaid
Clone the repo
git clone --depth 1 https://github.com/richfrem/agent-plugins-skills

Made for: Claude Code.

Or install dev-utils, the plugin that ships this one along with the rest of its 17 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for convert-mermaid

README.md
[![agentmods](https://agentmods.dev/badge/skills/richfrem/agent-plugins-skills/convert-mermaid/github.svg)](https://agentmods.dev/skills/richfrem/agent-plugins-skills/convert-mermaid)
Your own site
<a href="https://agentmods.dev/skills/richfrem/agent-plugins-skills/convert-mermaid"><img src="https://agentmods.dev/badge/skills/richfrem/agent-plugins-skills/convert-mermaid/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for convert-mermaid

Your own site · 80×15
<a href="https://agentmods.dev/skills/richfrem/agent-plugins-skills/convert-mermaid"><img src="https://agentmods.dev/badge/skills/richfrem/agent-plugins-skills/convert-mermaid.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 718 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00060 $0.00718
Opus 5 $0.00030 $0.00359
Sonnet 5 $0.00012 $0.00144
Haiku 4.5 $0.00006 $0.00072

Measured 5d ago against content hash baf6b7af7b61, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

convert-mermaid scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/convert.py, scripts/verify_png.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/dev-utils/skills/convert-mermaid/SKILL.md · 70 lines

How it starts

The opening of the file, as written. The whole thing — 70 lines — stays where its author put it; the contents beside it link to each section on GitHub.

python ./scripts/convert.py -i architecture.mmd -o architecture.png -s 3 python ./scripts/verify_png.py architecture.png

Dependencies

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).


Identity: The Mermaid Diagram Converter

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.

🛠️ Tools (Skill Scripts)

  • Converter Engine: scripts/convert.py
  • Verification Engine: scripts/verify_png.py

Core Workflow: The Generation Pipeline

When a user requests .mmd to .png conversion, execute these phases strictly.

Phase 1: Engine Execution

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

Phase 2: Delegated Constraint Verification (L5 Pattern)

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"
  • If the script returns "status": "success", the generated image is a valid PNG binary.
  • If it returns "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.

Architectural Constraints

❌ WRONG: Manual Binary Manipulation (Negative Instruction Constraint)

Never attempt to write raw .png bitstreams natively from your context window. LLMs cannot safely generate binary blobs this way.

Read the full file on GitHub · 70 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 70 lines · 60 tokens per session scan A baf6b7af7b61

Subscribe to this mod's changes

convert-mermaid is a skill published in the GitHub repository richfrem/agent-plugins-skills (6 stars, last pushed today), licensed MIT. It adds 60 tokens to every session and 718 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

appllama-usage

Use the Appllama MCP (mcp.appllama.io) well — research real top-grossing mobile apps, their screens, flows, and UI elements, then build from what you learn. Load when the Appllama MCP is connected and the task involves building a mobile app or screen, researching app design patterns, studying…

Appllama/appllama-skills · 124 tokens

appllama-app-design-skill

Build native-feeling, benchmark-quality mobile app screens (Expo / React Native). Use when designing or implementing any mobile UI — screens, flows, onboarding, paywalls, tab bars, sheets, settings, empty states — or when polishing motion, navigation, typography, dark mode, or perceived performance. Enforces Apple HIG…

Appllama/appllama-skills · 184 tokens

pdf-design

Designs PDF reports and proposals from HTML with previews and branding. Use to create, export, or securely upload a PDF.

jamditis/claude-skills-journalism · 28 tokens

document-design

Creates print-ready HTML that exports to PDF. Use to make a proposal, report, one-pager, newsletter, slides, or flyer.

jamditis/claude-skills-journalism · 31 tokens

doc-pptx

A PowerPoint (.pptx) presentation generator and designer for business reports, investor pitches, training materials, conference talks, and product demos. It can build slides from direct content, HTML, NotebookLM, or a Markdown script.

modu-ai/moai-cowork · 266 tokens

strategy-consulting-visualization

Use when turning any content into clear, professional visualizations - board slides, reports, proposals, research summaries, training materials, technical diagrams, infographics, process flows, timelines, benchmarks, waterfall charts, or data-backed visual specs for any audience.

kgraph57/mckinsey-style-visualization-skill · 58 tokens