# mermaid-diagram-journey

mermaid-diagram-journey guides Claude Code to build a Mermaid state diagram for login and onboarding flows straight from project requirements.

- rule · `type=rule` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline · ★ 267 repo stars
- Author: przeprogramowani
- License: AGPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/przeprogramowani/ai-rules-builder/tree/HEAD/.cursor/rules/mermaid-diagram-journey.mdc
- Updated: 2026-02-20
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/rules/mermaid-diagram-journey

## What it does

The rule configures the model as a UX specialist focused on user flow visualization. Claude Code inspects authentication requirements and turns registration, sign-in, and password recovery paths into a structured `stateDiagram-v2` diagram.

Execution follows a strict process. The assistant drafts an initial breakdown inside `user_journey_analysis` tags to map choices, states, and error handling. Then it outputs the diagram using nested states, fork and join markers, and concise state labels.

This workflow expects input specifications inside `.ai/project-prd.md` and commits the resulting diagram to `.ai/diagrams/journey.md` with Polish language labels.

## Install

### Cursor (native platform)

**Manually: put the files in place**
- File: `.cursor/rules/mermaid-diagram-journey.mdc` — Frontmatter: description, globs, alwaysApply

### Claude Code

**Manually: put the files in place**
- File: `.claude/rules/mermaid-diagram-journey.md` — The paths frontmatter field limits the files: move globs from the source into paths

### Codex

**AGENTS.md**
- Codex reads AGENTS.md: paste the rule text there

### GitHub Copilot

**Manually: put the files in place**
- File: `.github/instructions/mermaid-diagram-journey.instructions.md` — The applyTo field sets which files it applies to: move globs from the source into applyTo

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/rules/mermaid-diagram-journey.md`

### Cline

**Manually: put the files in place**
- File: `.clinerules/mermaid-diagram-journey.md`

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/przeprogramowani/ai-rules-builder/tree/HEAD/.cursor/rules/mermaid-diagram-journey.mdc

## When to use it
- map onboarding and sign-in transitions in Mermaid state syntax
- document branching logic for authentication flows
- turn product requirement documents into visual UX paths
- structure parallel and nested user states cleanly

## Example prompts
- Analyze our login PRD and create the user journey diagram
- Generate the authentication state diagram in journey.md
- Map the registration and password recovery flows using Mermaid

## Similar
- [agent-mermaid-diagram-specialist](https://affpapa.org/en/nevibecode/plugins/agent-mermaid-diagram-specialist.md) — plugin · ★ 2707 repo stars
- [external-diagram-mermaid-generate](https://affpapa.org/en/nevibecode/skills/external-diagram-mermaid-generate.md) — skill · 5600 installs
- [mermaid-diagram-generator](https://affpapa.org/en/nevibecode/skills/mermaid-diagram-generator.md) — skill · 348 installs
- [mermaid-diagram-specialist](https://affpapa.org/en/nevibecode/skills/mermaid-diagram-specialist.md) — skill · 145 installs
- [user-journey-mapping](https://affpapa.org/en/nevibecode/skills/user-journey-mapping.md) — skill · 102 installs
- [product-ux-expert](https://affpapa.org/en/nevibecode/skills/product-ux-expert.md) — skill · 212 installs

From the same set: [przeprogramowani/ai-rules-builder](https://affpapa.org/en/nevibecode/by/przeprogramowani/ai-rules-builder.md) — 24 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
