410-mermaid-diagram-standards

410-mermaid-diagram-standards is a cursor rule for Cursor from savagelysubtle/BIG-BRAIN-Memory-Bank. It costs 3,115 tokens per session, scanned A, original, MIT.

A set of rules for making Mermaid diagrams, which are text-defined diagrams used in documentation, consistent and maintainable.

In plain words
What is it for?
It guides the creation of diagram source files and PNG and SVG exports, including flowcharts and other documentation diagrams.
Why use it?
It prevents diagram files, exported images, names, and storage locations from becoming inconsistent across a documentation project.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is ![Diagram Title](../assets/diagram-name.png).

Good fit It guides the creation of diagram source files and PNG and SVG exports, including flowcharts and other documentation diagrams.

Compare 6 cursor rules from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/savagelysubtle/BIG-BRAIN-Memory-Bank
agentmods
npx agentmods add rules/savagelysubtle/big-brain-memory-bank/410-mermaid-diagram-standards

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 410-mermaid-diagram-standards

README.md
[![agentmods](https://agentmods.dev/badge/rules/savagelysubtle/big-brain-memory-bank/410-mermaid-diagram-standards/github.svg)](https://agentmods.dev/rules/savagelysubtle/big-brain-memory-bank/410-mermaid-diagram-standards)
Your own site
<a href="https://agentmods.dev/rules/savagelysubtle/big-brain-memory-bank/410-mermaid-diagram-standards"><img src="https://agentmods.dev/badge/rules/savagelysubtle/big-brain-memory-bank/410-mermaid-diagram-standards/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 410-mermaid-diagram-standards

Your own site · 80×15
<a href="https://agentmods.dev/rules/savagelysubtle/big-brain-memory-bank/410-mermaid-diagram-standards"><img src="https://agentmods.dev/badge/rules/savagelysubtle/big-brain-memory-bank/410-mermaid-diagram-standards.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,115 This file is loaded in full into every session.
When invoked 3,115 The same file — it is already loaded in full.
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.03115 $0.03115
Opus 5 $0.01558 $0.01558
Sonnet 5 $0.00623 $0.00623
Haiku 4.5 $0.00312 $0.00312

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

Security

Grade A, and why

410-mermaid-diagram-standards 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 12d 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/BIG_BRAIN/Core/Documentation/410-mermaid-diagram-standards.mdc · 386 lines

How it starts

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

TL;DR: This rule defines standards for creating, storing, and using Mermaid diagrams in the BIG BRAIN documentation, ensuring visual consistency and maintainability across all diagrams.

1.0.0

```
/images/
  ├── *.mermaid            # Source files for all diagrams
  ├── *.png                # PNG exports of diagrams
  ├── *.svg                # SVG exports of diagrams
  └── README.md            # Directory documentation

/docs/assets/
  ├── *.png                # Diagram PNGs used in documentation
  ├── *.svg                # Diagram SVGs used in documentation
  └── .gitkeep             # Ensures directory exists in git
```

Each diagram must have:
1. A source `.mermaid` file in the `/images` directory
2. Corresponding `.png` and `.svg` exports in `/images`
3. Copies of exported images in `/docs/assets` when used in documentation

Diagram naming must be:
- Descriptive of content (e.g., `memory-bank-structure.mermaid`)
- Kebab-case format (lowercase with hyphens)
- Consistent across source and export files (same base name)
1. **Flowcharts** (`flowchart` or `graph`)
   - For process flows, algorithms, and decision trees
   - Direction: TD (top-down) for procedures, LR (left-right) for sequences
   - Example use: Bedtime Protocol process flow

2. **Sequence Diagrams** (`sequenceDiagram`)
   - For interaction between components over time
   - Example use: Memory Bank initialization sequence

3. **Class Diagrams** (`classDiagram`)
   - For system structure and relationships
   - Example use: Memory Bank component relationships

4. **State Diagrams** (`stateDiagram-v2`)
   - For state transitions and lifecycle management
   - Example use: Task state transitions

5. **Entity Relationship Diagrams** (`erDiagram`)
   - For data relationships
   - Example use: Memory file relationships

6. **Gantt Charts** (`gantt`)
   - For project planning and timelines
   - Example use: Implementation phase schedule

Choose the diagram type that best communicates the concept being documented.
1. **Color Scheme**
   - Use consistent colors for specific component types:
     - Foundation Layer: `#4285F4` (blue)
     - Verification Framework: `#34A853` (green)
     - Command Protocol: `#FBBC05` (yellow)
     - Creative Phase: `#EA4335` (red)
     - Files/Documents: `#9AA0A6` (gray)
     - User Interaction: `#8AB4F8` (light blue)
     - External Systems: `#F6AEA9` (light red)

Read the full file on GitHub · 386 lines

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. 12d ago First seen · 386 lines · 3,115 tokens per session scan A 089c99244d33

Subscribe to this mod's changes

410-mermaid-diagram-standards is a cursor rule published in the GitHub repository savagelysubtle/BIG-BRAIN-Memory-Bank (5 stars, last pushed 1y ago), licensed MIT. It adds 3,115 tokens to every session, about $0.0156 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.