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.
npx skills add magnus919/agent-skills --skill mermaid-diagramsgit clone --depth 1 https://github.com/magnus919/agent-skillsWrote 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.
[](https://agentmods.dev/skills/magnus919/agent-skills/mermaid-diagrams)<a href="https://agentmods.dev/skills/magnus919/agent-skills/mermaid-diagrams"><img src="https://agentmods.dev/badge/skills/magnus919/agent-skills/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.
<a href="https://agentmods.dev/skills/magnus919/agent-skills/mermaid-diagrams"><img src="https://agentmods.dev/badge/skills/magnus919/agent-skills/mermaid-diagrams.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 2 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 126 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 126 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.
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00077 | $0.02528 |
| Opus 5 | $0.00039 | $0.01264 |
| Sonnet 5 | $0.00015 | $0.00506 |
| Haiku 4.5 | $0.00008 | $0.00253 |
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 9d 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.
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.
How it starts
The opening of the file, as written. The whole thing — 192 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:
- Rendering C4 flowchart approximations after the C4 level and model have been chosen; use
c4-diagrammingfor C4 modeling decisions - 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
- Reviewing whether a structurally valid Mermaid diagram is the right communication artifact for its audience and output surface
Do NOT load when:
- A plain text outline communicates the relationship more clearly than a diagram.
- The target renderer cannot execute Mermaid and no pre-rendering path is available.
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:
- Create the diagram as a standalone .mmd file
- Pre-render to SVG:
npx @mermaid-js/[email protected] -i diagram.mmd -o diagram.svg --width 800 - Choose one embedding method: use raw inline SVG by default, or base64 data URIs when the renderer corrupts raw SVG.
- Strip hardcoded
max-widthpixel values from the SVG tags - Use
flowchart TD(portrait) notflowchart LR(landscape) — seereferences/portrait-layout.md - 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.
Communication Review
Before authoring, state the audience, reader job, target surface, and intended read order. Choose the smallest diagram type and scope that supports that job. Keep abstraction, node shapes, edge semantics, labels, boundary treatment, and visual hierarchy consistent. Syntax validation and a successful render are necessary but not sufficient: a diagram can be valid Mermaid and still be the wrong communication artifact because it is too dense, hides the primary path, mixes representational conventions, or leaves the reader to infer uncertainty.
What ships with it
12 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.
- evals/evals.json 4.9 KB
- README.md 2.3 KB
- references/c4-mermaid.md 2.4 KB
- references/c4-to-flowchart.md 5.0 KB
- references/diagram-communication.md 2.6 KB
- references/flowchart.md 1.4 KB
- references/mmdc-spacing-config.md 2.8 KB
- references/pdf-rendering-pipeline.md 5.0 KB
- references/portrait-layout.md 4.4 KB
- references/sequence.md 1.3 KB
- references/source-index.md 370 B
- scripts/validate-mermaid.sh 1.0 KB runs code
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.
- 9d ago First seen · 192 lines · 77 tokens per session scan A 222f1a8bd6f5
mermaid-diagrams is a skill published in the GitHub repository magnus919/agent-skills (76 stars, last pushed yesterday), licensed MIT. It adds 77 tokens to every session and 2,528 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-09-03.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
local-ai-agents
Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…
next-cache-components-adoption
Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…
chat-pet-sprite-creation
Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.
cpu-profile-analysis
Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…
insight-error-page
Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…