trove-json-canvas

trove-json-canvas is a cursor rule for Cursor from bravew/trove. It costs 1,027 tokens per session, scanned A, original, MIT.

A set of rules for creating, editing, and checking JSON Canvas files. JSON Canvas is a portable file format for visual boards made from text, file, link, and group nodes connected by arrows.

In plain words
What is it for?
Use it to make or update portable visual boards and Obsidian canvas files, place nodes clearly, connect known nodes, and validate the file structure.
Why use it?
It keeps canvas files valid and preserves existing IDs, fields, order, and unrelated layout. It also distinguishes these boards from HTML canvas code, images, slides, and Mermaid diagrams.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use it to make or update portable visual boards and Obsidian canvas files, place nodes clearly, connect known nodes, and validate the file structure.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/bravew/trove/trove-json-canvas
View source ↗ bravew/trove
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/bravew/trove

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for trove-json-canvas

README.md
[![agentmods](https://agentmods.dev/badge/rules/bravew/trove/trove-json-canvas/github.svg)](https://agentmods.dev/rules/bravew/trove/trove-json-canvas)
Your own site
<a href="https://agentmods.dev/rules/bravew/trove/trove-json-canvas"><img src="https://agentmods.dev/badge/rules/bravew/trove/trove-json-canvas/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for trove-json-canvas

Your own site · 80×15
<a href="https://agentmods.dev/rules/bravew/trove/trove-json-canvas"><img src="https://agentmods.dev/badge/rules/bravew/trove/trove-json-canvas.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,027 This file is loaded in full into every session.
When invoked 1,027 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.01027 $0.01027
Opus 5 $0.00513 $0.00513
Sonnet 5 $0.00205 $0.00205
Haiku 4.5 $0.00103 $0.00103

Measured yesterday against content hash 250f127a707a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

trove-json-canvas scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/trove-doc/rules/trove-json-canvas.mdc · 94 lines

How it starts

The opening of the file, as written. The whole thing — 94 lines — stays where its author put it; the contents beside it link to each section on GitHub.

JSON Canvas

Use JSON Canvas 1.0 for a requested .canvas artifact. It is a portable file format and can be authored without Obsidian. Do not substitute it for another visual format the user requested.

Workflow

  1. Read and parse an existing canvas before editing it. For a new canvas, start with {"nodes": [], "edges": []}. Both arrays are optional in the specification; include them in newly created files for clarity.
  2. Preserve existing IDs, unknown extension fields, unrelated content, and node order. IDs are unique strings; hexadecimal is an optional generation convention, not a validity requirement. Never rewrite valid IDs for style.
  3. Position nodes with readable spacing, then connect known node IDs. Keep groups before their members in the array so the background appears below the content. Groups contain nodes geometrically, not through a children property. Avoid unrelated layout changes when making a focused edit.
  4. Validate JSON and the integrity checks below. Inspect the board in a compatible viewer when available; otherwise identify the visual check as unverified. A request to review or diagnose does not authorize rewriting.

Schema essentials

Every node has string id and type, and integer x, y, width, height. Use positive dimensions for readable nodes. Coordinates may be negative.

Node type Additional fields
text Required string text, which may contain Markdown
file Required string file; optional string subpath starting with #
link Required string url
group Optional string label, string background, and backgroundStyle

backgroundStyle is cover, ratio, or repeat. Optional color is a hex color string such as "#FF0000" or a string preset "1" through "6". Use vault-relative file paths for Obsidian; otherwise follow the target app's path conventions. Check referenced local files without fetching link nodes.

Read the full file on GitHub · 94 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 94 lines · 1,027 tokens per session scan A 250f127a707a

Subscribe to this mod's changes

trove-json-canvas is a cursor rule published in the GitHub repository bravew/trove (10 stars, last pushed yesterday), licensed MIT. It adds 1,027 tokens to every session, about $0.0051 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-11.