agentsclimarketplace

Diagram

Skill leolionart/claude-skills/skills/diagram

Generate diagrams in ASCII or Mermaid formats. Auto-selects format based on context, or accepts explicit format parameter. Use for flowcharts, sequence diagrams, architecture diagrams, state machines, Gantt charts, ERDs, user journeys, or any visual representation needs.From its SKILL.md

Install
npx -y skills add leolionart/claude-skills --skill diagram

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

5.7 KB, as published. Nobody here has run it

Diagram Generator Skill

Unified skill to generate diagrams in two formats:

  • ASCII diagrams (text-based, universal, great for Slack/comments)
  • Mermaid diagrams (rendered in GitHub, Notion, Confluence, Obsidian)

Format Selection

Auto-Detection Rules

User mentionsSelected Format
mermaid, gantt, sequence, state, c4, flowchart, ERD, diagramMermaid
ascii, text, monospace, console, slack, commentASCII
Ambiguous or unspecifiedDefault to Mermaid

Explicit Format Parameter

User can specify format directly:

  • "Vẽ Mermaid flowchart cho login flow"
  • "ASCII diagram cho system architecture"
  • "Tạo sequence diagram" → defaults to Mermaid

Format 1: ASCII Diagrams

Best for: Slack, GitHub comments, code comments, email, plain text environments.

Building Blocks

Box Characters:
┌ ─ ┐  Top corners & horizontal
│   │  Vertical sides
└ ─ ┘  Bottom corners

╭ ─ ╮  Rounded corners
╰ ─ ╯

╔ ═ ╗  Double border (emphasis)
╚ ═ ╝

Arrows:
→ ← ↑ ↓  Directional
↔ ↕      Bidirectional
⇒ ⇐      Bold

Connectors:
├ ┤ ┬ ┴  T-junctions
┼        Cross

Symbols:
✓ ✗  Check/X
★ ☆  Star
● ○  Circle

Example: Simple Flow

┌─────────┐     ┌──────────┐     ┌─────────┐
│  Start  │ ──→ │ Process  │ ──→ │   End   │
└─────────┘     └──────────┘     └─────────┘

Example: Decision Tree

       ┌─────────┐
       │  Valid? │
       └────┬────┘
         ┌──┴──┐
      Yes│     │No
         ↓     ↓
    ┌────────┐ ┌────────┐
    │  Save  │ │ Error  │
    └────────┘ └────────┘

Example: System Architecture

┌──────────────┐
│   Frontend   │  (React)
└──────┬───────┘
       │ HTTPS
       ↓
┌──────────────┐
│   Backend    │  (Node.js)
└───┬──────┬───┘
    │      │
    ↓      ↓
┌─────────┐ ┌──────────┐
│   DB    │ │  Cache   │
│(Postgres)│ │  (Redis) │
└─────────┘ └──────────┘

ASCII Tips

  • Use consistent spacing between boxes
  • Label arrows with annotations
  • Keep boxes aligned vertically/horizontally
  • Maximum ~80 chars width for readability

Format 2: Mermaid Diagrams

Best for: GitHub, Notion, Confluence, GitLab, Obsidian - anywhere Mermaid renders.

Supported Diagram Types

TypeSyntax StartUse Case
Flowchartflowchart TDProcesses, user flows
SequencesequenceDiagramAPI interactions, service calls
StatestateDiagram-v2Object lifecycles, statuses
User JourneyjourneyExperience mapping with sentiment
C4C4ContextSystem architecture
GanttganttProject timelines, roadmaps
ERDerDiagramDatabase schemas

Quick Examples

Flowchart:

flowchart TD
    A[Start] --> B{Decision?}
    B -->|Yes| C[Action A]
    B -->|No| D[Action B]

Sequence Diagram:

sequenceDiagram
    User->>API: Request
    API->>Database: Query
    Database-->>API: Result
    API-->>User: Response

State Diagram:

stateDiagram-v2
    [*] --> Idle
    Idle --> Loading: submit
    Loading --> Success: complete
    Success --> [*]

Gantt Chart:

gantt
    title Project Timeline
    dateFormat YYYY-MM-DD
    Task 1: t1, 2025-01-01, 7d
    Task 2: t2, after t1, 5d

Mermaid Optimization Rules

  • Keep labels concise (2-5 words max)
  • Limit complexity (<15 nodes per diagram)
  • Use dateFormat YYYY-MM-DD for Gantt
  • Use after [task_id] for dependencies
  • Escape special characters with quotes

Reference Files

  • references/syntax-reference.md - Complete syntax for all types
  • references/optimization-rules.md - Rendering and styling guidelines
  • references/examples.md - Practice exercises and patterns

Process Steps

  1. Understand request - What is being visualized? Flow, architecture, timeline?
  2. Select format - Use auto-detection or explicit user preference (defaults to Mermaid)
  3. Gather inputs:
    • Description of diagram
    • Nodes/components to include
    • Relationships/flows between them
  4. Generate diagram - Apply format-specific rules
  5. Validate output:
    • ASCII: Aligned, readable monospace
    • Mermaid: Valid syntax, renders correctly
  6. Deliver - Include in response or save to file

Quality Gates

  • Format matches user preference or auto-selection
  • All nodes/components from request are included
  • Relationships/flows are correctly represented
  • Diagram is readable and not overcrowded
  • For Mermaid: Syntax is valid and follows optimization rules
  • For ASCII: Proper alignment and box drawing characters

Related Skills

  • confluence-publishing: Publish Mermaid/ASCII diagrams to Confluence
  • ui-design-guide: Design guidelines for visual consistency

Keep looking

Skills are one crate of 608,475. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.