agentleFS
soujavasoujava/agent-skills/skills/mermaid/SKILL.md

mermaid

Skill10 starsChanged 4 months agoMITView on GitHub

Generate Mermaid overview diagrams for architecture and component visualization, with shape and style mappings for BCE, package-by-layer, package-by-feature, and hexagonal Java architectures. Use when asked to create, generate, or draw Mermaid diagrams, architecture overviews, component diagrams, dependency graphs, or system visualizations. Triggers on "mermaid diagram", "architecture diagram", "component overview", "dependency graph", "draw a diagram", or requests to visualize system structure. Not for sequence diagrams or class diagrams.

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

10 rules. 0 are common, 7 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 41 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    prefer flowchart (graph) with TD or LR direction

    line 10
  2. Very specific:

    use stadium-shaped nodes: ([text])

    line 12
  3. Distinctive:

    use meaningful node IDs reflecting component names

    line 13
  4. Very specific:

    use --> for dependencies, -.-> for optional/async dependencies

    line 14
  5. Distinctive:

    use subgraphs for logical grouping (subsystems)

    line 17
  6. Distinctive:

    write diagram into the target file (e.g.

    line 18
  7. Very specific:

    when invoked via diagrams, use the architecture it detected — the router is architecture-neutral

    line 27
  8. Distinctive:

    no clear architecture → use the Default mapping

    line 28
  9. Distinctive:

    never mix mappings inside one diagram

    line 29
  10. Distinctive:

    Use when no architecture mapping applies.

    line 46

“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 Diagrams

Rules

  • prefer flowchart (graph) with TD or LR direction
  • wrap in ```mermaid fenced code block
  • use stadium-shaped nodes: ([text])
  • use meaningful node IDs reflecting component names
  • use --> for dependencies, -.-> for optional/async dependencies
  • label arrows only when ambiguous: Gateway -->|routes| Service
  • visualize only high-level concepts — omit classes, methods, implementation details
  • use subgraphs for logical grouping (subsystems)
  • write diagram into the target file (e.g. README.md) when context is clear

Mapping Selection

  • pick the shape mapping matching the architecture the user named or the composed skill implies:
    • BCE business components, or sdd4j-bce in context → BCE mapping
    • technical layer packages, or sdd4j-package-by-layer in context → Package By Layer mapping
    • feature/capability packages, or sdd4j-package-by-feature in context → Package By Feature mapping
    • ports-and-adapters layout, or sdd4j-hexagonal in context → Hexagonal mapping
  • when invoked via diagrams, use the architecture it detected — the router is architecture-neutral
  • no clear architecture → use the Default mapping
  • never mix mappings inside one diagram

Palette

Colors carry the same meaning across all mappings:

ColorFillBorderMeaning
Blue#dae8fc#6c8ebfcapability / business component
Green#d5e8d4#82b366entrypoint / boundary
Purple#e1d5e7#9673a6application / control
Yellow#fff2cc#d6b656domain / entity
Gray#f5f5f5#666666infrastructure / shared
Dashed yellow#fff2cc#d6b656 dashedexternal service

Default Mapping

Use when no architecture mapping applies.

ElementMermaid syntaxStyle class
ComponentOrders([Orders])comp
Subsystemsubgraph Billing—
External servicePayGW([Payment Gateway])ext
classDef comp fill:#dae8fc,stroke:#6c8ebf,color:#000
classDef ext fill:#fff2cc,stroke:#d6b656,color:#000,stroke-dasharray:5 5

BCE Mapping

ElementMermaid syntaxStyle class
Business Component (BC)Orders([Orders])bc
Subsystemsubgraph Billingsubsystem
External servicePayGW([Payment Gateway])ext
Boundary layerBoundary([Boundary])boundary
Control layerControl([Control])control
Entity layerEntity([Entity])entity
classDef bc fill:#dae8fc,stroke:#6c8ebf,color:#000
classDef ext fill:#fff2cc,stroke:#d6b656,color:#000,stroke-dasharray:5 5
classDef boundary fill:#d5e8d4,stroke:#82b366,color:#000
classDef control fill:#e1d5e7,stroke:#9673a6,color:#000
classDef entity fill:#fff2cc,stroke:#d6b656,color:#000

Package By Layer Mapping

Layers are subgraphs; nodes are the capability's classes inside each layer.

ElementMermaid syntaxStyle class
Capability (spec contract)Checkout([Checkout])cap
Layer groupingsubgraph Entrypoints—
Entrypoint (controller, resource, handler, listener, CLI)CheckoutResource([CheckoutResource])entrypoint
Application operation (service, use case)CheckoutService([CheckoutService])application
Domain/model type (entity, model, DTO)Order([Order])domain
Infrastructure (repository, client, adapter)OrderRepository([OrderRepository])infrastructure
External serviceBroker([Message Broker])ext
classDef cap fill:#dae8fc,stroke:#6c8ebf,color:#000
classDef ext fill:#fff2cc,stroke:#d6b656,color:#000,stroke-dasharray:5 5
classDef entrypoint fill:#d5e8d4,stroke:#82b366,color:#000
classDef application fill:#e1d5e7,stroke:#9673a6,color:#000
classDef domain fill:#fff2cc,stroke:#d6b656,color:#000
classDef infrastructure fill:#f5f5f5,stroke:#666666,color:#000

Package By Feature Mapping

Nodes are feature packages; subgraphs group by module or base package. Drawing inside a feature package reuses the layer classes from the Package By Layer mapping.

ElementMermaid syntaxStyle class
Feature package (capability)Checkout([Checkout])cap
Module groupingsubgraph Ordering—
Shared package (declared exception)Shared([Shared Kernel])shared
External servicePayGW([Payment Gateway])ext
classDef cap fill:#dae8fc,stroke:#6c8ebf,color:#000
classDef shared fill:#f5f5f5,stroke:#666666,color:#000,stroke-dasharray:5 5
classDef ext fill:#fff2cc,stroke:#d6b656,color:#000,stroke-dasharray:5 5

Hexagonal (Ports & Adapters) Mapping

Nodes are adapters, ports, use cases, and domain types; the capability core is a subgraph (the hexagon boundary) or a hexagon node. Prefer graph LR and draw driving side left, driven side right. Edges show call flow through ports — interface indirection is elided.

ElementMermaid syntaxStyle class
Capability core (system view)Checkout{{"Checkout"}} hexagoncap
Hexagon boundary (inside a component)subgraph Checkout—
Driving adapter (REST resource, consumer, CLI, scheduler)OrderResource([OrderResource])driving
Inbound port (use case interface)PlaceOrder([PlaceOrderUseCase])port
Use case / application serviceCheckoutService([CheckoutService])application
Domain typeOrder([Order])domain
Outbound portLoadOrderPort([LoadOrderPort])port
Driven adapter (persistence, client, publisher)OrderPersistence([OrderPersistenceAdapter])driven
External servicePayGW([Payment Gateway])ext
classDef cap fill:#dae8fc,stroke:#6c8ebf,color:#000
classDef driving fill:#d5e8d4,stroke:#82b366,color:#000
classDef port fill:#e1d5e7,stroke:#9673a6,color:#000
classDef application fill:#e1d5e7,stroke:#9673a6,color:#000
classDef domain fill:#fff2cc,stroke:#d6b656,color:#000
classDef driven fill:#f5f5f5,stroke:#666666,color:#000
classDef ext fill:#fff2cc,stroke:#d6b656,color:#000,stroke-dasharray:5 5

Example — BCE Between Components

graph LR
    subgraph Billing
        Orders([Orders]) -->|charges| Payments([Payments])
    end
    Orders -.->|async| Notifications([Notifications])
    Payments -->|REST| PayGW([Payment Gateway])

    classDef bc fill:#dae8fc,stroke:#6c8ebf,color:#000
    classDef ext fill:#fff2cc,stroke:#d6b656,color:#000,stroke-dasharray:5 5
    class Orders,Payments,Notifications bc
    class PayGW ext

Example — Package By Layer

graph TD
    subgraph Entrypoints
        CheckoutResource([CheckoutResource])
    end
    subgraph Application
        CheckoutService([CheckoutService])
    end
    subgraph Domain
        Order([Order])
    end
    subgraph Infrastructure
        OrderRepository([OrderRepository])
    end
    CheckoutResource --> CheckoutService
    CheckoutService --> Order
    CheckoutService --> OrderRepository
    CheckoutService -.->|events| Broker([Message Broker])

    classDef entrypoint fill:#d5e8d4,stroke:#82b366,color:#000
    classDef application fill:#e1d5e7,stroke:#9673a6,color:#000
    classDef domain fill:#fff2cc,stroke:#d6b656,color:#000
    classDef infrastructure fill:#f5f5f5,stroke:#666666,color:#000
    classDef ext fill:#fff2cc,stroke:#d6b656,color:#000,stroke-dasharray:5 5
    class CheckoutResource entrypoint
    class CheckoutService application
    class Order domain
    class OrderRepository infrastructure
    class Broker ext

Example — Package By Feature

graph LR
    subgraph Ordering
        Checkout([Checkout]) -->|reserves| Inventory([Inventory])
        Checkout -->|charges| Payments([Payments])
    end
    Checkout --> Shared([Shared Kernel])
    Payments -.->|events| Notifications([Notifications])
    Payments -->|REST| PayGW([Payment Gateway])

    classDef cap fill:#dae8fc,stroke:#6c8ebf,color:#000
    classDef shared fill:#f5f5f5,stroke:#666666,color:#000,stroke-dasharray:5 5
    classDef ext fill:#fff2cc,stroke:#d6b656,color:#000,stroke-dasharray:5 5
    class Checkout,Inventory,Payments,Notifications cap
    class Shared shared
    class PayGW ext

Example — Hexagonal Inside a Component

graph LR
    OrderResource(["OrderResource"])
    subgraph Checkout
        PlaceOrder(["PlaceOrderUseCase"])
        CheckoutService(["CheckoutService"])
        Order(["Order"])
        LoadOrderPort(["LoadOrderPort"])
        ChargePort(["ChargePaymentPort"])
    end
    OrderPersistence(["OrderPersistenceAdapter"])
    PaymentClient(["PaymentClient"])
    DB(["Database"])
    PayGW(["Payment Gateway"])

    OrderResource -->|REST| PlaceOrder
    PlaceOrder --> CheckoutService
    CheckoutService --> Order
    CheckoutService --> LoadOrderPort
    CheckoutService --> ChargePort
    LoadOrderPort --> OrderPersistence
    ChargePort --> PaymentClient
    OrderPersistence -->|JPA| DB
    PaymentClient -->|REST| PayGW

    classDef driving fill:#d5e8d4,stroke:#82b366,color:#000
    classDef port fill:#e1d5e7,stroke:#9673a6,color:#000
    classDef application fill:#e1d5e7,stroke:#9673a6,color:#000
    classDef domain fill:#fff2cc,stroke:#d6b656,color:#000
    classDef driven fill:#f5f5f5,stroke:#666666,color:#000
    classDef ext fill:#fff2cc,stroke:#d6b656,color:#000,stroke-dasharray:5 5
    class OrderResource driving
    class PlaceOrder,LoadOrderPort,ChargePort port
    class CheckoutService application
    class Order domain
    class OrderPersistence,PaymentClient driven
    class DB,PayGW ext

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.