agentleFS
ZejnilovicZejnilovic/agd/.claude/skills/diagrams/SKILL.md

diagrams

Skill5 starsChanged 15 days agoMITView on GitHub

Draw Mermaid diagrams in Markdown to show architecture, request flows, data models and state changes. Use when a structure or flow is easier to show than to describe, when writing a CONTEXT.md or plan, or when asked for a diagram.

9 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use observability.

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.
  • OpenAISkill

    observability

    Vercel Observability expert guidance — Drains (logs, traces, speed insights, web analytics), Web Analytics, Speed Insights, runtime logs, custom events, OpenTelemetry integration, and monitoring dashboards. Use when instrumenting, debugging, or optimizing application performance and user experience on Vercel.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 9 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Write diagrams as mermaid code blocks inside the Markdown they explain: a CONTEXT.md, a plan or a pull request description.

    line 12
  2. Very specific:

    Don't use end as a node id in a flowchart.

    line 36
  3. Very specific:

    Keep node ids to letters, digits and underscores, and put the display text in the label: order_svc["Order service"].

    line 37
  4. Very specific:

    Write subgraphs as subgraph ext [External] … end.

    line 38
  5. Very specific:

    If the Mermaid CLI is installed (mmdc), render to a temporary folder to catch syntax errors: mkdir -p /tmp/mermaid-check && mmdc -i doc.md …

    line 43

“Common” is measured: kept by at least 6 in 10 of the 9 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
<!-- From agentic-defaults. Kit updates replace this file except a "## This project" section at the end, which belongs to the project. Edit nothing else. Rules for all work go in AGENTS.md "This project". -->

Diagrams with Mermaid

Draw a diagram when it replaces several paragraphs: how components connect, how a request moves through the system, what the data model looks like, how something changes state. Don't draw what one sentence can say.

Write diagrams as mermaid code blocks inside the Markdown they explain: a CONTEXT.md, a plan or a pull request description. GitHub and GitLab render them, they diff like text, and people and agents can edit them. VS Code needs a Mermaid extension to preview them.

Pick the type

To showUse
Components and how they connect, module dependencies, process stepsflowchart
Messages between parts over time, such as a request through servicessequenceDiagram
Data model and relationshipserDiagram
Lifecycle of one thing, such as an order going from placed to paid to shippedstateDiagram-v2
Classes and interfaces, only when the design is strongly object-orientedclassDiagram

Rules

  • One idea per diagram, at most about 12 nodes. Split bigger pictures: an overview in the root CONTEXT.md, and details next to the code they describe.
  • Use the real names from the code, so readers can search for them.
  • Label the arrows with what moves or happens: HTTP, publishes OrderPaid, reads.
  • Show external systems (databases, queues, third-party APIs) as distinct nodes, for example inside a subgraph named External.
  • No colors or styling. They break in dark mode and add nothing.
  • Keep diagrams current. A diagram is part of the doc it sits in, so update it in the same change that makes it wrong.

Syntax that breaks rendering

  • Quote labels that contain punctuation: A["Parse (v2)"], not A[Parse (v2)].
  • Don't use end as a node id in a flowchart; use done or finish.
  • Keep node ids to letters, digits and underscores, and put the display text in the label: order_svc["Order service"].
  • Write subgraphs as subgraph ext [External] … end.
  • Break lines inside a label with <br/>.

Check it

If the Mermaid CLI is installed (mmdc), render to a temporary folder to catch syntax errors: mkdir -p /tmp/mermaid-check && mmdc -i doc.md -o /tmp/mermaid-check/doc.md. Otherwise stick to the syntax shown here.

Examples

flowchart LR
  user[Browser] -->|HTTPS| api["API (FastAPI)"]
  api -->|SQL| db[(PostgreSQL)]
  api -->|publishes OrderPaid| queue[[RabbitMQ]]
  queue --> worker[Email worker]
sequenceDiagram
  participant C as Client
  participant A as API
  participant P as Payment provider
  C->>A: POST /orders
  A->>P: create charge
  P-->>A: charge id
  A-->>C: 201 Created

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.