mermaid-diagram-builder

mermaid-diagram-builder is a skill for Claude Code, Codex from JayRHa/AgentSkills. It costs 144 tokens per session (1,743 once invoked), scanned A, original, MIT.

Diagram-writing workflow using Mermaid, a text format that turns source code into diagrams. It supports process, interaction, data, class, state, schedule, and architecture diagrams that can be version-controlled.

In plain words
What is it for?
Use it to choose and create a flowchart, sequence diagram, entity-relationship diagram, class diagram, state machine, Gantt chart, or architecture diagram.
Why use it?
It makes diagrams easier to review, edit, and keep alongside code because the source is plain text rather than a separate drawing file.

Skill for Claude CodeCodex

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

Good fit Use it to choose and create a flowchart, sequence diagram, entity-relationship diagram, class diagram, state machine, Gantt chart, or architecture diagram.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jayrha/agentskills/mermaid-diagram-builder
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 JayRHa/AgentSkills --skill mermaid-diagram-builder
Clone the repo
git clone --depth 1 https://github.com/JayRHa/AgentSkills

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-diagram-builder

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/jayrha/agentskills/mermaid-diagram-builder"><img src="https://agentmods.dev/badge/skills/jayrha/agentskills/mermaid-diagram-builder.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 144 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,743 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.00144 $0.01743
Opus 5 $0.00072 $0.00872
Sonnet 5 $0.00029 $0.00349
Haiku 4.5 $0.00014 $0.00174

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

Security

Grade A, and why

mermaid-diagram-builder 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 9d ago.

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

mermaid-diagram-builder/SKILL.md · 86 lines

How it starts

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

Mermaid Diagram Builder

Overview

Mermaid is a text-based diagramming language that renders to SVG. Because diagrams are plain text, they live in version control, diff cleanly in PRs, and render natively on GitHub, GitLab, Notion, Obsidian, VS Code, and most Markdown tools.

This skill helps you (1) pick the correct diagram type for the user's intent, (2) write valid, idiomatic Mermaid, (3) style it for clarity, and (4) verify it renders before delivering.

Keywords: mermaid, diagram, flowchart, sequence diagram, ER diagram, entity relationship, class diagram, state diagram, gantt, C4, architecture, diagram as code, graphviz alternative, markdown diagram.

Workflow

  1. Clarify intent. Determine what the user is modeling: a process/decision (flowchart), an interaction over time (sequence), a data model (ER), an object structure (class), lifecycle states (state), a schedule (gantt), or a system's components (C4/architecture). If ambiguous, ask one targeted question or pick the best fit and say why. See references/diagram-types.md for the selection guide.
  2. Choose the diagram type using the decision table in references/diagram-types.md.
  3. Draft the Mermaid code following the syntax patterns in references/syntax-cheatsheet.md. Start with the header keyword (e.g. flowchart TD), then nodes/relationships, then styling last.
  4. Apply clarity conventions (direction, concise labels, grouping with subgraphs, consistent node shapes). See Best Practices below.
  5. Validate the syntax. Run scripts/validate_mermaid.py <file.mmd> for static checks, or use the Mermaid CLI (mmdc) if available to do a real render. See scripts/validate_mermaid.py.
  6. Deliver the diagram inside a fenced ```mermaid code block so it renders in Markdown. Offer a PNG/SVG export command if the user needs an image.

Choosing a diagram type (quick reference)

User intent / phrase Diagram type Header keyword
"steps", "process", "decision", "if/else", "workflow" Flowchart flowchart TD
"API call", "request/response", "who talks to whom over time" Sequence sequenceDiagram
"database", "tables", "schema", "relationships", "foreign keys" Entity Relationship erDiagram
"classes", "objects", "OOP", "inheritance", "methods/attributes" Class classDiagram
"states", "lifecycle", "status transitions", "state machine" State stateDiagram-v2
"timeline", "schedule", "project plan", "milestones" Gantt gantt
"system architecture", "services", "containers", "boundaries" C4 / Architecture C4Context / architecture-beta
"user journey", "experience steps with sentiment" Journey journey
"git branches", "commits", "merges" Git graph gitGraph

Read the full file on GitHub · 86 lines

Files

What ships with it

4 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. 9d ago First seen · 86 lines · 144 tokens per session scan A d0415d744d13

Subscribe to this mod's changes

mermaid-diagram-builder is a skill published in the GitHub repository JayRHa/AgentSkills (5 stars, last pushed 1mo ago), licensed MIT. It adds 144 tokens to every session and 1,743 once invoked, about $0.0007 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-31.

Related

Other skills, from other repositories

excalidraw-architecture

Trigger when the user asks for an architecture diagram, says "draw the system", "update the architecture diagram", "give me an excalidraw of this codebase", or "/excalidraw-architecture". Generates or updates an Excalidraw JSON file at docs/architecture.excalidraw by reading the codebase's key entry points.

mergisi/awesome-openclaw-agents · 78 tokens

supreme-diagramming

Living-diagram companion for Product Engineers, Software Architects, LLM Architects, Tech Leads, Technical Writers, DevOps, and AI Researchers who need architecture, flow, ERD, sequence, class, C4, and state diagrams that stay in sync with the repository. Unlike export-only diagram tools that depend on a heavy desktop…

davccavalcante/supreme-coding-guidelines-skill.ah · 396 tokens

options

Present multiple design options as a vertical stack of anchored turns.

asgeirtj/system_prompts_leaks · 13 tokens

qa-test-planner

Generate comprehensive test plans, manual test cases, regression test suites, and bug reports for QA engineers. Includes Figma MCP integration for design validation.

davila7/claude-code-templates · 34 tokens

visualize

Render a polished visual inline in the chat as part of your answer — a diagram, a chart, an interactive explainer, or a UI mockup. Load it proactively whenever an explanation would land better as a picture than as prose. Do not wait to be asked.

vellum-ai/vellum-assistant · 57 tokens

journey-mapping

Build customer journey maps and service blueprints that visualize the end-to-end user experience including touchpoints, emotions, friction, and underlying systems. Use this skill whenever the user wants to map a customer journey, build a service blueprint, identify friction across an experience, align teams on the…

rampstackco/claude-skills · 131 tokens