mermaid-diagrams

mermaid-diagrams is a skill for Claude Code, Codex from magnus919/hermes-profiles. It costs 84 tokens per session (2,269 once invoked), scanned A, original, MIT.

A guide to creating Mermaid diagrams, which are text files that describe diagrams such as flowcharts, sequence diagrams, and data models. It covers writing valid syntax, rendering diagrams, and checking them before delivery.

In plain words
What is it for?
Use it to document processes, software interactions, system structure, classes, states, databases, schedules, and other technical designs.
Why use it?
It helps produce diagrams that can be reused in Markdown, HTML, PDFs, and command-line workflows. It also addresses the need to pre-render diagrams when a PDF tool cannot run JavaScript.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to document processes, software interactions, system structure, classes, states, databases, schedules, and other technical designs.

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

Made for: Claude Code, Codex.

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-diagrams

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/magnus919/hermes-profiles/mermaid-diagrams"><img src="https://agentmods.dev/badge/skills/magnus919/hermes-profiles/mermaid-diagrams.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,269 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 6 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 29
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 112
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 113
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 114
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 119
    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
  • low Tool Misuse · line 119
    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.00084 $0.02269
Opus 5 $0.00042 $0.01135
Sonnet 5 $0.00017 $0.00454
Haiku 4.5 $0.00008 $0.00227

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

Security

Grade A, and why

mermaid-diagrams 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 13d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/validate-mermaid.sh), 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.

skills/mermaid-diagrams/SKILL.md · 178 lines

How it starts

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

Mermaid Diagrams

Portable Mermaid.js diagramming for architectural documentation. Not tied to any blog platform, theme, or rendering engine. Diagrams can be rendered via CLI, embedded in markdown, or served as HTML snippets.

When to Use

Load this skill when:

  • Creating C4 structural views (use Structurizr DSL for production; flowchart workarounds for inline markdown)
  • Producing sequence diagrams for interaction flows
  • Designing flowcharts for process documentation
  • Building state/class/ER diagrams for specification
  • Generating any diagram that needs to render in both agent-facing and human-facing contexts

Do NOT load when:

  • You only need static ASCII architecture (use architecture-diagram skill)
  • You're embedding in a Hugo site that uses custom theme rendering (load the appropriate theme skill)

PDF Output — Pre-render Required

Mermaid code blocks (mermaid) do NOT render in the Pandoc → HTML → Puppeteer PDF pipeline. The pipeline generates static HTML with no JavaScript execution.

For any diagram destined for PDF output:

  1. Create the diagram as a standalone .mmd file
  2. Pre-render to SVG: npx @mermaid-js/mermaid-cli -i diagram.mmd -o diagram.svg --width 800
  3. Embed the raw SVG content directly in the markdown (not as <img src="data:...">)
  4. Strip hardcoded max-width pixel values from the SVG tags
  5. Use flowchart TD (portrait) not flowchart LR (landscape) — see references/portrait-layout.md
  6. Add page-break divs before/after each full-page diagram

Do NOT leave ```mermaid code blocks in markdown that will go through Pandoc. They render as raw monospace text.

See references/pdf-rendering-pipeline.md for the full pipeline with Puppeteer setup, SVG styling fixes, and QA checklist.

Supported Diagram Types

Type Use Case File
Flowchart Process flows, C4 workarounds, decision trees references/flowchart.md
Sequence Interaction protocols, API calls, agent handoffs references/sequence.md
Class Object models, interfaces, type hierarchies references/class.md
State State machines, lifecycle, workflow states references/state.md
ER Entity relationships, data models, schemas references/er.md
Block Manual-position diagrams, composite structures references/block.md
Packet Network protocols, binary formats, bit fields references/packet.md
C4 Architecture context and container views references/c4-mermaid.md
Gantt Project timelines, milestone tracking references/gantt.md
Portrait Layout PDF/print-oriented diagramming — TD over LR, page breaks, full-page diagrams references/portrait-layout.md
PDF Rendering Pipeline Full pipeline from .mmd → SVG → HTML → PDF, with QA checklist references/pdf-rendering-pipeline.md
mmdc Spacing Config Config file approach for controlling diagram layout density (nodeSpacing, rankSpacing, padding) to prevent label overlap in complex diagrams destined for PDF/print references/mmdc-spacing-config.md

Read the full file on GitHub · 178 lines

Files

What ships with it

8 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. 13d ago First seen · 178 lines · 84 tokens per session scan A 3866d10e360d

Subscribe to this mod's changes

mermaid-diagrams is a skill published in the GitHub repository magnus919/hermes-profiles (171 stars, last pushed 2mo ago), licensed MIT. It adds 84 tokens to every session and 2,269 once invoked, about $0.0004 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-08-30.

Related

Other skills, from other repositories

webgl-holographic-foil

A self-contained WebGL2 hero: thin-film interference over a crushed-foil surface whose palette shifts with the viewing angle; move the cursor to tilt the film.

nexu-io/open-design · 41 tokens

html-ppt-hermes-cyber-terminal

OpenDesign + BYOK: choosing and wiring your own model, hands-on — cost, quality, and the routing decision. Built as a decision-grade AI literacy deck for engineers, IT, applied-AI teams.

nexu-io/open-design · 53 tokens

html-ppt-taste-brutalist

16:9 HTML deck in tactical-telemetry / CRT-terminal taste. Deactivated-CRT charcoal slides, white-phosphor monospace, hazard-red accent, scanline overlay, ASCII syntax, density over decoration. Distilled from Leonxlnx/taste-skill brutalist-skill (Tactical Telemetry mode).

nexu-io/open-design · 78 tokens

visual-ralph

Visual Ralph orchestration for frontend UI from generated references, static references, or live URL targets, using $ultragoal with built-in visual verdict and pixel-diff evidence until the implementation matches and leaves a reproducible design system.

Yeachan-Heo/oh-my-codex · 52 tokens

accessibility

Consolidated accessibility skill entrypoint for WCAG 2.2, ARIA Authoring Practices, cognitive accessibility, Section 508, EN 301 549, design intent verification, and the Accessibility Planner workflow.

microsoft/hve-core · 47 tokens

make-resume

A Chinese-language tool for creating editable HTML resumes that can be changed in a browser and printed to PDF. It uses available resume templates when they are installed and otherwise provides a simpler fallback.

Hisn00w/ASu-skills · 86 tokens