agentleFS
gologo13gologo13/agent-skills/skills/diagrams/SKILL.md

diagrams

Skill0 starsChanged 9 months agoMITView on GitHub

Analyze the provided code, architecture, or concept and generate a clear, well-structured Me...; keywords: mermaid, diagram, git, api. Use only on explicit request; skip in routine implementation discussions.

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 9 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Not overly complex - split into multiple diagrams if needed

    line 34
  2. Distinctive:

    Output format: Always wrap the diagram in a mermaid code block:

    line 36
  3. Very specific:

    Use descriptive IDs: userService not a1

    line 44
  4. Distinctive:

    Add labels to relationships when they add clarity

    line 45
  5. Distinctive:

    Use subgraphs to group related components

    line 46
  6. Distinctive:

    Keep diagrams readable - max ~15-20 nodes per diagram

    line 47
  7. Distinctive:

    Use appropriate arrow styles:

    line 48

“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

Generate Mermaid Diagram

Overview

Analyze the provided code, architecture, or concept and generate a clear, well-structured Mermaid diagram that visualizes the relationships, flow, or structure.

Instructions

  1. Analyze the input - Understand what the user wants to visualize (code flow, architecture, data relationships, state machines, sequences, etc).
  2. Choose the appropriate diagram type:

    • flowchart - For process flows, decision trees, algorithms
    • sequenceDiagram - For API calls, message passing, request/response flows
    • classDiagram - For class structures, inheritance, interfaces
    • erDiagram - For database schemas, entity relationships
    • stateDiagram-v2 - For state machines, lifecycle flows
    • graph TD/LR - For dependency graphs, module relationships
    • gitgraph - For git branching strategies
    • journey - For user journeys
    • gantt - For timelines and schedules
  3. Generate the diagram with these qualities:

    • Clear, descriptive node labels
    • Logical grouping with subgraphs where appropriate
    • Consistent styling and direction
    • Meaningful relationship labels on edges
    • Not overly complex - split into multiple diagrams if needed
  4. Output format: Always wrap the diagram in a mermaid code block:

    [diagram code here]

Diagram Style Guidelines

  • Use descriptive IDs: userService not a1
  • Add labels to relationships when they add clarity
  • Use subgraphs to group related components
  • Keep diagrams readable - max ~15-20 nodes per diagram
  • Use appropriate arrow styles:
  • --> solid arrow (main flow)
  • -.-> dotted arrow (optional/async)
  • ==> thick arrow (important path)
  • o--> circle end (aggregation)
  • *--> diamond end (composition)

Examples

Flowchart

flowchart TD
    A[Start] --> B{Is valid?}
    B -->|Yes| C[Process]
    B -->|No| D[Error]
    C --> E[End]
    D --> E

Sequence Diagram

sequenceDiagram
    participant C as Client
    participant S as Server
    participant DB as Database

    C->>S: Request
    S->>DB: Query
    DB-->>S: Results
    S-->>C: Response

Class Diagram

classDiagram
    class Animal {
         String name
         makeSound()
    }
    class Dog {
         bark()
    }
    Animal <|-- Dog

ER Diagram

erDiagram
    USER ||--o{ ORDER : places
    ORDER ||--|{ LINE_ITEM : contains
    PRODUCT ||--o{ LINE_ITEM : "ordered in"

After generating

  • Explain what the diagram shows
  • Offer to refine or expand specific sections
  • Suggest alternative diagram types if applicable

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.