agentleFS
yeaight7yeaight7/agent-powerups/skills/json-canvas/SKILL.md

json-canvas

Skill6 starsChanged 4 months agoApache-2.0View on GitHub

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.

64 other projects use a version of this, 63 of them edited.

Adopted by

Most recently taken up by

Used with

Projects with it also use knap, digital-avatar-shopping-video and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • lucasmaher-hashSkill

    knap

    Render Markdown from templates and structured data using Knap CLI. Use when the user asks to apply a Knap template, turn JSON or CSV data into notes, batch-generate Markdown files, or format Defuddle output into a note.

    Also in 4 projects that use this

  • dycnnnbSkill

    digital-avatar-shopping-video

    小省导购员多智能体数字人口播带货视频生成系统,以"小省导购员"为核心人设,打造专业购物助手+数字人口播带货视频一体化服务。涵盖五大智能体(小省导购员、带货脚本师、数字人口播生成师、带货画面设计师、音画合成师),产出"数字人口播+带货画面+字幕音效"的成品视频,适配抖音、快手等短视频平台,支持淘宝、京东、拼多多、唯品会等全平台商品信息,具备知识库自动存取能力。

    Also in 3 projects that use this

  • dycnnnbSkill

    pet-commerce-creator

    萌宠带货短视频全流程创作技能,基于COZE视频大模型API,支持萌宠剧情/好物测评/品种科普/宠品带货等全类型创作,覆盖爆款解析反推、知识库联动、互动优化、素材批量下载、全素材整合,实现从创意到带货引流型成品视频的自动化生成,适配15-30秒竖屏9:16主流平台规格。

    Also in 3 projects that use this

  • jykimSkill

    obsidian-cli

    Interact with Obsidian using the official CLI to read, search, create, and manage notes, daily notes, tasks, properties, and more. Use when the user wants to query or manipulate vault content via the obsidian command.

    Also in 36 projects that use this

  • az9713Skill

    vault-health

    Audit vault health: unresolved links, orphan notes, dead-end files, missing frontmatter, structural gaps. Produces an actionable report note with prioritized fix suggestions. Use when wanting to clean up, organize, or assess the current state of the vault.

    Also in 3 projects that use this

  • BCS1037Skill

    mermaid-visualizer

    Transform text content into professional Mermaid diagrams for presentations and documentation. Use when users ask to visualize concepts, create flowcharts, or make diagrams from text. Supports process flows, system architectures, comparisons, mindmaps, and more with built-in syntax error prevention.

    Also in 3 projects that use this

  • +4 more from dycnnnb

The file

We split this skill into the rules it gives an agent

8 rules. 1 is common, 0 are distinctive, and 7 are very specific to this project.

  • 1

    Common

    Most of the 63 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Create a .canvas file with the base structure {"nodes": [], "edges": []}

    line 23
  2. Very specific:

    Add nodes with required fields: id, type, x, y, width, height

    line 25
  3. Very specific:

    Add edges referencing valid node IDs via fromNode and toNode

    line 26
  4. Very specific:

    Validate: Verify all fromNode/toNode values exist in the nodes array

    line 27
  5. Very specific:

    Read and parse the existing .canvas file

    line 31
  6. Very specific:

    Newline pitfall: Use \n in JSON strings. Do not use literal \\n.

    line 72
  7. Common:

    After creating or editing a canvas file:

    line 159
  8. Very specific:

    Every fromNode and toNode references an existing node ID

    line 162

“Common” is measured: kept by at least 6 in 10 of the 63 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

JSON Canvas Skill

File Structure

A canvas file (.canvas) contains two top-level arrays following the JSON Canvas Spec 1.0:

{
  "nodes": [],
  "edges": []
}

Common Workflows

1. Create a New Canvas

  1. Create a .canvas file with the base structure {"nodes": [], "edges": []}
  2. Generate unique 16-character hex IDs for each node (e.g., "6f0ad84f44ce9c17")
  3. Add nodes with required fields: id, type, x, y, width, height
  4. Add edges referencing valid node IDs via fromNode and toNode
  5. Validate: Verify all fromNode/toNode values exist in the nodes array

2. Add a Node to an Existing Canvas

  1. Read and parse the existing .canvas file
  2. Generate a unique ID that does not collide with existing IDs
  3. Choose position (x, y) that avoids overlapping existing nodes (50-100px spacing)
  4. Append the new node object to the nodes array
  5. Validate: Confirm all IDs are unique and all edge references resolve

3. Connect Two Nodes

  1. Identify the source and target node IDs
  2. Generate a unique edge ID
  3. Set fromNode and toNode to the source and target IDs
  4. Optionally set fromSide/toSide (top, right, bottom, left) and label
  5. Validate: Confirm both IDs reference existing nodes

Nodes

Nodes are objects placed on the canvas. Array order determines z-index (first = bottom layer).

Generic Node Attributes

AttributeRequiredTypeDescription
idYesstringUnique 16-char hex identifier
typeYesstringtext, file, link, or group
xYesintegerX position in pixels
yYesintegerY position in pixels
widthYesintegerWidth in pixels
heightYesintegerHeight in pixels
colorNostringPreset "1"-"6" or hex (e.g., "#FF0000")

Text Node

{
  "id": "6f0ad84f44ce9c17",
  "type": "text",
  "x": 0, "y": 0, "width": 400, "height": 200,
  "text": "# Hello World\n\nThis is **Markdown** content."
}

Newline pitfall: Use \n in JSON strings. Do not use literal \\n.

File Node

{
  "id": "a1b2c3d4e5f67890",
  "type": "file",
  "x": 500, "y": 0, "width": 400, "height": 300,
  "file": "Attachments/diagram.png"
}

Link Node

{
  "id": "c3d4e5f678901234",
  "type": "link",
  "x": 1000, "y": 0, "width": 400, "height": 200,
  "url": "https://obsidian.md"
}

Group Node

{
  "id": "d4e5f6789012345a",
  "type": "group",
  "x": -50, "y": -50, "width": 1000, "height": 600,
  "label": "Project Overview",
  "color": "4"
}

Edges

AttributeRequiredDefaultDescription
idYes-Unique identifier
fromNodeYes-Source node ID
toNodeYes-Target node ID
fromSideNo-top, right, bottom, or left
toSideNo-top, right, bottom, or left
fromEndNononenone or arrow
toEndNoarrownone or arrow
colorNo-Line color
labelNo-Text label
{
  "id": "0123456789abcdef",
  "fromNode": "6f0ad84f44ce9c17",
  "fromSide": "right",
  "toNode": "a1b2c3d4e5f67890",
  "toSide": "left",
  "label": "leads to"
}

Colors

PresetColor
"1"Red
"2"Orange
"3"Yellow
"4"Green
"5"Cyan
"6"Purple

Layout Guidelines

  • Coordinates can be negative (canvas extends infinitely)
  • x increases right, y increases down; position is the top-left corner
  • Space nodes 50-100px apart; leave 20-50px padding inside groups
  • Align to grid (multiples of 10 or 20) for cleaner layouts
Node TypeSuggested WidthSuggested Height
Small text200-30080-150
Medium text300-450150-300
Large text400-600300-500

Validation Checklist

After creating or editing a canvas file:

  1. All id values are unique across both nodes and edges
  2. Every fromNode and toNode references an existing node ID
  3. Required fields are present for each node type
  4. type is one of: text, file, link, group
  5. Side values are one of: top, right, bottom, left
  6. End values are one of: none, arrow
  7. JSON is valid and parseable

References

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.