agentleFS
cohen-lielcohen-liel/hivemind/.claude/skills/mermaid-diagrams/SKILL.md

mermaid-diagrams

Skill110 starsChanged 9 months agoApache-2.0View on GitHub

Generate Mermaid.js diagrams for system architecture, data flows, sequence diagrams, ERDs, and project planning. Use when the user asks to visualize architecture, create flowcharts, draw sequence diagrams, map data flows, or document system design.

41 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use backend-to-frontend-handoff-docs, lesson-learned and 7 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.
  • softaworksSkill

    backend-to-frontend-handoff-docs

    Create API handoff documentation for frontend developers. Use when backend work is complete and needs to be documented for frontend integration, or user says 'create handoff', 'document API', 'frontend handoff', or 'API documentation'.

    Also in 3 projects that use this

  • softaworksSkill

    lesson-learned

    Analyze recent code changes via git history and extract software engineering lessons. Use when the user asks 'what is the lesson here?', 'what can I learn from this?', 'engineering takeaway', 'what did I just learn?', 'reflect on this code', or wants to extract principles from recent work.

    Also in 3 projects that use this

  • SupabaseSkill

    copywriting

    Write or audit UI copy (buttons, labels, empty states, error messages, tooltips, form text) anywhere in the monorepo. Load it before shipping or reviewing any user-facing text — including when copy is incidental to the task, like a new feature that adds buttons, toasts, dialogs, or validation messages.

    Also in 5 projects that use this

  • VercelSkill

    agent-browser

    Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.

    Also in 3 projects that use this

  • VercelSkill

    vercel-react-best-practices

    React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

    Also in 3 projects that use this

  • OpenAISkill

    test-driven-development

    Use when implementing any feature or bugfix, before writing implementation code

    Also in 3 projects that use this

  • +2 more from softaworks

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 39 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When documenting or explaining complex systems

    line 10
  2. Distinctive:

    Always use descriptive node labels (not just A, B, C)

    line 86
  3. Distinctive:

    Use appropriate arrow styles (solid for sync, dashed for async)

    line 88
  4. Distinctive:

    Keep diagrams focused — split large systems into multiple diagrams

    line 90
  5. Distinctive:

    When asked to document an existing codebase:

    line 95
  6. Distinctive:

    Read the main source files (entry points, routers, models)

    line 96

“Common” is measured: kept by at least 6 in 10 of the 39 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 Diagrams & Architecture Visualization

Generate Mermaid.js diagrams for system architecture, data flows, sequence diagrams, ERDs, and project planning. Use when the user asks to visualize architecture, create flowcharts, draw sequence diagrams, map data flows, or document system design.

Triggers

  • "draw a diagram", "create a flowchart", "architecture diagram"
  • "sequence diagram", "data flow", "ERD", "entity relationship"
  • "visualize the system", "map the architecture"
  • "Mermaid diagram", "system diagram"
  • When documenting or explaining complex systems

Diagram Types

1. System Architecture (C4-style)

graph TB
    subgraph Frontend
        UI[React App] --> API[API Gateway]
    end
    subgraph Backend
        API --> Auth[Auth Service]
        API --> Core[Core Service]
        Core --> DB[(PostgreSQL)]
        Core --> Cache[(Redis)]
    end

2. Sequence Diagrams

sequenceDiagram
    participant U as User
    participant F as Frontend
    participant A as API
    participant D as Database
    U->>F: Click Submit
    F->>A: POST /api/data
    A->>D: INSERT INTO...
    D-->>A: OK
    A-->>F: 201 Created
    F-->>U: Success Toast

3. Data Flow / Pipeline

flowchart LR
    Input[Raw Data] --> Process[Transform]
    Process --> Validate{Valid?}
    Validate -->|Yes| Store[(Database)]
    Validate -->|No| Error[Error Queue]
    Store --> Notify[Send Notification]

4. Entity Relationship Diagrams

erDiagram
    USER ||--o{ PROJECT : owns
    PROJECT ||--|{ TASK : contains
    USER ||--o{ TASK : assigned_to

5. State Diagrams

stateDiagram-v2
    [*] --> Idle
    Idle --> Running: start
    Running --> Paused: pause
    Paused --> Running: resume
    Running --> Done: complete
    Running --> Error: fail
    Error --> Idle: reset

6. Gantt / Timeline

gantt
    title Project Timeline
    section Phase 1
        Design: 2024-01-01, 2w
        Prototype: 2024-01-15, 1w
    section Phase 2
        Development: 2024-01-22, 4w
        Testing: 2024-02-19, 2w

Best Practices

  1. Always use descriptive node labels (not just A, B, C)
  2. Group related components in subgraphs
  3. Use appropriate arrow styles (solid for sync, dashed for async)
  4. Include data annotations on edges where relevant
  5. Keep diagrams focused — split large systems into multiple diagrams
  6. Save diagrams as .md files with embedded Mermaid blocks
  7. For HTML output, use <script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>

Auto-Generation Pattern

When asked to document an existing codebase:

  1. Read the main source files (entry points, routers, models)
  2. Identify key components and their relationships
  3. Map the request/response flow
  4. Generate appropriate diagram type(s)
  5. Save to docs/architecture.md or similar

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.