agentleFS
JakkuSakuraJakkuSakura/skills/mermaid/SKILL.md

mermaid

Skill1 starsChanged 9 months agoMITView on GitHub

Create, edit, validate, and render Mermaid diagrams (.mmd or Mermaid blocks in Markdown/HTML). Use when asked to convert visuals or specs into Mermaid, fix Mermaid syntax errors, add labels/line breaks, or render SVG/PNG via mmdc or a Mermaid CDN.

44 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use ansible, plantuml and 6 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • julweberSkill

    ansible

    Ansible automation reference for playbooks, roles, inventory, variables, and modules. Includes Proxmox VE and Docker integration via community.general and community.docker collections. Use when writing playbooks, troubleshooting Ansible runs, or designing automation workflows. Triggers: ansible, playbook, inventory, role, task, handler, vars, jinja2, galaxy, proxmox_kvm, proxmox_lxc, docker_container, docker_compose.

    Also in 3 projects that use this

  • xenodiumSkill

    plantuml

    This skill should be used when the user invokes "/plantuml" to create a diagram from the current context using PlantUML and output the resulting image path.

    Also in 3 projects that use this

  • ihiteshguptaSkill

    terraform

    Expert in Infrastructure as Code with Terraform. Use for creating, managing, and versioning infrastructure across cloud providers.

    Also in 3 projects that use this

  • PostHogSkill

    karpathy-guidelines

    Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid overcomplication, make surgical changes, surface assumptions, and define verifiable success criteria. Based on https://github.com/multica-ai/andrej-karpathy-skills.

    Also in 3 projects that use this

  • AWSSkill

    ship

    Finalize dev work on an issue branch — update docs, push, and open a PR.

    Also in 4 projects that use this

  • SentrySkill

    commit

    Create commit messages following Sentry conventions. Use when committing code changes, writing commit messages, or formatting git history. Follows conventional commits with Sentry-specific issue references.

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 41 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use clear node IDs and keep labels faithful to the source, including exact casing and separators.

    line 22
  2. Very specific:

    Use HTML line breaks in labels: <br/>.

    line 23
  3. Distinctive:

    If a labeled reverse arrow causes parse issues, flip the edge direction and keep the label on a forward arrow.

    line 25
  4. Very specific:

    Add layout hints only when needed (e.g., subgraphs, direction, or invisible edges), but never at the expense of label fidelity.

    line 26
  5. Distinctive:

    If mmdc needs a Chrome path, create a Puppeteer config like:

    line 30
  6. Distinctive:

    Only create HTML + CDN when explicitly requested or when mmdc is unavailable.

    line 40

“Common” is measured: kept by at least 6 in 10 of the 41 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Mermaid

Overview

Convert specs or images into accurate Mermaid diagrams, preserving as many details as possible (labels, casing, punctuation, and annotations), validate syntax, and render SVG/PNG with mmdc (preferred) or CDN-backed HTML when requested.

Workflow

1) Capture the source of truth

  • Extract every node, edge, label, and annotation from the input (image, notes, or code); preserve as many details as possible, including exact casing, punctuation, and any callout notes.
  • Preserve naming, casing, and arrow direction; note any ambiguous text for follow-up.

2) Draft Mermaid accurately

  • Pick the diagram type explicitly (e.g., flowchart LR, sequenceDiagram).
  • Use clear node IDs and keep labels faithful to the source, including exact casing and separators.
  • Use HTML line breaks in labels: <br/>.
  • Escape literal pipes in labels as &#124;.
  • If a labeled reverse arrow causes parse issues, flip the edge direction and keep the label on a forward arrow.
  • Add layout hints only when needed (e.g., subgraphs, direction, or invisible edges), but never at the expense of label fidelity.

3) Validate and render with mmdc (preferred)

  • If mmdc needs a Chrome path, create a Puppeteer config like:
    • {"executablePath": "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"}
  • Render and validate in one step:
    • mmdc -p /tmp/puppeteer-config.json -i <input.mmd> -o <output.svg>
  • Fix any syntax errors reported by mmdc before delivering output.

4) Deliver outputs

  • Provide the final .mmd and rendered .svg (or .png) in the requested directory.
  • Open the rendered asset in Chrome when asked.
  • Only create HTML + CDN when explicitly requested or when mmdc is unavailable.

Common Fixes

  • | inside labels: replace with &#124;.
  • Multi-line labels: use <br/> (not \n).
  • Edge labels: A -->|label| B.
  • Node labels containing brackets or punctuation: wrap in "..." if parsing is unstable.

Resources

references/

  • references/mermaid-notes.md: quick syntax/escaping tips and rendering notes.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.