knofler/myai/content-diagram-mermaid

Claude Code and agent skill by knofler/myai

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Generate Mermaid diagrams from code or docs. Sequence, flowchart, ER, state, class diagrams. Triggers: Mermaid diagram, sequence diagram, flowchart, ER diagram, state diagram, class diagram

Install

npx vskill@latest install knofler/myai/content-diagram-mermaid

SKILL.md

The same SKILL.md was published earlier as knofler/myai/content-diagram-mermaid.

Mermaid Diagram Generation Playbook

When to Use

  • Visualizing system architecture or component interactions
  • Documenting API request flows as sequence diagrams
  • Creating ER diagrams from database schemas
  • Mapping state machines or workflow logic
  • Adding visual context to technical documentation

Prerequisites

  • Source material: code, docs, or verbal description of the system
  • Understanding of which diagram type best communicates the concept
  • Target location for the diagram (README, ADR, technical doc)

Playbook

1. Choose Diagram Type
  • Flowchart (graph TD/LR): Decision trees, process flows, architecture overview
  • Sequence (sequenceDiagram): API calls, request lifecycle, multi-service interactions
  • ER (erDiagram): Database schemas, entity relationships
  • State (stateDiagram-v2): Workflow states, lifecycle management
  • Class (classDiagram): Object models, service interfaces
  • Gantt (gantt): Project timelines, milestone planning
2. Gather Information
  • Read relevant source code (routes, models, services)
  • Identify actors, components, or entities to include
  • Map the interactions, transitions, or relationships
  • Determine the level of detail (high-level vs detailed)
3. Build the Diagram
  • Start with the diagram type declaration
  • Add nodes/participants with clear, short labels
  • Define connections with appropriate arrow types
  • Add labels to connections describing the interaction
  • Group related elements with subgraphs where helpful
4. Apply Styling
  • Use consistent node shapes (rounded for services, square for data stores)
  • Apply directional flow: top-down for hierarchies, left-right for sequences
  • Keep labels concise (3-5 words max)
  • Limit diagram to 10-15 nodes for readability
  • Split into multiple diagrams if complexity requires it
5. Validate Rendering
  • Verify syntax renders correctly in GitHub Markdown
  • Check that all connections are visible and not overlapping
  • Ensure labels are readable at normal zoom level
  • Test in Mermaid Live Editor if unsure about syntax
6. Embed in Documentation
  • Place diagram in a fenced code block with mermaid language tag
  • Add a brief caption above or below explaining what the diagram shows
  • Cross-reference the diagram from related documentation
  • Keep diagram source in the same file as the documentation

Output

  • Mermaid diagram code block embedded in Markdown
  • Caption describing the diagram's purpose
  • Updated documentation file with diagram

Review Checklist

  • [ ] Diagram type matches the concept being communicated
  • [ ] All relevant actors/components included
  • [ ] Labels are concise and clear
  • [ ] Diagram renders correctly in GitHub Markdown
  • [ ] Complexity is manageable (split if needed)
  • [ ] Caption provided for context

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/knofler/myai/content-diagram-mermaid/badge)](https://verified-skill.com/skills/knofler/myai/content-diagram-mermaid)

Something wrong with this skill or its page? Tell us.