mermaid-graph-renderer

mermaid-graph-renderer is a skill for Claude Code from curiositech/some_claude_skills. It costs 130 tokens per session (2,605 once invoked), scanned A, original, MIT.

A tool and design guide for turning Mermaid text diagrams into SVG, PNG, or PDF files in browsers, on servers, or from command-line jobs. Mermaid is a text format for diagrams such as flowcharts and sequence diagrams.

In plain words
What is it for?
Exporting Mermaid diagrams, rendering them in web pages, generating diagram images in CI/CD, and improving loading performance on documentation sites.
Why use it?
It helps produce diagram files when Mermaid normally expects browser features, and helps choose a suitable rendering approach for websites, servers, or automated build jobs.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the mermaid-graph-renderer plugin — 1 skill shipped together

Good fit Exporting Mermaid diagrams, rendering them in web pages, generating diagram images in CI/CD, and improving loading performance on documentation sites.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/curiositech/some_claude_skills/mermaid-graph-renderer
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 curiositech/some_claude_skills --skill mermaid-graph-renderer
Clone the repo
git clone --depth 1 https://github.com/curiositech/some_claude_skills

Made for: Claude Code.

Or install mermaid-graph-renderer, the plugin that ships this one along with the rest of its 1 skill.

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 mermaid-graph-renderer

README.md
[![agentmods](https://agentmods.dev/badge/skills/curiositech/some_claude_skills/mermaid-graph-renderer/github.svg)](https://agentmods.dev/skills/curiositech/some_claude_skills/mermaid-graph-renderer)
Your own site
<a href="https://agentmods.dev/skills/curiositech/some_claude_skills/mermaid-graph-renderer"><img src="https://agentmods.dev/badge/skills/curiositech/some_claude_skills/mermaid-graph-renderer/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 mermaid-graph-renderer

Your own site · 80×15
<a href="https://agentmods.dev/skills/curiositech/some_claude_skills/mermaid-graph-renderer"><img src="https://agentmods.dev/badge/skills/curiositech/some_claude_skills/mermaid-graph-renderer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 130 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,605 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 159
    Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.
    Fix: Pin the image: image:tag or image@sha256:abc123
  • medium Data Exfiltration · line 178
    Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
    Fix: Verify the destination URL is trusted and necessary. Remove or replace with documented APIs. Ensure no secrets, tokens, or PII are transmitted.
  • low Tool Misuse · line 159
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
How audits are shown
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.00130 $0.02605
Opus 5 $0.00065 $0.01303
Sonnet 5 $0.00026 $0.00521
Haiku 4.5 $0.00013 $0.00261

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

Security

Grade A, and why

mermaid-graph-renderer scanned grade A with 1 finding 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 7d ago.

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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -X POST https://kroki.io/mermaid/svg \
.claude/skills/mermaid-graph-renderer/SKILL.md · 267 lines

How it starts

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

Mermaid Graph Renderer

Renders Mermaid diagrams to production-quality SVG, PNG, and PDF in web and offline contexts. Covers the full spectrum from lazy-loaded client-side rendering to 1000x-faster native Rust batch export.

Core Constraint

Mermaid.js requires browser APIs (document.createElement, SVGTextElement.getBBox()) to compute text dimensions. Every non-browser rendering path must either embed a headless browser or reimplement the renderer from scratch. This constraint shapes every decision below.


When to Use

Use for:

  • Rendering Mermaid diagrams on web pages (performance-optimized)
  • Exporting diagrams to SVG, PNG, or PDF (offline/CLI)
  • Setting up CI/CD pipelines that generate diagram images
  • Choosing between rendering libraries for a project
  • Optimizing Mermaid load time on documentation sites

NOT for:

  • Writing Mermaid syntax (use mermaid-graph-writer)
  • Rendering non-Mermaid formats (PlantUML, GraphViz — see Kroki)
  • General image processing or manipulation

Rendering Decision Tree

flowchart TD
  A{Where are you rendering?} -->|Browser| B{Performance matters?}
  A -->|CLI / CI| C{Volume?}
  A -->|Server-side| D{Must avoid client JS?}

  B -->|Yes| E[Lazy-load mermaid.js]
  B -->|No| F[CDN script tag]

  C -->|1-10 diagrams| G[mermaid-cli]
  C -->|10-100 diagrams| H{Need multiple formats?}
  C -->|100+ diagrams| I[mmdr Rust renderer]

  H -->|Mermaid only| G
  H -->|Multiple languages| J[Kroki]

  D -->|Yes, zero JS| K[Build-time with Puppeteer]
  D -->|Some JS OK| E
  K -->|Slow builds warning| L[rehype-mermaid + Playwright]

Web Rendering

Option 1: Lazy-Loaded mermaid.js (Recommended)

Best for documentation sites, blogs, and apps where only some pages have diagrams.

How it works: Check for .mermaid elements before loading the library. The ~480 KB cost is only paid on pages that actually need it.

// Lazy load pattern — only loads mermaid.js when diagrams exist
function initMermaid() {
  const diagrams = document.querySelectorAll('.mermaid');
  if (diagrams.length === 0) return;

  const script = document.createElement('script');
  script.src = 'https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.min.js';
  script.onload = () => {
    mermaid.initialize({ startOnLoad: false, theme: 'neutral' });
    mermaid.run({ nodes: diagrams });
  };
  document.head.appendChild(script);
}

// Handle initial load + SPA navigation
document.addEventListener('DOMContentLoaded', initMermaid);
// For SPA route changes: call initMermaid() after navigation

Read the full file on GitHub · 267 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 7d ago First seen · 267 lines · 130 tokens per session scan A 9a03b2c66919

Subscribe to this mod's changes

mermaid-graph-renderer is a skill published in the GitHub repository curiositech/some_claude_skills (219 stars, last pushed 5d ago), licensed MIT. It adds 130 tokens to every session and 2,605 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). 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

codebase-documenter

Scaffold project documentation (README, ARCHITECTURE, API, CODECOMMENTS) from templates with documented standards. Use when bootstrapping docs for a new or under-documented codebase.

rjmurillo/ai-agents · 45 tokens

dxkit-docs

Generate the documentation a repo is missing — read the Documentation dimension's gaps, orient on the real code via the graph, then write a grounded README / docstrings / API + architecture docs that move the score without tripping the slop check. Use when the user says "write docs", "document this module", "improve…

vyuh-labs/dxkit · 93 tokens

orbit-notion

Open Orbit briefing skill — selected by the Orbit pipeline when Notion is the user's only connected connector, or when the user explicitly scopes their daily digest to Notion. Pulls the past 24 hours of document edits, comments, mentions, and database row changes from the user's authenticated Notion connection and…

nexu-io/open-design · 117 tokens

instrument-data-to-allotrope

Convert laboratory instrument output files (PDF, CSV, Excel, TXT) to Allotrope Simple Model (ASM) JSON format or flattened 2D CSV. Use this skill when scientists need to standardize instrument data for LIMS systems, data lakes, or downstream analysis. Supports auto-detection of instrument types. Outputs include full…

anthropics/knowledge-work-plugins · 123 tokens

feishu

Work with Feishu or Lark bots, docs, sheets, bitables, approval flows, and OpenAPI/MCP setup without hardcoding credentials.

Hmbown/CodeWhale · 33 tokens

overleaf-sync

A two-way connection between a local paper folder and Overleaf, a web-based LaTeX editor for writing research papers. It lets you move changes between the local files and the shared Overleaf project.

wanshuiyin/Auto-claude-code-research-in-sleep · 97 tokens