mermaid-diagram-journey — Claude Code rule: usage and setup
mermaid-diagram-journey guides Claude Code to build a Mermaid state diagram for login and onboarding flows straight from project requirements.
AGPL-3.0 ★ 267 updated 2026-02-20
.cursor/rules/mermaid-diagram-journey.mdcWhat mermaid-diagram-journey 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.
What it helps with
- 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 for the agent
- 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
How to install mermaid-diagram-journey
Manually: put the files in place
.cursor/rules/mermaid-diagram-journey.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.claude/rules/mermaid-diagram-journey.mdThe paths frontmatter field limits the files: move globs from the source into paths
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.github/instructions/mermaid-diagram-journey.instructions.mdThe applyTo field sets which files it applies to: move globs from the source into applyTo
Manually: put the files in place
.devin/rules/mermaid-diagram-journey.mdManually: put the files in place
.clinerules/mermaid-diagram-journey.mdStep by step, with commands for each platform: Cursor rules: .mdc files, four modes and what replaced .cursorrules
Questions about mermaid-diagram-journey
How to install mermaid-diagram-journey in Claude Code?
Place the rule file at .claude/rules/mermaid-diagram-journey.md in your project root.
What does mermaid-diagram-journey do?
It instructs the assistant to read requirements and generate a stateDiagram-v2 user journey for authentication flows.
Which language does the rule use for diagram nodes?
The instructions require all state descriptions and node labels in the generated Mermaid diagram to be in Polish.