Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Diagram Generator

ASecurity

--- name: diagram-generator description: Generate visual diagrams from code, text descriptions, or data structures using Mermaid ---

33 stars
0 votes
2 copies
13 views
Added 2/10/2026
developmentjavascriptgojavareactapidatabasefrontenddocumentation

Works with

cliapi

Security Analysis

A100/100

Scanned 2/12/2026

$npx -y skills add lovedragonball/power-ranger-toolkit --skill diagram-generator --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Diagram Generator?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Diagram Generator
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/lovedragonball-diagram-generator/badge)](https://www.skillsdirectory.com/skills/lovedragonball-diagram-generator)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
# 📊 Diagram Generator Skill

---
name: diagram-generator
description: Generate visual diagrams from code, text descriptions, or data structures using Mermaid
---

## 🎯 Purpose

สร้าง diagrams จาก code, text descriptions, หรือ data structures โดยใช้ Mermaid syntax

## 📋 When to Use

- Document architecture
- Explain flows
- Visualize relationships
- Create documentation
- Present to stakeholders

## 🔧 Diagram Types

### 1. Flowchart
```mermaid
flowchart TD
    A[Start] --> B{Condition?}
    B -->|Yes| C[Action 1]
    B -->|No| D[Action 2]
    C --> E[End]
    D --> E
```

### 2. Sequence Diagram
```mermaid
sequenceDiagram
    participant U as User
    participant F as Frontend
    participant A as API
    participant D as Database
    
    U->>F: Click Login
    F->>A: POST /auth/login
    A->>D: Query User
    D-->>A: User Data
    A-->>F: JWT Token
    F-->>U: Redirect to Dashboard
```

### 3. Class Diagram
```mermaid
classDiagram
    class User {
        +String id
        +String name
        +String email
        +login()
        +logout()
    }
    
    class Order {
        +String id
        +User user
        +Item[] items
        +calculate()
    }
    
    User "1" --> "*" Order
```

### 4. Entity Relationship
```mermaid
erDiagram
    USER ||--o{ ORDER : places
    ORDER ||--|{ ITEM : contains
    USER {
        int id PK
        string name
        string email
    }
    ORDER {
        int id PK
        int user_id FK
        date created_at
    }
```

### 5. State Diagram
```mermaid
stateDiagram-v2
    [*] --> Draft
    Draft --> Pending: Submit
    Pending --> Approved: Approve
    Pending --> Rejected: Reject
    Rejected --> Draft: Edit
    Approved --> [*]
```

### 6. Pie Chart
```mermaid
pie title Distribution
    "Category A" : 40
    "Category B" : 30
    "Category C" : 20
    "Category D" : 10
```

## 📝 Generation From Code

### From Function Flow
```javascript
// Input: Code
async function processOrder(order) {
  validate(order);
  const payment = await processPayment(order);
  if (payment.success) {
    await fulfillOrder(order);
    sendConfirmation(order);
  } else {
    handleFailure(order);
  }
}
```

```mermaid
flowchart TD
    A[processOrder] --> B[validate]
    B --> C[processPayment]
    C --> D{payment.success?}
    D -->|Yes| E[fulfillOrder]
    E --> F[sendConfirmation]
    D -->|No| G[handleFailure]
```

### From Component Tree
```jsx
// Input: React Components
<App>
  <Header />
  <Main>
    <Sidebar />
    <Content>
      <ArticleList />
    </Content>
  </Main>
  <Footer />
</App>
```

```mermaid
graph TD
    App --> Header
    App --> Main
    App --> Footer
    Main --> Sidebar
    Main --> Content
    Content --> ArticleList
```

## 🎨 Styling

```mermaid
flowchart TD
    A[Start]:::green --> B{Check}
    B -->|Pass| C[Success]:::green
    B -->|Fail| D[Error]:::red
    
    classDef green fill:#10b981,color:white
    classDef red fill:#ef4444,color:white
```

## ✅ Best Practices

- [ ] Keep diagrams simple
- [ ] Use meaningful labels
- [ ] Group related items
- [ ] Choose right diagram type
- [ ] Add colors for clarity
- [ ] Include legend if needed

## 🔗 Related Skills

- `documentation` - Create docs
- `codebase-understanding` - Understand structure
- `code-explanation` - Explain with visuals

Attribution

lovedragonballlovedragonball
View sourceSee grades on GitHubMore from lovedragonball →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Clean Code

Pragmatic coding standards - concise, direct, no over-engineering, no unnecessary comments

304955 votes

Browser Extension Developer

Use this skill when developing or maintaining browser extension code in the `browser/` directory, including Chrome/Firefox/Edge compatibility, content scripts, background scripts, or i18n updates.

286712 votes

Seo Optimizer

SEO optimization with keyword analysis, readability assessment, technical validation, content quality. Use for search rankings, blog posts, content audits, or encountering keyword density, readability scores, meta tags, schema markup errors.

2222 votes

Google Official Seo Guide

Official Google SEO guide covering search optimization, best practices, Search Console, crawling, indexing, and improving website search visibility based on official Google documentation

1862 votes

Writing Plans

Use when you have a spec or requirements for a multi-step task, before touching code

2927051 votes
View all in development →