Skip to content

Spoon94/skill-vault / diagram/diagram-mermaid

diagram-mermaid

Verified

Generate Mermaid code blocks (` ```mermaid ` fences) for inline Markdown rendering of technical diagrams. Covers 11 types — flowchart, sequence, class, state, ER, Gantt, pie, mindmap, timeline, gitGraph, and journey. Use whenever the user asks for a flowchart, sequence diagram, state diagram, ER diagram, Gantt chart, pie chart, mindmap, timeline, git graph, or user journey map. Trigger on: "画流程图" "画时序图" "状态图" "ER图" "甘特图" "饼图" "思维导图" "时间线" "git图" "用户旅程" "Mermaid" "GitHub 渲染" "嵌入文档" or any diagram request where the output should be inline Markdown. Part of the diagram skill family — pick this skill for Mermaid code blocks, zero-dependency output that renders natively in GitHub/Markdown, or one of the 11 supported types. Lightest-weight entry point of the diagram family — default for "画个流程图/时序图" unless another format is explicitly requested.

FileKindSize
SKILL.mdskill md10.9 KB
examples/class.mdmarkdown1.6 KB
examples/er.mdmarkdown1.3 KB
examples/flowchart.mdmarkdown904 B
examples/gantt.mdmarkdown1.6 KB
examples/gitgraph.mdmarkdown1.3 KB
examples/journey.mdmarkdown1.3 KB
examples/mindmap.mdmarkdown1.1 KB
examples/pie.mdmarkdown776 B
examples/sequence.mdmarkdown1.2 KB
examples/state.mdmarkdown1.3 KB
examples/timeline.mdmarkdown1.1 KB
references/common-pitfalls.mdmarkdown8.1 KB
references/layout-best-practices.mdmarkdown5.6 KB
references/mermaid-syntax.mdmarkdown9.9 KB

examples/er.md

View on GitHub
# ER Diagram Example

An entity-relationship diagram for a blog system.

```mermaid
erDiagram
    USER ||--o{ POST : writes
    POST ||--|{ COMMENT : has
    POST }o--o{ TAG : tagged with
    USER ||--o{ COMMENT : authors
    CATEGORY ||--o{ POST : contains

    USER {
        long id PK
        string name
        string email UK
        timestamp created_at
    }

    POST {
        long id PK
        long author_id FK
        long category_id FK
        string title
        text body
        timestamp published_at
    }

    COMMENT {
        long id PK
        long post_id FK
        long author_id FK
        text content
        timestamp created_at
    }

    TAG {
        long id PK
        string name UK
    }

    CATEGORY {
        long id PK
        string name
    }
```

## Key syntax

- `A ||--o{ B : rel_label` — one to zero-or-more
- `||--||` — one to one
- `||--|{` — one to one-or-more
- `}o--o{` — zero-or-more to zero-or-more
- `}|--|{` — one-or-more to one-or-more

## Attribute keys

- `PK` — primary key
- `FK` — foreign key
- `UK` — unique key
- (no suffix) — regular attribute

## Common variations

- `A ||--o{ B : "is in"` — quoted relationship label
- Attribute type can be any string: `long`, `string`, `text`, `timestamp`, `decimal`, etc.
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall