agentleFS
FullFranFullFran/Agent-skills-POC/.agents/skills/mermaid-diagrams/SKILL.md

mermaid-diagrams

Skill1 starsChanged 10 months agoMITView on GitHub

Expert guidance on creating accurate, visually polished Mermaid diagrams for architecture documentation.

69 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use analytics-metrics, aws-account-management and 9 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.
  • hoodiniSkill

    analytics-metrics

    Build data visualization and analytics dashboards. Use when creating charts, KPI displays, metrics dashboards, or data visualization components. Triggers on analytics, dashboard, charts, metrics, KPI, data visualization, Recharts.

    Also in 3 projects that use this

  • hoodiniSkill

    aws-account-management

    Manage AWS accounts, organizations, IAM, and billing. Use when setting up AWS Organizations, managing IAM policies, controlling costs, or implementing multi-account strategies. Triggers on AWS Organizations, AWS IAM, AWS billing, Cost Explorer, SCPs, multi-account, AWS SSO, Identity Center.

    Also in 3 projects that use this

  • wpankSkill

    professional-communication

    Write effective professional messages for software teams. Use when drafting emails, Slack/Teams messages, meeting agendas, status updates, or translating technical concepts for non-technical audiences. Triggers on email, slack, teams, message, meeting agenda, status update, stakeholder communication, escalation, jargon translation.

    Also in 3 projects that use this

  • LangChainSkill

    langchain

    Build agents with a prebuilt architecture and integrations for any model or tool. Use when creating tool-calling agents, switching model providers, or adding structured output.

    Also in 3 projects that use this

  • imehrSkill

    railway

    Railway.com deployment and management - deployment, logs, migrations, troubleshooting, monorepo strategies, security, and CLI reference. Use when deploying to Railway, configuring services, managing environment variables, or debugging deployment issues.

    Also in 3 projects that use this

  • +6 more from hoodini

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 3 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 64 edited versions we read keep these.

  • 3

    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:

    Match the code: Use actual method/class names from the implementation

    line 145
  2. Very specific:

    Show parallelism: Use par blocks for concurrent operations

    line 146
  3. Very specific:

    Add context: Use Note annotations for non-obvious logic

    line 149
  4. Distinctive:

    Test rendering: Verify in mermaid.live before committing

    line 150
  5. Distinctive:

    When documenting a service, include:

    line 154

“Common” is measured: kept by at least 6 in 10 of the 64 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 Skill

This skill provides patterns and best practices for creating high-quality Mermaid diagrams that accurately document software architecture.

When to Use

  • Creating C4 zoom-in diagrams for services
  • Documenting sequence flows with parallel execution
  • Visualizing component dependencies
  • Building flowcharts for decision logic

Diagram Types

1. Sequence Diagrams (Temporal Flow)

Best for showing how components interact over time.

sequenceDiagram
    autonumber
    participant A as ComponentA
    participant B as ComponentB
    participant C as ExternalService

    A->>B: method_call(args)
    activate B

    par Parallel Operations
        B->>C: async_operation_1()
        C-->>B: result_1
    and
        B->>C: async_operation_2()
        C-->>B: result_2
    end

    B-->>A: combined_result
    deactivate B

Key elements:

  • autonumber: Adds step numbers for reference
  • activate/deactivate: Shows component lifecycle
  • par/and/end: Visualizes parallel execution
  • Note over X: Adds contextual annotations

2. Flowchart (Component Diagram)

Best for showing static dependencies between components.

flowchart TB
    subgraph Service["ServiceName"]
        direction TB
        method1["public_method()"]
        method2["_private_method()"]
        method1 --> method2
    end

    subgraph Interfaces["Abstractions"]
        direction LR
        IInterface1([Interface1])
        IInterface2[(Interface2)]
    end

    method1 -.->|uses| IInterface1
    method2 -.->|calls| IInterface2

    %% Styling
    style Service fill:#1a1a2e,stroke:#16213e,stroke-width:2px,color:#eaeaea
    style Interfaces fill:#0f3460,stroke:#1a1a2e,stroke-width:2px,color:#eaeaea
    style method1 fill:#e94560,stroke:#1a1a2e,color:#fff
    style method2 fill:#533483,stroke:#1a1a2e,color:#fff

Key elements:

  • subgraph: Groups related components
  • direction TB/LR: Controls flow direction
  • -.->: Dashed arrows for dependencies
  • style: Custom colors per node

3. C4 Container Diagram

For high-level system architecture:

flowchart TB
    subgraph System["System Boundary"]
        subgraph Layer1["Presentation Layer"]
            UI[Web UI]
            CLI[CLI Tool]
        end

        subgraph Layer2["Service Layer"]
            SVC[Core Service]
        end

        subgraph Layer3["Data Layer"]
            DB[(Database)]
            Cache[(Cache)]
        end
    end

    UI --> SVC
    CLI --> SVC
    SVC --> DB
    SVC --> Cache

    %% Layer colors
    style Layer1 fill:#2d3436,stroke:#636e72
    style Layer2 fill:#0984e3,stroke:#74b9ff
    style Layer3 fill:#00b894,stroke:#55efc4

Styling Guidelines

Color Palette (Dark Theme)

LayerFillStrokeText
Container#1a1a2e#16213e#eaeaea
Interfaces#0f3460#1a1a2e#eaeaea
Public Methods#e94560#1a1a2e#fff
Private Methods#533483#1a1a2e#fff
External#0f4c75#1b262c#bbe1fa

Node Shapes

ShapeSyntaxUse Case
Rectangle[Label]Methods, components
Stadium([Label])Interfaces
Cylinder[(Label)]Databases, repositories
Circle((Label))Entry/exit points
Hexagon{{Label}}Decision nodes

Best Practices

  1. Match the code: Use actual method/class names from the implementation
  2. Show parallelism: Use par blocks for concurrent operations
  3. Layer by abstraction: Group by architectural layer (UI, Service, Data)
  4. Consistent styling: Apply the same color scheme across all diagrams
  5. Add context: Use Note annotations for non-obvious logic
  6. Test rendering: Verify in mermaid.live before committing

Documentation Template

When documenting a service, include:

  1. Responsibility: One-paragraph description of the component's role
  2. Sequence Diagram: For the primary use case flow
  3. Component Diagram: For static dependencies
  4. Method Table: Key methods with brief descriptions

Verification Checklist

  • Diagram renders without errors in Mermaid preview
  • All node names match actual code identifiers
  • Parallel operations are properly visualized
  • Colors are consistent with the project palette
  • Arrows correctly show dependency direction

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.