Skip to content
cccskills
FreePublished on GitHub

craft-whiteboard-excalidraw

Craft のホワイトボードに Excalidraw 要素を追加・描画するときに必ず使うスキル。whiteboardElements_add を使う場面、Craft ホワイトボードに図を描く場面、 Excalidraw の JSON を Craft に反映させる場面では常にこのスキルを参照すること。

label 内包記法や cameraUpdate を使うと Craft でテキストが消えるため、 このスキルの互換フォーマットに従う必要がある。

The English summary is being prepared. Showing the original description.

Run score Not tested

See how to install

Files included (1)

  • SKILL.md6.3 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Craft ホワイトボード × Excalidraw 互換ガイド

背景・発見した問題

Craft のホワイトボードは Excalidraw を内蔵しているが、 バージョンが古いため、Excalidraw の新しい記法に対応していない。

具体的に問題になるのは以下の2点:

問題の記法症状
シェイプへの label 内包テキストが全消えする
cameraUpdate 疑似要素エラー・警告の原因になる

ルール:使ってはいけない記法

❌ NG: label 内包記法(新しい Excalidraw 記法)

{ "type": "rectangle", "id": "r1", "label": { "text": "顧客", "fontSize": 18 } }
{ "type": "arrow",     "id": "a1", "label": { "text": "① 注文", "fontSize": 16 } }

❌ NG: cameraUpdate 疑似要素

{ "type": "cameraUpdate", "id": "cam1", "width": 800, "height": 600, "x": 0, "y": -10 }

ルール:正しい互換記法

✅ OK: テキストを独立した text 要素として分離する

シェイプ側に boundElements、テキスト側に containerId で双方向に紐付ける。

矩形の場合

{
  "type": "rectangle",
  "id": "r_user",
  "x": 15, "y": 38, "width": 130, "height": 42,
  "backgroundColor": "#a5d8ff",
  "fillStyle": "solid",
  "strokeColor": "#4a9eed",
  "strokeWidth": 2,
  "roundness": { "type": 3 },
  "boundElements": [{ "id": "t_user", "type": "text" }]
},
{
  "type": "text",
  "id": "t_user",
  "containerId": "r_user",
  "x": 15, "y": 38, "width": 130, "height": 42,
  "text": "顧客",
  "fontSize": 18,
  "fontFamily": 1,
  "textAlign": "center",
  "verticalAlign": "middle",
  "strokeColor": "#1a5276"
}

ポイント: テキストの x,y,width,height はコンテナ矩形と同じ値にする。

矢印ラベルの場合

{
  "type": "arrow",
  "id": "a_m1",
  "x": 80, "y": 115, "width": 180, "height": 0,
  "points": [[0, 0], [180, 0]],
  "strokeColor": "#4a9eed",
  "strokeWidth": 2,
  "endArrowhead": "arrow",
  "boundElements": [{ "id": "t_m1", "type": "text" }]
},
{
  "type": "text",
  "id": "t_m1",
  "containerId": "a_m1",
  "x": 115, "y": 100, "width": 110, "height": 20,
  "text": "① 注文",
  "fontSize": 14,
  "fontFamily": 1,
  "textAlign": "center",
  "verticalAlign": "middle",
  "strokeColor": "#1a5276"
}

ポイント: テキストの x は矢印の中点付近に配置する(arrow.x + width/2 - textWidth/2)。


テキスト位置の計算方法

矩形内テキスト

テキストの x,y,width,height = コンテナ矩形と同値でよい。 Excalidraw が textAlign: center / verticalAlign: middle に基づいて自動センタリングする。

矢印ラベル

矢印の中点に配置する:

midX = arrow.x + (points の dx の合計) / 2
midY = arrow.y + (points の dy の合計) / 2

text.x = midX - textWidth / 2
text.y = midY - 10  (矢印の少し上)

適用例:シーケンス図の場合

互換フォーマットの適用例として、シーケンス図でよく使う要素を示す。 他の図種(フローチャート、マインドマップ等)でも、基本ルール(独立 text + containerId)は同じ。

アクター(矩形 + テキスト)

{ "type": "rectangle", "id": "r_{name}",
  "x": {X}, "y": 38, "width": 130, "height": 42,
  "backgroundColor": "{COLOR_FILL}", "fillStyle": "solid",
  "strokeColor": "{COLOR_STROKE}", "strokeWidth": 2,
  "roundness": { "type": 3 },
  "boundElements": [{ "id": "t_{name}", "type": "text" }] },
{ "type": "text", "id": "t_{name}", "containerId": "r_{name}",
  "x": {X}, "y": 38, "width": 130, "height": 42,
  "text": "{ラベル}", "fontSize": 18, "fontFamily": 1,
  "textAlign": "center", "verticalAlign": "middle",
  "strokeColor": "{TEXT_COLOR}" }

ライフライン(縦の点線)

{ "type": "arrow", "id": "l_{name}",
  "x": {CENTER_X}, "y": 80, "width": 0, "height": 390,
  "points": [[0, 0], [0, 390]],
  "strokeColor": "#b0b0b0", "strokeStyle": "dashed",
  "strokeWidth": 1, "endArrowhead": null }

メッセージ矢印(矢印 + テキスト)

{ "type": "arrow", "id": "a_{msg}",
  "x": {FROM_X}, "y": {Y}, "width": {DX}, "height": 0,
  "points": [[0, 0], [{DX}, 0]],
  "strokeColor": "{COLOR}", "strokeWidth": 2,
  "strokeStyle": "solid",
  "endArrowhead": "arrow",
  "boundElements": [{ "id": "t_{msg}", "type": "text" }] },
{ "type": "text", "id": "t_{msg}", "containerId": "a_{msg}",
  "x": {FROM_X + DX/2 - textWidth/2}, "y": {Y - 15},
  "width": {textWidth}, "height": 20,
  "text": "{ラベル}", "fontSize": 14, "fontFamily": 1,
  "textAlign": "center", "verticalAlign": "middle",
  "strokeColor": "{TEXT_COLOR}" }

Excalidraw create_view → Craft への変換チェックリスト

Excalidraw の create_view で図を描いた後、Craft の whiteboardElements_add に渡す前に確認:

  • label プロパティがあるシェイプ → 独立した text 要素に分離
  • cameraUpdate 要素 → 削除する
  • 各テキスト要素に containerId が設定されているか
  • 各シェイプの boundElements にテキスト ID が含まれているか
  • テキスト要素の x,y がコンテナ内に収まる位置か

注意事項

  • fontFamily: 1 は Excalidraw 標準フォント(Virgil)を指す
  • roughness: 1 がデフォルト。整った印象にしたい場合は roughness: 0 を使う
  • Craft の whiteboardElements_add は id が重複すると上書きされるため、 同一ホワイトボードに追加する場合は一意な ID を使うこと

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

/ai-fluency-check と入力されたときだけ起動するAIフルーエンシー自己評価スキル。Anthropicの4D AI Fluency Framework(Delegation / Description / Discernment / Diligence)に基づく18項目のルーブリックを使い、対話的に自己評価する。過去の評価記録と比較して成長を可視化し、研究根拠にもとづく改善アドバイスと参考文献を提供する。ユーザーが /ai-fluency-check と明示的に入力した場合のみ使用すること。自動起動・推測起動は一切しない。

The English summary is being prepared. Showing the original description.

toiee-kameda/libehub-skills2Updated Sep 18, 2026

/coach-me と入力されたときだけ起動する、Learning by Doing コーチングスキル。現在の会話を分析し、Anthropicの4D AIフルーエンシーフレームワーク(Delegation / Description / Discernment / Diligence)に基づいて「うまくできていた点」「改善できる点」「次回に使えるプロンプト例」をフィードバックする。オプションで /coach-me 詳細 または /coach-me --detail と入力すると次元ごとの深掘りフィードバックを提供。自動起動は一切しない。ユーザーが /coach-me と明示的に入力した場合のみ使用すること。

The English summary is being prepared. Showing the original description.

toiee-kameda/libehub-skills2Updated Sep 18, 2026

/context-builder と入力されたときだけ起動する、コンテキストドキュメント作成インタビュースキル。人・プロジェクト・プロダクトなどの対象について、1問ずつ掘り下げる対話を通じて情報を集め、今後 Claude との対話の冒頭に貼り付けるための context.md(自分についてなら aboutme.md)を作り上げる。/context-builder me(自分=aboutme)/ project / product のように対象を指定できる。「aboutme を作りたい」「プロジェクトのコンテキストをまとめたい」「プロダクトの前提情報を用意したい」ときに使う。自動起動はせず、ユーザーが /context-builder と明示的に入力した場合のみ使用すること。

The English summary is being prepared. Showing the original description.

toiee-kameda/libehub-skills2Updated Sep 18, 2026

セールスレターを書き始める前に、素材(読者・約束・抵抗・証拠・価格や保証などの確定事項)を一問ずつ執拗に聞き出すスキル。「セールスレターについて質問攻めして」「レターを書く前にヒアリングして」「素材を聞き出して」「grillして」、または具体性の乏しいブリーフのままセールスレター執筆を依頼されたときに使う。コピーライティングの「構想メモ」を、書く前に埋めるための対話手順。このスキル自体はレター本文を書かない。

The English summary is being prepared. Showing the original description.

toiee-kameda/libehub-skills2Updated Sep 18, 2026

eli5

Free

5歳の子どもにもわかるように、要望されたテーマを説明します。ユーザーが /eli5 "テーマ" と入力したとき、または何かの仕組みをとても簡単な図解で説明してほしいと頼んだときに使います

The English summary is being prepared. Showing the original description.

toiee-kameda/libehub-skills2Updated Sep 18, 2026

Claude特有の機能を習熟するために、活用ヒントを提案する

The English summary is being prepared. Showing the original description.

toiee-kameda/libehub-skills2Updated Sep 18, 2026

See all skills by toiee-kameda

Report a problem with this skill