スキル一覧に戻る

utility-mermaid-diagrams

product-on-purpose
更新日 2 days ago
1 閲覧
238
33
238
GitHubで表示
メタai

について

このスキルは、適切な図表タイプを選択し構文ルールに従うことで、開発者が有効なMermaid図を作成する方法を指導します。15種類全ての図表タイプを実践例と共に網羅し、検証手法も含まれています。ドキュメントへの図表埋め込みや、レンダリング問題のデバッグにご活用ください。

クイックインストール

Claude Code

推奨
メイン
npx skills add product-on-purpose/pm-skills -a claude-code
プラグインコマンド代替
/plugin add https://github.com/product-on-purpose/pm-skills
Git クローン代替
git clone https://github.com/product-on-purpose/pm-skills.git ~/.claude/skills/utility-mermaid-diagrams

このコマンドをClaude Codeにコピー&ペーストしてスキルをインストールします

ドキュメント

<!-- PM-Skills | https://github.com/product-on-purpose/pm-skills | Apache 2.0 -->

Mermaid Diagrams

Create effective, syntactically valid mermaid diagrams for product documents.

When to Use

  • Creating mermaid diagrams for PRDs, specs, roadmaps, or stakeholder presentations
  • Choosing which of 15 diagram types fits a specific communication need
  • Debugging mermaid code that won't render or renders incorrectly
  • Reviewing diagrams for clarity, accuracy, and accessibility

When NOT to Use

  • Exporting diagrams to image files (PNG/SVG) . that's a rendering tool concern
  • Using non-mermaid diagramming tools (Figma, Lucidchart, draw.io)
  • Creating purely decorative visuals with no informational purpose

The Cardinal Rule

Don't diagram what a list can say.

Diagrams earn their place when they reveal relationships, branching, or flow that prose flattens. Before creating any diagram, ask:

Does this show branching, relationships, or flow that a list or table would flatten?

  • Yes → proceed with a diagram
  • No → use a numbered list, bullet list, or table instead

A 5-step linear process is a list. A 5-step process with two decision points and a retry loop is a diagram.

Diagram Selection Guide

I need to show...UseAlso consider
A decision or approval processFlowchartState
Multi-service or multi-party interactionsSequenceFlowchart
Feature lifecycle or status transitionsStateFlowchart
Work stages or pipeline statusKanbanState
Release or sprint timeline with dependenciesGanttTimeline
Version history or chronological milestonesTimelineGantt
2D prioritization (effort/impact, risk/value)Quadrant.
Allocation breakdown or compositionPieTreemap
Problem decomposition or brainstormingMindmap.
Domain models or data relationshipsERClass
API or object contractsClassER
System topology or infrastructureArchitectureFlowchart
Flow quantities or budget allocationSankeyPie
Hierarchical proportional dataTreemapPie
Trends or time-series metricsXY-Chart.

For worked examples organized by PM task, see references/pm-use-cases.md. For full syntax and options per type, see references/diagram-catalog.md.

Syntax Validity Principles

Six rules that prevent most rendering failures:

  1. Quote labels . Any label containing spaces, parentheses, brackets, colons, commas, or reserved words must be quoted with double quotes
  2. Escape special characters . Characters with mermaid or markdown meaning (>, <, - at line start, #) need escaping or quoting
  3. Declare before referencing . Define a node before using it in an edge; referencing an undeclared node causes silent failures in some types
  4. Respect limits . Each diagram type has a maximum node/participant count beyond which readability collapses (see references/diagram-catalog.md for per-type limits)
  5. Comment your intent . Use %% comments to document non-obvious choices (why this layout direction, why this grouping)
  6. Test before shipping . Paste into a mermaid renderer (mermaid.live, VS Code preview, or your target environment) and verify it renders correctly

For the complete syntax reference, see references/syntax-guide.md.

Instructions

  1. Identify what you're communicating . What relationship, flow, hierarchy, or proportion needs to be visible? Who is the audience?
  2. Apply the cardinal rule . Confirm a diagram adds value over a list or table
  3. Select a diagram type . Use the selection guide above, browse references/pm-use-cases.md by task, or browse references/diagram-catalog.md by type
  4. Plan the diagram . Fill out the planning worksheet in references/TEMPLATE.md: purpose, audience, node inventory, type rationale
  5. Write the mermaid code . Follow references/syntax-guide.md rules; start with the minimal syntax example from references/diagram-catalog.md and expand
  6. Validate . Run through the quality checklist below
  7. Embed . Place the validated mermaid code block in your document

Output Contract

  • Planning artifact: A completed diagram planning worksheet (references/TEMPLATE.md)
  • Final output: A syntactically valid mermaid code block embedded in the target document
  • Quality gate: All items in the quality checklist pass

Quality Checklist

  • Diagram renders without error in target environment
  • Cardinal rule satisfied . a list or table would not communicate this more clearly
  • No linear sequences without branching, relationships, or hierarchy
  • All labels with spaces or special characters are properly quoted
  • Special characters escaped where needed
  • Node/participant count within type-specific limits
  • Colors are accessible (WCAG AA 3:1 contrast minimum, black text on light backgrounds)
  • Color is never the sole differentiator . shapes and labels also distinguish elements
  • Diagram has a descriptive title or surrounding prose context
  • %% comments document any non-obvious layout or grouping choices

References

FilePurpose
references/TEMPLATE.mdDiagram planning worksheet . fill out before writing mermaid code
references/EXAMPLE.mdWorked example: PM creating 4 diagrams for a product launch
references/diagram-catalog.mdAll 15 diagram types: syntax, PM examples, limits, pitfalls
references/pm-use-cases.mdPM task → diagram type mapping with mini worked examples
references/syntax-guide.mdComplete syntax validity rules, escaping, styling, and validation checklist

GitHub リポジトリ

product-on-purpose/pm-skills
パス: skills/utility-mermaid-diagrams
0
agent-skillsai-skillsclaude-codeclaude-desktopdesign-sprintfoundation-sprint

関連スキル

content-collections

メタ

このスキルは、Content Collections(Markdown/MDXファイルを型安全なデータコレクションに変換するTypeScriptファーストのツール)の本番環境でテストされた設定を提供します。Zodバリデーションによる型安全性を実現し、ブログ、ドキュメントサイト、コンテンツ重視のVite + Reactアプリケーション構築時にご利用ください。Viteプラグインの設定、MDXコンパイルから、デプロイ最適化、スキーマバリデーションまで、すべてを網羅しています。

スキルを見る

polymarket

メタ

このスキルは、開発者がPolymarket予測市場プラットフォームを活用したアプリケーション構築を可能にします。API統合による取引や市場データの取得に加え、WebSocketを介したリアルタイムデータストリーミングにより、ライブ取引や市場活動を監視できます。取引戦略の実装や、ライブ市場更新を処理するツールの作成にご利用ください。

スキルを見る

creating-opencode-plugins

メタ

このスキルは、開発者がコマンド、ファイル、LSP操作など25種類以上のイベントタイプにフックするOpenCodeプラグインを作成することを支援します。JavaScript/TypeScriptモジュール向けに、プラグイン構造、イベントAPI仕様、および実装パターンを提供します。カスタムイベント駆動ロジックでOpenCode AIアシスタントのライフサイクルをインターセプト、監視、または拡張する必要がある場合にご利用ください。

スキルを見る

sglang

メタ

SGLangは、高性能なLLMサービングフレームワークであり、RadixAttentionプレフィックスキャッシュを活用したJSON、正規表現、エージェントワークフロー向けの高速で構造化された生成を特長とします。特にプレフィックスが繰り返されるタスクにおいて、大幅に高速な推論を実現し、複雑な構造化出力やマルチターン対話に最適です。制約付きデコードが必要な場合や、広範なプレフィックス共有を伴うアプリケーションを構築する場合は、vLLMなどの代替案ではなくSGLangを選択してください。

スキルを見る