Command Palette

Search for a command to run...

Назад к скиллам
скилл № 72958

canvas

Create and edit Obsidian Canvas files for architecture visualization

БесплатноБез исполняемых скриптов
DavidROliverBAот DavidROliverBA★ 53 звезды на GitHub

Установить canvas в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

/canvas Skill

Create and edit Obsidian Canvas files (.canvas JSON format) for architecture visualization.

When to Use This Skill

Use when creating or editing .canvas files (Obsidian Canvas format):

  • Create architecture context diagrams (C4 Level 1)
  • Design system landscape maps
  • Visualize data flow architectures
  • Show AWS infrastructure layouts
  • Compare scenarios side-by-side
  • Map system dependencies

⚠️ CRITICAL: Linter Configuration Warning

The Obsidian linter will corrupt .canvas files if enabled. If you have a linter active (prettier, eslint, etc.):

  1. DISABLE it for .canvas files
  2. Or DISABLE it globally during canvas editing
  3. Canvas files use a specific JSON format that lingers may reformat incorrectly

The linter will delete nodes with empty text fields and reduce complex diagrams to 2 nodes.

Canvas JSON Structure

Correct Format

Every node MUST use text property for content (NOT label):

{
  "nodes": [
    {
      "id": "unique-id",
      "type": "text",
      "x": 0,
      "y": 0,
      "width": 200,
      "height": 100,
      "color": "3",
      "text": "Node Content\nMultiline supported\nWith \\n character"
    }
  ],
  "edges": [
    {
      "id": "edge-id",
      "fromNode": "node-id-1",
      "toNode": "node-id-2",
      "fromSide": "right",
      "toSide": "left",
      "label": "Edge Label"
    }
  ],
  "metadata": {
    "version": "1.0-1.0",
    "frontmatter": {}
  }
}

Property Reference

Node Properties:

Property Required Type Values Notes
id ✅ string Any unique ID Use kebab-case
type ✅ string "text" Currently only text type supported
x ✅ number Any integer Canvas X coordinate
y ✅ number Any integer Canvas Y coordinate
width ✅ number Any positive int Node width in pixels
height ✅ number Any positive int Node height in pixels
text ✅ string Any text USE THIS FOR NODE CONTENT (not label)
color ❌ string "1"-"6" Color: 1=red, 2=orange, 3=yellow, 4=purple, 5=cyan, 6=green

Edge Properties:

Property Required Type Values
id ✅ string Any unique ID
fromNode ✅ string ID of source node
toNode ✅ string ID of target node
fromSide ✅ string "top", "right", "bottom", "left"
toSide ✅ string "top", "right", "bottom", "left"
label ❌ string Any text

Metadata:

"metadata": {
  "version": "1.0-1.0",
  "frontmatter": {}
}

Common Mistakes

❌ WRONG: Using label for node content

{"id":"node1","type":"text","x":0,"y":0,"width":100,"height":50,"label":"Node Text"}

Result: Text appears on edges, boxes are empty

✅ CORRECT: Using text for node content

{"id":"node1","type":"text","x":0,"y":0,"width":100,"height":50,"text":"Node Text"}

Result: Text displays inside the box

❌ WRONG: Empty text field

{"id":"node1","type":"text","x":0,"y":0,"width":100,"height":50,"text":""}

Result: Obsidian deletes the node on next edit

✅ CORRECT: No empty fields

Only include properties with values. Don't include text field if empty.

Workflow

Phase 1: Define Canvas Structure

Plan the canvas:

  • Sections/clusters - Group related nodes (e.g., "SOURCE SYSTEMS", "KAFKA EVENT BUS")
  • Nodes - Individual boxes with content
  • Edges - Connections with labels

Example structure:

SECTION HEADERS (120px high, wide)
  ↓
MAIN NODES (100+ px high, sized to fit content)
  ↓
EDGES with labels connecting them

Phase 2: Calculate Coordinates

  • X axis: Left to right (0 → +)
  • Y axis: Top to bottom (0 → +)
  • Group related items with consistent spacing
  • Use 20-30px padding between nodes

Example grid:

(0,0)    (300,0)    (600,0)    (900,0)
  A        B          C          D

(0,100)  (300,100)  (600,100)  (900,100)
  E        F          G          H

Phase 3: Determine Node Heights

Size nodes based on content:

  • Section headers: 40px height
  • Simple labels: 50px height
  • Multi-line (2-3 lines): 70px height
  • Multi-line (4+ lines): 80-100px height
  • Large info boxes: 100px+ height

Add ~10-15px padding for text overflow.

Phase 4: Create JSON

Use text property for all node content. Use label property for edge labels only.

Phase 5: Validate & Test

  1. Save .canvas file
  2. Verify JSON syntax: node -e "JSON.parse(require('fs').readFileSync('file.canvas'))"
  3. Open in Obsidian and verify:
    • All boxes display with text inside (not on edges)
    • Edge labels appear on connections
    • Layout matches intended design
    • Colours display correctly

Examples from This Vault

All of these use correct JSON Canvas format:

  • Canvas - C4 Context Diagram - 9 nodes, 9 edges
  • `Canva
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл canvas?

Create and edit Obsidian Canvas files for architecture visualization

Как установить скилл canvas?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл canvas запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить canvas с