From prd-builder
Generate Mermaid diagrams from structured PRD sections (state machines, user flows, data models)
How this skill is triggered — by the user, by Claude, or both
Slash command
/prd-builder:prd-diagramThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
```text
$ARGUMENTS
You MUST consider the user input before proceeding (if not empty).
Extract structured data from specific PRD sections and generate Mermaid diagram syntax. Each diagram type maps to a specific PRD section. Output is saved as a .mmd file that can be rendered by any Mermaid-compatible viewer.
Parse $ARGUMENTS for:
state-machine, user-flow, data-model, allIf no diagram type is specified, default to all (generate all applicable diagrams).
If $ARGUMENTS is empty, abort with: "Please provide a PRD path and optional diagram type. Example: /prd-diagram prd/my-feature/prd.md state-machine"
Read the PRD file. If it does not exist, abort with a clear error message.
prd/my-feature/prd.md → my-featureprd/<feature-name>/diagrams/<type>.mmd (e.g., state-machine.mmd, user-flow.mmd, data-model.mmd)state-machine)Source: Section 10 — State Machines & Lifecycle
Extract state transition tables and generate Mermaid stateDiagram-v2:
stateDiagram-v2
[*] --> Draft
Draft --> Active : Organizer starts competition
Active --> Completed : All fixtures completed
Active --> Cancelled : Organizer cancels
Draft --> Cancelled : Organizer cancels
Completed --> [*]
Cancelled --> [*]
Extraction rules:
[*] for initial and terminal statesstate-machine-<entity>.mmd)user-flow)Source: Section 6 — User Stories & Flows
Extract numbered user flow steps and generate Mermaid flowchart TD:
flowchart TD
A[Landing Page] --> B[Click 'Create Competition']
B --> C{Authenticated?}
C -->|Yes| D[Competition Form]
C -->|No| E[Login Page]
E --> D
D --> F[Add Teams]
F --> G[Generate Fixtures]
G --> H[Competition Active]
Extraction rules:
user-flow-<flow-name>.mmd)data-model)Source: Section 8 — Data Model & Validation Rules
Extract entity definitions and relationships, generate Mermaid erDiagram:
erDiagram
Competition ||--o{ Fixture : has
Competition ||--o{ Standing : tracks
Fixture }o--|| Team : home
Fixture }o--|| Team : away
Fixture ||--o{ MatchEvent : records
Competition {
string id PK
string name
enum status
date startDate
}
Team {
string id PK
string name
int playerCount
}
Extraction rules:
||--o{ (one-to-many), ||--|| (one-to-one), }o--o{ (many-to-many)diagrams/ directory if it doesn't exist.npx claudepluginhub sinositato/tato-claude-plugins --plugin prd-builderGuides creating syntactically valid mermaid diagrams for product docs, with a selection guide for 15 diagram types and syntax rules.
Generates GitHub-renderable Mermaid flowcharts from PRDs, docs, or codebases with evidence maps tracing nodes to sources. Useful for creating user flow diagrams.
Generates and manages Mermaid architecture diagrams as separate traceable files linked to parent SDD documents (BRD, PRD, ADR, SPEC, IPLAN). Handles creation, inline migration, validation, and SVG rendering.