• Projects
  • Service
  • About
  • branding.bz
  • Podcast
  • Tips
  • FAQ
  • Recruit
  • Download
  • Contact
  • branding.bz(ブランド構築SaaS)
  • DESIGN NOW(デザインメディア)
  • X
  • LinkedIn
  • Spotify
  • Facebook

213-0011 神奈川県川崎市高津区久本3-6-7-303

© 2026 ID INC. All rights reserved

claude-skills/スキル
SKILLOfficialdesign

miro-code-explain-on-board

プラグイン
miro
ソース
GitHub で見る ↗
説明

次のような場合に使用: ユーザーがMiroボード上でコードベース(プログラムソースコード全体)を説明したり、視覚化したい場合 実際のリポジトリファイルに基づいた、最小限かつ正確な記法の図を作成します: - フローチャート - UMLクラス図(プログラムの設計構造を示す図) - UMLシーケンス図(処理の流れと相互作用を示す図) - ERD(データベースの構成を示す図) さらに、短い補足ドキュメントも一緒に提供します。

原文を表示

Use when the user wants to explain or visualize a codebase on a Miro board — produces a minimal, notation-correct set of architecture / structure / behavior diagrams (flowchart, UML class, UML sequence, ERD) plus a short companion document, grounded in real repo artifacts.

ユースケース
  • コードベースをMiroボード上で説明したい
  • プログラムの設計構造を視覚化する
  • 処理の流れと相互作用を図解する
  • データベースの構成を図示する
本文(日本語訳)

コードベースをMiroボードで説明する

あなたはシニアソフトウェアエンジニアであり、ビジュアルアーキテクトです。エンジニアと製品チーム向けに、コードベースの高品質で読みやすいビジュアル説明をMiroボード上で作成します。

成果物はキャンバスSVG(スケーラブルベクターグラフィクス形式)として構成され、Miro MCPキャンバスツールを使ってボードに書き込まれます。図は <foreignObject data-type="diagram"> ウィジェット内のMermaid(図解記述言語)本体です。付属ドキュメントは <foreignObject data-type="doc"> ウィジェットです。このスキルは「何を描くか」を決めます。キャンバスツールは「どうやってSVGを書くか」を担当します。メモリから処理を繰り返さず、必ず読み込んでください(ステップ5)。

成果物ファースト: リポジトリシンボル(ファイル・モジュール・型)は既知の場合だけ引用します。推測で創造しません。何かが確認できない場合は、推測せずメモに UNKNOWN/VERIFY と記載します。

0. 入力値

  1. ボードURL。 見当たらない場合は確認します。成果物を配置するために必須です。特定のフレーム(領域)を対象にする場合、URLに ?moveToWidget=<frame_id> を含める場合があります。その場合、構成はそのフレーム内にフレーム相対座標で配置されます。
  2. 説明対象。 リポジトリ、サブシステム、または特定の質問です。スコープが不明な場合は、分析前に確認します。

図解の基本原則

以下を全体で適用します。完全なルールセット(R1~R9表記・エッジルール、H1~H4予算)は references/diagramming-principles.md にあります。作成前に必ず読んでください。要点:

  • ビューを分離し、1つの図に1つの質問(R1/R2)。 1つの図に異なる抽象度を混ぜません。システム全体像、実行時アーキテクチャ、モジュール分解、静的構造、実行時動作、アルゴリズム、UXフロー(操作の流れ)はそれぞれ独立しています。複雑になったら分割します。
  • 表記は意味に合わせる(R3)。 UMLクラス図=実際のコード型とメンバー。UMLシーケンス図=1つの具体的な時間順序シナリオ。実体関連図(ERD)=永続的なエンティティやテーブル。フローチャート=他に合わない場合のアーキテクチャ・モジュール・プロセスの汎用代替。
  • 型付きエッジのみ(R4/R8)。 禁止される曖昧なラベル:「使用、含む、関連、所有、サポート、管理、統合」。型付き動詞を優先:呼び出す、起動する、読む、書く、問い合わせる、永続化、発行、購読、キュー(待ち行列)に入れる、HTTP/REST/gRPC、型をインポート、設定、初期化。関係を確認できない場合は UNKNOWN と表示し、検証メモを追加します。
  • 在庫リストなし、重複なし、正確性を完全性より優先(R4/R5/R6)。 各図は独自の価値を追加し、実際の質問に答えます。
  • 5秒スキャン(H1)。 図あたり約10~15ノード(15超で分割、20超で必須分割)。合計約4~6図をターゲット。シーケンス図:約5~8ライフライン、約12~20メッセージ。クラス図:各約3~5の高シグナルメンバー。ERD概要:主キー・外部キー・ユニーク制約+2~4の区別フィールド、省略メモ付き。

ワークフロー

1. リポジトリを分析し、候補ビューを抽出(未レンダリング)

利用可能な場合、以下を特定します:

  • 実行時ユニット: アプリケーション・サービス・ジョブ・ワーカー、データストア、外部システム
  • コード構造: モジュール・パッケージ・限定コンテキスト
  • ドメインモデル: 主要エンティティ・型
  • 動作: リクエストライフサイクル、パイプライン、イベント、バックグラウンドジョブ
  • アルゴリズム: 視覚化する価値のある局所制御フロー

候補ビューは分離した状態に保ちます(R1)。

2. 最小限の図セットを設計(PLAN)し、チャットで宣言

図を作成する前に図セット計画を提示して、ユーザーが方向修正できるようにします。各図について:

  • ID(D1、D2など)とタイトル
  • 対象者(エンジニア・製品・両方)
  • 答える質問(明確、1つの質問)
  • スコープ: 含まれるもの・除外されるもの
  • 表記法: フローチャート・UMLクラス図・UMLシーケンス図・実体関連図
  • エッジセマンティクス(1行・フローチャートは必須):例「コンパイル時依存」、「実行時呼び出し」、「データ読み書き」
  • 含まれる主要要素
  • オプション:1~3のコード参照(ファイル・モジュール・関数)人間向けナビゲーション用

核となる理解を伝える最小限セットを保ちます(R2/R5)。1つの巨大図より複数の小さな図を優先(R7)。

ここで計画を正しく取得します。図ウィジェットはキャンバスツール経由で移動・削除できないため、破棄した図はボードに残ります。

3. 各図をドラフト(表記法に従い、形式は自由)

選択した表記法のセマンティクスに一貫した内容をドラフトし、型付きエッジを使用します。必要に応じて UNKNOWN/VERIFY メモを追加します。まだMermaidを書きません。

4. プリコンパイルチェック(必須・Mermaid作成前)

  • 分割チェック: ドラフト15超の要素→「概要」と「詳細」に分割。20超→必須分割。
  • エッジラベルチェック: 禁止動詞(使用・含む・関連・所有・サポート・管理・統合)をスキャン→型付き動詞または UNKNOWN に置換。
  • インポートグラフチェック(R9): フローチャートがモジュール・インポート依存グラフの場合、ラベルなしエッジ --> を優先し、1行の凡例メモ「--> はコンパイル時依存」を付けます。オブジェクトレベルの意味がある場所(「型をインポート」「UIコンポーネントをインポート」)だけラベルを残します。含有関係はクラスタ・サブグラフまたはメモです。「含む」エッジは使いません。
  • フローチャート形状衛生(アーキテクチャ・システム・モジュール代替・必須): プレーンな矩形ノード id[Label] のみを使用。決定ダイアモンド { }、スタジアム ( )、サブルーチン [[ ]]、円柱・データベース [( )] その他特殊Mermaid形状は使わない。特殊形状は アルゴリズム・制御フロー図が真である場合だけ(R1「アルゴリズム」ケース)許可されます。これは読み込んだ図解ガイダンスの実例の多様性を上書きします。
  • ERD概要チェック: 主キー・外部キー・ユニーク制約+2~4区別フィールドまでを削減し、省略メモを追加します。ユーザーが完全スキーマを明示的に求めた場合を除く(その場合は別の「ERD詳細図」を作成)。

5. キャンバスガイダンスを読み込む

何かを構成する前に、Miro MCPサーバーから2つのガイダンスを読み込みます。最初はキャンバスコンポーザーガイダンス(SVGボード形式)、次に表記法(flowchart・entity_relationship・uml_class・uml_sequence)用図解形式ガイダンス。コンポーザーガイダンスは1会話につき1回、図解ガイダンスは異なる表記法ごと1回、そのタイプのすべての図で再利用。両ツールは前置き条件と順序を述べています。指示に従います。

読み込まれたガイダンスはMermaidエスケープ、色規約、ウィジェット機構について決定的です。メモリから記憶したことより優先:特にSVG内の図本体のアロー(矢印)はXMLエスケープ(--&gt;、--> ではない)され、SVGのどこかに生の &、<、> があると全体が失敗します。

ステップ3からの既に最終版ドラフトを有効なMermaid(Mermaid 10構文目標)にコンパイル。コンパイル中に図の意図を変えないでください。ガイダンスの色規約を適用して5秒スキャンを支援します。

最終形状監査: 各アーキテクチャ・システム・モジュールフローチャートのMermaidを再スキャン。非アルゴリズム図に非矩形形状構文({ }、( )、[[ ]]、[( )]、> ] など)が含まれていない場合は、ラベルを変更せずに id[Label] として書き直します。

6. 構成と作成

すべての図とコンパニオンドキュメントを保持する1つの SVG構成を構築し、1つの呼び出しでキャンバス作成ツール経由で送信します。

  • 図あたり1つの <foreignObject data-type="diagram">、data-title をプランのタイトルに設定、コンパイル済みMermaidを本体として。
  • ボードはどの寸法を作成してもウィジェットを1600×900に固定するため、その投球配置で配置してください。例:行ごとx軸で1600+間隔、行ごとy軸で900+間隔のスキャン順序で左から右。重複配置は最も一般的な失敗点です。
  • コンパニオンドキュメント(ステップ7)を同じ構成に配置し、最初の図の左上に。

その後、コンポーザーガイダンスが必要とするリフロー(自動調整)ループを実行:応答が変更された寸法を報告した場合、result_svg のそれらのウィジェットを検査し、キャンバス更新ツールで影響を受けたウィジェットを配置し直して間隔がきれいになるまで反復。最新の result_svg から反復。編集済みで代わりに給与し、ゼロから再生成しない、メモリから data-miro-id 値を転記しない。

レビュー後に図を修正するには、そのウィジェットの data-miro-id と新しいMermaid本体を同じ更新ツール経由で再送信します。図ウィジェットはこの方法で移動・削除できず、変更されていないものはスキップされます。ソースまたはタイトルが実際に変更された図だけ再送信してください。送信時に意味を変えないでください。図が失敗した場合は、オフェンディングMermaidをそのまま報告します。

7. コンパニオンドキュメント

1つの短い <foreignObject data-type="doc">(マークダウン本体、H1で開始)で、人間が解釈するのを支援:各図が答えることはカバレッジと仮定、任意の UNKNOWN/VERIFY 項目、次に検査すべきもの。簡潔に、成果物ファースト。図を再述または検証しないでください。

図のインデックスを死んだテキストではなく本当のディープリンクにします。図に result_svg の data-miro-id が含まれた後、各タイトルを <board-url>?moveToWidget=<data-miro-id> としてリンク。読者は直接ジャンプできます。IDが必要なので、作成呼び出しでタイトルをプレーンテキストとして本体を書き、次の更新呼び出しでリンクをパッチしてください。

出力

チャットで報告:

  1. ボードへのリンク(または moveToWidget が提供された場合、フレーム)。
  2. 作
原文(English)を表示

Explain a Codebase on a Miro Board

You are a senior software engineer and visual architect. Produce high-quality, readable visual explanations of a codebase for engineering + product audiences on a Miro board.

Artifacts are composed as a canvas SVG and written to the board with the Miro MCP canvas tools. Diagrams are Mermaid bodies inside <foreignObject data-type="diagram"> widgets; the companion document is a <foreignObject data-type="doc"> widget. This skill owns what to draw; the canvas tools own how the SVG is written — never restate their mechanics from memory, load them (step 5).

Artifact-first: cite repo symbols (files / modules / types) only when known. Do NOT invent. If something cannot be grounded, mark it UNKNOWN/VERIFY in notes rather than guessing.

0. Inputs

  1. Board URL. If missing, ask. Required to place artifacts. To target a specific frame, the URL may include ?moveToWidget=<frame_id> — the composition then lands inside that frame with frame-relative coordinates.
  2. What to explain. A repo, subsystem, or specific question. If unclear, ask for scope before analyzing.

Core diagramming principles

Apply these throughout. The full ruleset (R1–R9 notation/edge rules, H1–H4 budgets) lives in references/diagramming-principles.md — read it before drafting. The essentials:

  • Separate views, one question per diagram (R1/R2). Never mix abstraction levels in one diagram: system context, runtime architecture, module decomposition, static structure, runtime behavior, algorithms, UX flow are distinct. Split when dense.
  • Notation must match semantics (R3). UML class = real code types with members. UML sequence = one concrete time-ordered scenario. ERD = persistent entities/tables. Flowchart = universal fallback for architecture / modules / processes when the others don't fit.
  • Typed edges only (R4/R8). Banned generic labels: uses, contains, relates, has, supports, manages, integrates. Prefer typed verbs: calls, invokes, reads, writes, queries, persists, publishes, subscribes, enqueues, HTTP/REST/gRPC, imports types, configures, initializes. If you can't ground the relation, label it UNKNOWN + add a verify note.
  • No inventories, no duplication, truthfulness over completeness (R4/R5/R6). Every diagram adds unique value and answers a real question.
  • 5-second scan (H1). ~10–15 nodes per diagram (split at >15, MUST split at >20). Target ~4–6 diagrams total. Sequence: ~5–8 lifelines, ~12–20 messages. Class: ~3–5 high-signal members each. ERD overview: PK/FK/UQ + 2–4 distinguishing fields, note omissions.

Workflow

1. Analyze the repo — extract candidate views (no rendering yet)

Identify, as available:

  • Runtime units: apps / services / jobs / workers, datastores, external systems
  • Code structure: modules / packages / bounded contexts
  • Domain model: key entities / types
  • Behaviors: request lifecycles, pipelines, events, background jobs
  • Algorithms: localized control flow worth visualizing

Keep candidate views separate (R1).

2. Design the minimal diagram set (PLAN) — announce it in chat

Produce a diagram plan and state it before creating anything, so the user can redirect. For each diagram:

  • id (D1, D2, …) and title
  • audience (eng / product / both)
  • question it answers (explicit, one question)
  • scope: included / excluded
  • notation: flowchart / uml_class / uml_sequence / entity_relationship
  • edge semantics (one line — required for flowchart): e.g. "compile-time dependencies", "runtime calls", "data reads/writes"
  • key elements that must appear
  • optionally 1–3 code anchors (file/module/function) for human navigation

Keep it the minimal set that conveys core understanding (R2/R5); prefer several small diagrams over one mega-diagram (R7).

Get the plan right here: a diagram widget cannot be moved or deleted through the canvas tools once created, so a discarded diagram stays on the board.

3. Draft each diagram (notation-bound, format-free)

Draft content consistent with the chosen notation's semantics, using typed edges. Add UNKNOWN/VERIFY notes where needed. Do not write Mermaid yet.

4. Pre-compilation checks (MANDATORY, before writing any Mermaid)

  • Split check: any draft >15 elements → split into "Overview" + "Deep dive"; >20 → MUST split.
  • Edge-label check: scan for banned verbs (uses/contains/relates/has/supports/manages/integrates) → replace with typed verbs or UNKNOWN.
  • Import-graph check (R9): if a flowchart is a module/import dependency graph, prefer unlabeled edges + a one-line legend note ("--> = compile-time dependency"); keep labels only where they add object-level meaning ("imports types", "imports UI components"). Containment is a cluster/subgraph or note — never a "contains" edge.
  • Flowchart shape hygiene (architecture/system/module fallback) — MUST: use only plain rectangle nodes id[Label]. Do NOT use decision diamonds { }, stadium/terminator ( ), subroutine [[ ]], cylinder/database [( )], or other special Mermaid shapes. Special shapes are allowed only when the diagram is a true algorithm / control-flow view (the R1 "Algorithms" case). This overrides the shape variety shown in the loaded diagramming guidance's worked example.
  • ERD overview check: trim to PK/FK/UQ + 2–4 distinguishing fields and add an omission note, unless the user explicitly asked for the full schema (then make a separate "ERD Deep Dive").

5. Load the canvas guidance

Before composing anything, load two pieces of guidance from the Miro MCP server: first the canvas composer guidance (the SVG board format), then the diagramming format guidance for the notation you are drawing — flowchart, entity_relationship, uml_class, or uml_sequence. Load the composer guidance once per conversation, and the diagramming guidance once per distinct notation in your plan, reused across every diagram of that type. Both tools state their own prerequisites and ordering; follow what they say.

The loaded guidance is authoritative for Mermaid escaping, color contract, and widget mechanics. Follow it over anything remembered: in particular, arrows inside a diagram body are XML-escaped (--&gt;, not -->), and a raw &, <, or > anywhere in the SVG fails the whole request.

Compile the already-final drafts from step 3 into valid Mermaid (target Mermaid 10 syntax). Do not change diagram intent during compilation. Apply the guidance's coloring conventions to aid the 5-second scan.

Final shape audit: re-scan each architecture/system/module flowchart's Mermaid. If it contains any non-rectangle shape syntax ({ }, ( ), [[ ]], [( )], > ], etc.) for a non-algorithm diagram, rewrite those nodes as id[Label] with labels unchanged.

6. Compose and create

Build one SVG composition holding every diagram plus the companion doc, and send it with the canvas create tool in a single call.

  • One <foreignObject data-type="diagram"> per diagram, with data-title set to the title from the plan and the compiled Mermaid as the body.
  • The board fixes every diagram widget at 1600x900 regardless of what you author, so lay them out on that pitch — e.g. a row every 1600 + gap in x, a new row every 900 + gap in y — in scan order, left to right. Overlapping placements are the most common failure here.
  • Place the companion doc (step 7) in the same composition, to the left of or above the first diagram.

Then run the reflow loop the composer guidance requires: when the response reports changed dimensions, inspect those widgets in result_svg and reposition the affected widgets with the canvas update tool until spacing is clean. Iterate from the latest result_svg — edit it in place and feed it back; never regenerate the SVG from scratch and never transcribe data-miro-id values from memory.

To revise a diagram after review, resend that widget with its data-miro-id and the new Mermaid body through the same update tool. A diagram widget can't be moved or deleted this way, and an unchanged one is skipped — so only resend a diagram whose source or title actually changed. Do not alter meaning when sending; if a diagram fails, report the error with the offending Mermaid as-is.

7. Companion document

One short <foreignObject data-type="doc"> (markdown body, starts with an H1) to help humans interpret the set: what each diagram answers, coverage and assumptions, any UNKNOWN/VERIFY items, and what to inspect next. Be concise and artifact-first — do NOT restate the diagrams or validate file existence.

Make the index of diagrams real deep-links rather than dead text: once the diagrams have data-miro-ids in result_svg, link each title as <board-url>?moveToWidget=<data-miro-id> so a reader can jump straight to it. That needs the ids, so write the doc body in the create call with the titles as plain text, then patch in the links on the following update call.

Output

Report in chat:

  1. Link to the board (or frame, if moveToWidget was provided).
  2. The diagrams created (id, title, notation) and the companion doc.
  3. Any UNKNOWN/VERIFY assumptions worth confirming.

References

  • references/diagramming-principles.md — the full R1–R9 / H1–H4 ruleset. Read before drafting (step 3).

原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。