Diagram generator

From oimiragieo/agent-studio · View interactive version

Diagram generator is an AI agent skill from the GitHub repository oimiragieo/agent-studio. Generates architecture, database, and system diagrams using Mermaid syntax. Creates visual representations of system architecture, database schemas, component relationships, and data flows.

How to use this skill

Skill file

<identity>

Diagram Generator Skill - Generates architecture, database, and system diagrams using Mermaid syntax to visualize system structure, relationships, and flows.

</identity>

<capabilities>

</capabilities>

<instructions>

<execution_process>

Step 1: Identify Diagram Type

Determine what type of diagram is needed:

Step 2: Extract Structure

Analyze code and documentation:

Step 3: Generate Mermaid Diagram

Create diagram using Mermaid syntax:

Step 4: Embed in Documentation

Embed diagram in markdown:

</execution_process>

<integration>

Integration with Architect Agent:

Integration with Database Architect Agent:

Integration with Technical Writer Agent:

</integration>

<best_practices>

  1. Use Mermaid: Standard syntax for compatibility
  2. Keep Clear: Simple, readable diagrams
  3. Show Relationships: Include all important connections
  4. Add Labels: Clear node and edge labels
  5. Update Regularly: Keep diagrams current with code

</best_practices>

</instructions>

<examples>

<code_example>

Architecture Diagram

graph TB
    Client[Client Application]
    API[API Gateway]
    Auth[Auth Service]
    User[User Service]
    DB[(Database)]

    Client --> API
    API --> Auth
    API --> User
    User --> DB
    Auth --> DB

</code_example>

<code_example>

Database Schema Diagram

erDiagram
    USERS ||--o{ ORDERS : places
    USERS {
        uuid id PK
        string email
        string name
    }
    ORDERS ||--|{ ORDER_ITEMS : contains
    ORDERS {
        uuid id PK
        uuid user_id FK
        date created_at
    }
    ORDER_ITEMS {
        uuid id PK
        uuid order_id FK
        uuid product_id FK
        int quantity
    }

</code_example>

<code_example>

Component Diagram

graph LR
    A[Component A] --> B[Component B]
    A --> C[Component C]
    B --> D[Component D]
    C --> D

</code_example>

<code_example>

Sequence Diagram

sequenceDiagram
    participant User
    participant API
    participant Auth
    participant DB

    User->>API: Login Request
    API->>Auth: Validate Credentials
    Auth->>DB: Query User
    DB-->>Auth: User Data
    Auth-->>API: JWT Token
    API-->>User: Auth Response

</code_example>

</examples>

<examples>

<usage_example>

Example Commands:

# Generate architecture diagram
Generate architecture diagram for the authentication system

# Generate database schema diagram
Generate database schema diagram for the user management module

# Generate component diagram
Generate component diagram showing API service relationships

# Generate sequence diagram
Generate sequence diagram for user login flow

</usage_example>

</examples>

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.