mcpbeat Sign in

Mermaid Diagrams Agent Skill

Embed Mermaid diagrams in generated wiki pages. Use whenever documenting a runtime or request flow, a call sequence, a state machine or lifecycle, a data model or entity relationships, or non-trivial control flow, since these are clearer as a diagram than as prose. Also use when an update run touches a page that already contains a mermaid fence, or a page that contains a text fence a previous run degraded.

952 tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
14057
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/langchain-ai/openwiki --skill mermaid-diagrams

The instruction itself

5 sections, as written by the author

Mermaid Diagrams In Generated Wiki Pages

Diagrams are part of high-quality wiki generation, not decoration. Where a flow,

lifecycle, or data model is easier to grasp visually, embed a Mermaid diagram in

a fenced `mermaid block on the most relevant page.

Choosing a diagram type

  • sequenceDiagram for runtime and request flows across components (auth flows, request lifecycles, agent tool loops).
  • stateDiagram-v2 for lifecycles and state machines (job states, connection states, run phases).
  • erDiagram for the data model: entities and their relationships.
  • flowchart TD for branching control flow and decision logic.

Discipline

  • Ground every diagram in inspected source. Do not invent participants, states, entities, or relationships the code does not support.
  • Cover the high-value cases: add a diagram wherever a page documents a request or runtime flow, a call sequence, a lifecycle or state machine, or a data model. A repository wiki usually has several such diagrams, not one overall. Skip pages that are navigation, reference tables, or pure configuration.
  • Still prefer a few strong diagrams over decorating every page: one accurate diagram on the page that needs it beats a diagram forced onto every page.
  • Give each diagram a one-line caption directly below it stating what it shows.
  • OpenWiki validates every mermaid fence after your run and converts fences that fail to parse into plain text fences. A degraded diagram is a quality failure; follow the syntax rules below so it does not happen.

Syntax safety

These rules prevent the most common render breakages. When in doubt, rephrase the label.

  • Never place semicolons or pipes inside node, message, or edge labels.
  • Never place unescaped angle brackets in labels; write "returns Promise of User" instead of "returns Promise<User>".
  • In flowchart, wrap any label containing parentheses, brackets, or other punctuation in double quotes: A["calls foo(bar)"].
  • In flowchart, never use the bare word end as a node id, and never start a node id with o or x followed by a dash (both are edge-marker syntax); rename the node.
  • In sequenceDiagram, participant names with spaces or punctuation need an alias: participant AS as Auth Service.
  • Never use a Mermaid reserved word as a participant name, alias, or node id: note, end, loop, alt, opt, par, and, else, activate, deactivate, class, state, click, link. For example a notification participant must be Notifier, not Note (which collides with the note keyword).
  • In erDiagram, entity and attribute names must be single identifier-like tokens; put human phrasing in the relationship label.
  • Keep labels short. Move explanation into the surrounding prose or the caption, not the diagram.

Update runs

  • A wrong diagram is a stale claim, not existing structure to preserve. If a source change makes a diagram inaccurate, update the diagram in the same edit as the surrounding prose.
  • Do not rewrite a diagram that is still accurate. Regenerating unchanged diagrams creates diff noise.
  • If a page contains a text fence preceded by an HTML comment starting with "openwiki: mermaid parse failed", that is a diagram a previous run degraded. Fix the syntax using the parser error in the comment, restore the `mermaid fence, and delete the comment.

Other skills for the same job

different authors, same section of the catalogue
Markdown To HTML
by github
vendor ×1

Convert Markdown files to HTML similar to `marked.js`, `pandoc`, `gomarkdown/markdown`, or similar tools; or writing custom script to convert markdown to html and/or working on web template systems like `jekyll/jekyll`, `gohugoio/hugo`, or similar web templating systems that utilize markdown documents, converting them to html. Use when asked to "convert markdown to html", "transform md to html", "render markdown", "generate html from markdown", or when working with .md files and/or web a templating system that converts markdown to HTML output. Supports CLI and Node.js workflows with GFM, CommonMark, and standard Markdown flavors.

29k tokens
Documentation
by anthropics
vendor ×1

Write and maintain technical documentation. Trigger with "write docs for", "document this", "create a README", "write a runbook", "onboarding guide", or when the user needs help with any form of technical writing — API docs, architecture docs, or operational runbooks.

376 tokens
Visa Doc Translate
by mturac
×1

Translate visa application documents (images) to English and create a bilingual PDF with original and translation

1k tokens
Docs Writer
by christophacham
×1

Write, review, and edit documentation files with consistent structure, tone, and technical accuracy. Use when creating docs, reviewing markdown files, writing READMEs, updating `/docs` directories, or when user says "write documentation", "review this doc", "improve this README", "create a guide", or "edit markdown". Do NOT use for code comments, inline JSDoc, or API reference generation.

2k tokens
Constitution Guardian
by ComeOnOliver
×1

Real-time Constitution compliance checker for devflow documents. Blocks partial implementations and hardcoded secrets during file editing.

5k tokens
Global Commenting
by ComeOnOliver
×1

Write self-documenting code with minimal, evergreen comments that explain complex logic without describing recent changes or temporary fixes. Use this skill when writing code comments, documentation strings, explaining complex algorithms, clarifying business logic, or deciding whether code needs comments. Apply when working with any source code files where comments or documentation might be added, ensuring comments remain relevant, helpful, and focused on explaining why rather than what the code does, while preferring clear code structure and naming over excessive commenting.

3k tokens
Hads
by wshobson

Use when writing technical documentation that needs to be readable by both humans and AI models, converting existing docs to HADS format, validating a HADS document, or optimizing documentation for token-efficient AI consumption.

2k tokens
Ic Memo
by anthropics
vendor

Draft a structured investment committee memo for PE deal approval. Synthesizes due diligence findings, financial analysis, and deal terms into a professional IC-ready document. Use when preparing for investment committee, writing up a deal, or creating a formal recommendation. Triggers on "write IC memo", "investment committee memo", "deal write-up", "prepare IC materials", or "recommendation memo".

743 tokens

How to use it

Copy the folder

Take langchain-ai/mermaid-diagrams from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.