json-canvas

Create and validate JSON Canvas files with nodes and edges per Spec 1.0.

1|Updated Mar 8, 2024
One-click install
npx skills add https://github.com/cpp-for-everything/ORM --skill json-canvas-cpp-for-everything
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: json-canvas
Source: https://github.com/cpp-for-everything/ORM/tree/main/.windsurf/skills/json-canvas
Command: npx skills add https://github.com/cpp-for-everything/ORM --skill json-canvas-cpp-for-everything

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

JSON Canvas files are a lightweight way to visually map ideas, workflows, and data relationships as nodes and edges; this skill provides a structured way to create, edit, and validate these canvases.

Core Features & Use Cases

  • Create, edit, and validate a JSON Canvas document containing top-level "nodes" and "edges" arrays per the JSON Canvas Spec 1.0.
  • Define node types such as text, file, link, and group with position and size attributes for flexible diagram layouts.
  • Create edges with fromNode and toNode references, optional sides and arrows, and optional labels to describe relationships; supports mind maps, flowcharts, knowledge graphs, and project boards.
  • Reference complete examples in the provided materials to learn practical layouts and validation checks.

Quick Start

Create a new .canvas file with the base structure {"nodes": [], "edges": []}, then add nodes and edges following the spec to build your diagram.

Frequently Asked Questions about json-canvas

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a JSON Canvas file for a mind map or flowchart?

To create a JSON Canvas file, start with a base structure containing empty "nodes" and "edges" arrays. You then define node types like text, file, link, and group with specific positions and sizes, and connect them using edges with fromNode and toNode references to build your visual diagram.

What is the JSON Canvas spec used for when visually mapping data?

The JSON Canvas spec provides a lightweight format to visually map ideas, workflows, and data relationships as nodes and edges. It is commonly used for creating mind maps, flowcharts, knowledge graphs, and project boards that require structured visual mapping.

How do I validate nodes and edges in a JSON Canvas document?

To validate a JSON Canvas document, you must enforce JSON Canvas Spec 1.0 rules, ensuring proper node types like text, file, link, and group are defined with correct attributes. Edges must contain valid fromNode and toNode references to maintain structural integrity.

Can I define directional arrows and labels for edges in a JSON Canvas diagram?

Yes, JSON Canvas edges support optional labels to describe relationships between connected items. You can also define optional sides and arrows on the edges, alongside the required fromNode and toNode references, to clarify the direction and nature of the visual mapping.

Does JSON Canvas support grouping multiple nodes together in a diagram?

JSON Canvas supports a specific group node type for organizing multiple elements within your diagram. By defining groups with appropriate position and size attributes, you can visually cluster related text, file, and link nodes together on your project board or knowledge graph.

What are the limitations when using JSON Canvas for complex knowledge graphs?

JSON Canvas is limited to defining static layout attributes like position and size for nodes, and basic fromNode/toNode references for edges. It enforces JSON validity and structural rules but does not inherently process dynamic graph logic or automated layout algorithms.