json-canvas
Create and edit JSON Canvas files (.canvas) with nodes, edges, groups, and connections. Use when working with .canvas files, creating visual canvases, mind maps, flowcharts, or when the user mentions Canvas files in Obsidian.
Security Assessment
About json-canvas
The json-canvas skill enables the creation and modification of JSON Canvas (.canvas) files that follow the JSON Canvas Spec 1.0. These files are used to represent visual structures such as diagrams, mind maps, and flowcharts through a combination of nodes and edges. The skill addresses the need for programmatically generating and editing structured visual canvases, ensuring that all elements—nodes, edges, and their relationships—are correctly defined and validated within a JSON format.
This skill supports a range of core capabilities, including creating new canvas files with the required base structure, adding and positioning nodes, connecting nodes באמצעות edges, and editing existing canvas elements. It enforces important constraints such as unique 16-character hex IDs, valid references between edges and nodes, and proper JSON formatting. It also supports multiple node types such as text, file, link, and group, each with specific attributes. Additionally, it emphasizes validation steps to ensure structural integrity, such as confirming ID uniqueness and verifying that all edge connections reference existing nodes.
Typical use cases include building visual knowledge maps in tools like Obsidian, designing flowcharts, organizing ideas in mind maps, and managing interconnected content visually. This skill is particularly useful for developers, technical writers, and knowledge workers who need to automate or systematically manage canvas-based visual data. It is also beneficial for users working with .canvas files who require precise control over layout, structure, and connections within their visual workspace.
FAQ
What is the required structure of a .canvas file?
A .canvas file must contain a JSON object with two top-level arrays: "nodes" and "edges". Both arrays are optional but must follow the JSON Canvas Spec 1.0 format.
How are nodes uniquely identified?
Each node must have a unique 16-character hexadecimal string as its ID. This ensures there are no collisions with other node or edge IDs.
Can I connect nodes without specifying positions?
No. Nodes must include position attributes (x and y) along with width and height before they can be connected via edges.
What validation steps are required when editing a canvas?
You must ensure that all IDs remain unique, all edge references (fromNode and toNode) point to existing nodes, and that the JSON structure is valid after modifications.
What types of nodes are supported?
Supported node types include text, file, link, and group. Each type has its own required attributes, such as "text" for text nodes or "file" for file nodes.
Install json-canvas
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
kepano/obsidian-skills