jpskill.com
💬 コミュニケーション コミュニティ

canvas-layout

Re-layout existing Obsidian Canvas nodes using 6 spatial algorithms: grid (galleries, mood boards), dagre (flowcharts, org charts), radial (mind maps), force-directed (knowledge graphs), linear (timelines), and auto-detect. Preserves group membership, snaps to 20px grid, refits zones around content. Triggers on: canvas layout, re-layout canvas, arrange canvas, auto-layout, organize canvas, fix canvas layout, canvas grid, canvas dagre.

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o canvas-layout.zip https://jpskill.com/download/10541.zip && unzip -o canvas-layout.zip && rm canvas-layout.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/10541.zip -OutFile "$d\canvas-layout.zip"; Expand-Archive "$d\canvas-layout.zip" -DestinationPath $d -Force; ri "$d\canvas-layout.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して canvas-layout.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → canvas-layout フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1
📖 Claude が読む原文 SKILL.md(中身を展開)

この本文は AI(Claude)が読むための原文(英語または中国語)です。日本語訳は順次追加中。

canvas-layout: Re-Layout Canvas Nodes

Read ../canvas/references/layout-algorithms.md for algorithm details and selection guide. Read ../canvas/references/performance-guide.md for node limits.


Workflow

  1. Identify target canvas: Use the active canvas or ask which one (/canvas list to show options).
  2. Select algorithm: Use the user-specified algorithm, or run auto detection.
  3. Confirm before applying: Show what will happen: "Will apply [algorithm] layout to [canvas] ([N] nodes, [M] groups). Create backup? [Y/n]"
  4. Run the layout script:
    python3 scripts/canvas_layout.py [canvas_path] [algorithm] [options]
  5. Report results: "Moved [N] of [M] nodes. [G] groups refitted. Backup at [path].bak"
  6. Validate: Run python3 scripts/canvas_validate.py [canvas_path] to confirm valid output.

Algorithm Selection

When the user says /canvas layout auto or doesn't specify an algorithm, use the auto-detection in the script. It analyzes edge density, node types, and connection patterns.

For explicit requests, map user intent to algorithm:

User says Algorithm Options
"organize these images" grid --sort-by type
"make a grid" grid
"flowchart layout" dagre --direction TB
"left to right flow" dagre --direction LR
"mind map layout" radial
"expand from [node]" radial --center [node-id]
"untangle this" force
"spread out the nodes" force
"make a timeline" linear --axis horizontal
"vertical sequence" linear --axis vertical
"auto-layout" auto
"fix the layout" auto

Options Forwarding

Pass algorithm-specific options to the script:

  • grid: --columns N (override auto-detection), --sort-by type|size
  • dagre: --direction TB|LR|BT|RL
  • radial: --center node-id (override auto-detection of hub node)
  • force: --iterations N (default 100, reduce to 50 for 50+ nodes)
  • linear: --axis horizontal|vertical

Add --dry-run to preview without writing.


For Complex Layouts (30+ Nodes)

When a canvas has more than 30 nodes, dispatch the canvas-layout agent instead of running the script directly. The agent can:

  • Analyze the canvas content to choose sub-groups for different algorithms
  • Split large canvases into zone-by-zone layouts
  • Handle edge crossing minimization that the basic dagre doesn't cover
  • Refine positions after the algorithm runs for better visual balance

Edge Cases

  • Empty canvas: Report "No nodes to layout" and skip.
  • Single node: Center it at (0, 0) and skip.
  • No edges + dagre requested: Warn "dagre works best with edges. Using grid instead." Fall back to grid.
  • 100+ nodes: Warn about performance. Suggest splitting into sub-canvases.
  • Backup conflict: If .bak already exists, use .bak2, .bak3, etc.