mermaid_rule

mermaid_rule is a cursor rule for Cursor from Arenukvern/mcp_flutter. It costs 9 tokens per session (500 once invoked), scanned A, original, MIT.

A set of rules for writing Mermaid diagrams, which are text descriptions turned into flowcharts and other diagrams. It covers readable labels, identifiers, line breaks, and arrows.

In plain words
What is it for?
Use it when generating Mermaid flowcharts or similar diagrams, especially when they include long labels, grouped sections, or labeled connections.
Why use it?
It reduces syntax errors and makes diagrams easier to read when labels contain spaces or special characters.

Cursor rule for Cursor

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.

agentmods
npx agentmods add rules/arenukvern/mcp_flutter/mermaid_rule
Clone the repo
git clone --depth 1 https://github.com/Arenukvern/mcp_flutter

Made for: Cursor.

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_rule

README.md
[![agentmods](https://agentmods.dev/badge/rules/arenukvern/mcp_flutter/mermaid_rule.svg)](https://agentmods.dev/rules/arenukvern/mcp_flutter/mermaid_rule)
Your own site
<a href="https://agentmods.dev/rules/arenukvern/mcp_flutter/mermaid_rule"><img src="https://agentmods.dev/badge/rules/arenukvern/mcp_flutter/mermaid_rule.svg" alt="Measured on agentmods" height="20"></a>
Per session 9 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 500 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00009 $0.00500
Opus 5 $0.00005 $0.00250
Sonnet 5 $0.00002 $0.00100
Haiku 4.5 $0.00001 $0.00050

Measured 5d ago against content hash a7484757983e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

mermaid_rule 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 5d 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.

.cursor/rules/mermaid_rule.mdc · 37 lines

What it actually says

Rule Name: mermaid_syntax_guide Description: Guidelines for generating valid and readable Mermaid diagrams, particularly flowcharts (graph TD/LR).

  1. Node and Subgraph Identifiers:

    • Prefer simple, alphanumeric identifiers (e.g., ProcessStep1, UserData) that don't require quoting.
    • Avoid using special characters like ( ) [ ] { } : . , / \ directly within identifiers if possible.
  2. Quoting Labels and Titles:

    • Crucial: ALWAYS enclose node labels and subgraph titles in double quotes (" ") if they contain:
      • Spaces (e.g., "User Interaction")
      • Special characters: ( ) [ ] { } : . , / \ (e.g., "Process Data (Type A)", "API Call: /users/get")
      • Mermaid keywords used as text.
    • Example (Node): id1["Label with spaces and (parentheses)"]
    • Example (Subgraph): subgraph "Subgraph Title with Spaces"
  3. Line Breaks:

    • Use \n inside quoted strings to create line breaks within labels for better readability, especially for longer descriptions or storage keys.
    • Example: id2["First Line\nSecond Line"]
  4. Arrows and Links:

    • Use standard Mermaid link syntax (-->, ---, -.-, ==>).
    • Add text labels to links using -- text --> or ---|text|---.
  5. Styling:

    • Apply styling using style or classDef statements after the graph definition.
    • Refer to nodes by their identifier (e.g., style ProcessStep1 fill:#f9f,stroke:#333).
  6. Validation Mindset:

    • Mentally review the syntax, paying close attention to quoting rules for labels and titles before finalizing the diagram. Check for mismatched quotes or unquoted special characters.

By following these rules, especially the quoting guidelines for labels and titles containing spaces or special characters, we should avoid common Mermaid parsing errors.

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. 5d ago First seen · 37 lines · 9 tokens per session scan A a7484757983e

Subscribe to this mod's changes

mermaid_rule is a cursor rule published in the GitHub repository Arenukvern/mcp_flutter (373 stars, last pushed 9d ago), licensed MIT. It adds 9 tokens to every session and 500 once invoked, about $0.0000 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.