canvas-create: Create New Canvases
Operations
Blank Canvas (/canvas create [name])
- Slugify the name: lowercase, spaces to hyphens, strip special chars.
- Determine canvas directory (see canvas orchestrator for context detection).
- Create
[canvas_dir]/[slug].canvas with starter structure:
{
"nodes": [
{
"id": "zone-default",
"type": "group",
"label": "General",
"x": -400, "y": -140, "width": 800, "height": 400, "color": "4"
},
{
"id": "title",
"type": "text",
"text": "# [Name]\n\nDrop images, PDFs, and notes here.",
"x": -400, "y": -300, "width": 400, "height": 120, "color": "6"
}
],
"edges": []
}
Note: Groups MUST come before content nodes in the array (z-index ordering — groups render behind content).
- Report: "Created [canvas_dir]/[slug].canvas. Open it in Obsidian to view."
Templated Canvas (/canvas create [name] from [template])
- Validate template name against the 12 archetypes.
- If no template name given or unclear, show available templates:
presentation — Slide deck (1200x675, Advanced Canvas)
flowchart — Process flow (Sugiyama/dagre layout)
mind-map — Radial center-out expansion
gallery — Grid of image nodes
dashboard — Metric cards + charts + zones
storyboard — Linear scene cards + script annotations
knowledge-graph — Force-directed entity map
mood-board — Asymmetric image grid
timeline — Horizontal event sequence
comparison — Side-by-side columns
kanban — Column zones (Todo/Doing/Done)
project-brief — Hero zone + objectives + deliverables
- Ask the user for template-specific parameters (title, number of items, color scheme).
- Delegate to canvas-template skill for instantiation.
- MANDATORY: Replace ALL placeholder text in every node with real, relevant content based on the title and topic. This is not optional:
- Read the generated canvas JSON
- For each text node, replace generic text ("Describe this step", "YYYY-MM-DD", "Value: 0") with real content relevant to the canvas title
- Use the Edit tool to update each node's
text field
- This is the difference between a skeleton and a finished canvas
- Run
python3 scripts/canvas_validate.py <path> to verify validity.
- Report the created canvas with node/zone counts.
Slug Generation
import re
def slugify(name):
slug = name.lower().strip()
slug = re.sub(r'[^a-z0-9\s-]', '', slug)
slug = re.sub(r'[\s]+', '-', slug)
slug = re.sub(r'-+', '-', slug)
return slug.strip('-')
Directory Rules
- Vault mode (
wiki/canvases/ exists): create there, media to _attachments/images/canvas/
- Standalone mode: create in
.canvases/, media to .canvases/assets/
- Create the directory if it doesn't exist.
- Never overwrite an existing canvas without asking the user.
1---2name: canvas-create3description: Create new Obsidian Canvas files — blank with a starter structure, or from one of 12 template archetypes (presentation, flowchart, mind-map, gallery, dashboard, storyboard, knowledge-graph, mood-board, timeline, comparison, kanban, project-brief). Handles directory creation, slug generation, and starter zone setup. Triggers on: canvas create, create canvas, new canvas, canvas new, start canvas.4---56# canvas-create: Create New Canvases78---910## Operations1112### Blank Canvas (`/canvas create [name]`)13141. Slugify the name: lowercase, spaces to hyphens, strip special chars.152. Determine canvas directory (see canvas orchestrator for context detection).163. Create `[canvas_dir]/[slug].canvas` with starter structure:1718```json19{20 "nodes": [21 {22 "id": "zone-default",23 "type": "group",24 "label": "General",25 "x": -400, "y": -140, "width": 800, "height": 400, "color": "4"26 },27 {28 "id": "title",29 "type": "text",30 "text": "# [Name]\n\nDrop images, PDFs, and notes here.",31 "x": -400, "y": -300, "width": 400, "height": 120, "color": "6"32 }33 ],34 "edges": []35}36```3738Note: Groups MUST come before content nodes in the array (z-index ordering — groups render behind content).39404. Report: "Created [canvas_dir]/[slug].canvas. Open it in Obsidian to view."4142### Templated Canvas (`/canvas create [name] from [template]`)43441. Validate template name against the 12 archetypes.452. If no template name given or unclear, show available templates:4647```48presentation — Slide deck (1200x675, Advanced Canvas)49flowchart — Process flow (Sugiyama/dagre layout)50mind-map — Radial center-out expansion51gallery — Grid of image nodes52dashboard — Metric cards + charts + zones53storyboard — Linear scene cards + script annotations54knowledge-graph — Force-directed entity map55mood-board — Asymmetric image grid56timeline — Horizontal event sequence57comparison — Side-by-side columns58kanban — Column zones (Todo/Doing/Done)59project-brief — Hero zone + objectives + deliverables60```61623. Ask the user for template-specific parameters (title, number of items, color scheme).634. Delegate to canvas-template skill for instantiation.645. **MANDATORY: Replace ALL placeholder text** in every node with real, relevant content based on the title and topic. This is not optional:65 - Read the generated canvas JSON66 - For each text node, replace generic text ("Describe this step", "YYYY-MM-DD", "Value: 0") with real content relevant to the canvas title67 - Use the Edit tool to update each node's `text` field68 - This is the difference between a skeleton and a finished canvas696. Run `python3 scripts/canvas_validate.py <path>` to verify validity.707. Report the created canvas with node/zone counts.7172---7374## Slug Generation7576```python77import re78def slugify(name):79 slug = name.lower().strip()80 slug = re.sub(r'[^a-z0-9\s-]', '', slug)81 slug = re.sub(r'[\s]+', '-', slug)82 slug = re.sub(r'-+', '-', slug)83 return slug.strip('-')84```8586---8788## Directory Rules8990- Vault mode (`wiki/canvases/` exists): create there, media to `_attachments/images/canvas/`91- Standalone mode: create in `.canvases/`, media to `.canvases/assets/`92- Create the directory if it doesn't exist.93- Never overwrite an existing canvas without asking the user.