• 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/スキル
SKILLKnowledge Work

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 ボード上でコードベースを高品質で読みやすいビジュアル説明に変換します。

図表は Canvas SVG として構成され、Miro MCP(マルチコンテキストプロトコル、外部ツールとの接続規格)の Canvas ツールでボードに書き込みます。図解は <foreignObject data-type="diagram"> ウィジェット内の Mermaid(図解記述言語)で表現し、補足ドキュメントは <foreignObject data-type="doc"> ウィジェットで表示します。このスキルは「何を描くか」を担当し、Canvas ツールは「どうやって SVG を書くか」を担当します。Canvas ツールの仕組みを記憶から述べず、必ず読み込みます(ステップ 5)。

成果物第一主義: リポジトリのシンボル(ファイル・モジュール・型)は確認済みの場合のみ参照します。推測で創作してはいけません。根拠が不明なものは UNKNOWN/VERIFY(確認待ち)として注記に残します。

0. 入力情報

  1. ボード URL。 不足時は聞きます。成果物を配置するために必須です。特定フレーム内に配置する場合、URL に ?moveToWidget=<frame_id> を含められます。その場合、そのフレーム内にフレーム相対座標で展開します。

  2. 解説対象。 リポジトリ全体、特定サブシステム、または個別の質問。不明確な場合は分析前に対象範囲を確認します。

核となる図解設計原則

以下を全体で適用します。完全なルール集(R1~R9 記法・エッジルール、H1~H4 予算)は references/diagramming-principles.md に記載されているため、ドラフト前に必ず読んでください。 要点:

  • ビューを分ける、1 図表 1 質問(R1/R2)。 システムコンテキスト、実行時アーキテクチャ、モジュール分解、静的構造、実行時動作、アルゴリズム、UX フローは異なる図表です。1つに混在させず、複雑になったら分割します。

  • 記法は意味論と一致(R3)。 UML クラス図 = コード内の実型とそのメンバー。UML シーケンス図 = 1 つの具体的な時系列シナリオ。ERD(実体関連図)= 永続化される実体・テーブル。フローチャート = 他が適さない場合のアーキテクチャ・モジュール・プロセスの汎用フォールバック。

  • 型付きエッジのみ(R4/R8)。 禁止ワード:uses・contains・relates・has・supports・manages・integrates。代わりに型付き動詞を使う:calls(呼び出す)、invokes(起動する)、reads(読む)、writes(書く)、queries(問い合わせる)、persists(永続化する)、publishes(発行する)、subscribes(購読する)、enqueues(キューに入れる)、HTTP/REST/gRPC、imports types(型をインポート)、configures(設定する)、initializes(初期化する)。根拠が不明なら 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 質問のみ)
  • スコープ: 含む・除外
  • 記法: flowchart(フローチャート)・uml_class(クラス図)・uml_sequence(シーケンス図)・entity_relationship(ERD)
  • エッジ意味論(1 行、フローチャート必須):例「コンパイル時依存」「実行時呼び出し」「データ読み書き」
  • 必須要素 が現れるもの
  • オプション:1~3 個のコード位置参照(ファイル・モジュール・関数)で人が辿れるように

最小限のセットで中核を伝える(R2/R5)。1 つの巨大図表より複数の小さい図表を選びます(R7)。

計画をここで正しく立ててください。Canvas ツールで作成後、図表ウィジェットは移動・削除できず、廃棄図表がボードに残るため。

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

選定記法の意味論に一貫性を持たせ、型付きエッジを使用します。根拠不明な部分に UNKNOWN/VERIFY ノートを追加します。まだ Mermaid は書きません。

4. コンパイル前チェック(必須、Mermaid 執筆前)

  • 分割チェック: ドラフトが >15 要素 → 「概要」と「詳細」に分割;>20 → 必須分割。

  • エッジラベルチェック: 禁止ワード(uses・contains・relates・has・supports・manages・integrates)を探し → 型付き動詞または UNKNOWN に置き換え。

  • インポートグラフチェック(R9): フローチャートがモジュール・インポート依存グラフの場合、ラベルなしエッジ + 1 行の凡例注記("--&gt; = コンパイル時依存」)を優先;「型をインポート」「UI コンポーネントをインポート」のようにオブジェクトレベルの意味がある場合だけラベル付け。包含関係はクラスタ・サブグラフまたは注記で表現 — 絶対に「contains」エッジは使わない。

  • フローチャート形状規律(アーキテクチャ・システム・モジュール用フォールバック)— 必須: 平面矩形ノードのみ id[Label] を使用します。決定ダイヤ { }、スタジアム/ターミネータ ( )、サブルーチン [[ ]]、円柱/データベース [( )] や他の特殊 Mermaid 形状は使わないこと。特殊形状はのみ 図表が真のアルゴリズム・制御フロー(R1 の「アルゴリズム」ケース)の場合に許可。これは読み込み指引の例で示された形状多様性をオーバーライド。

  • ERD 概要チェック: 主キー/外部キー/一意制約 + 2~4 個の識別フィールドに絞り、省略ノートを追加。ユーザーが完全スキーマを明示的に要求した場合のみ「ERD 詳細」を別途作成。

5. Canvas 指引を読み込む

作成前に、Miro MCP サーバーから 2 つの指引を読み込みます:まず Canvas コンポーザー指引(SVG ボード形式)、次に記法別の図解形式指引 — flowchart・entity_relationship・uml_class・uml_sequence。Canvas コンポーザー指引は 1 会話に 1 度、図解形式指引は記法ごとに 1 度読み込み、その記法のすべての図表で再利用。両ツールは前提条件と順序を述べます。従います。

読み込み指引は Mermaid エスケープ、カラー規約、ウィジェット仕組みについて権威的です。記憶より指引に従ってください。特に:図表本文のアローは XML エスケープ(--&gt;、--&gt; ではなく)し、SVG 内で生の &・<・&gt; があると全リクエスト失敗。

ステップ 3 の既完成ドラフトを有効な Mermaid(Mermaid 10 構文対象)にコンパイル。コンパイル中に図表意図を変えない。指引のカラー規約を適用して 5 秒スキャンを支援。

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

6. 構成と作成

すべての図表と補足ドキュメントを保持する 1 つ の SVG 構成を構築し、Canvas 作成ツールで単一呼び出しで送信します。

  • 図表ごと 1 つの <foreignObject data-type="diagram">、data-title を計画のタイトルに設定、本文にコンパイル済み Mermaid。

  • ボードはすべての図表ウィジェットを 1600×900 に固定するため、その ピッチでレイアウト — 例:行ごと x で 1600 + ギャップ、行ごと y で 900 + ギャップ、スキャン順に左から右。重複配置は最も一般的な失敗。

  • 補足ドキュメント(ステップ 7)を同一構成に、第 1 図表の左上に配置。

その後、コンポーザー指引に必須の再フロー(reflowループ)を実行:レスポンスが変更寸法を報告したら、result_svg 内でそのウィジェット確認し、Canvas 更新ツールで影響ウィジェットを再配置し、間隔がクリーンになるまで反復。最新 result_svg から編集し、フィードバック;SVG を 0 から再生成せず、記憶から 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 が必要なため、作成呼び出しで doc 本文をタイトルを平文で記述;次の更新呼び出しでリンクをパッチイン。

出力

チャットで報告:

  1. ボードへのリンク(moveToWidget 指定時はフレーム)。
  2. 作成図表(id・タイトル・記法)と補
原文(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 による自動翻訳です。