canvas
Create and edit Obsidian Canvas files for architecture visualization
от 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.):
- DISABLE it for
.canvasfiles - Or DISABLE it globally during canvas editing
- 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
- Save
.canvasfile - Verify JSON syntax:
node -e "JSON.parse(require('fs').readFileSync('file.canvas'))" - 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
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл canvas?
Create and edit Obsidian Canvas files for architecture visualization
Как установить скилл canvas?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл canvas запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
AnthropicGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
webapp-testing
AnthropicToolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
brand-guidelines
AnthropicApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
web-artifacts-builder
AnthropicSuite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…