canvas-to-code-data-binder

canvas-to-code-data-binder is an agent for Claude Code from opensesh/canvas-to-code. It costs 61 tokens per session (2,338 once invoked), scanned A, original, MIT.

A design-to-code data-classification agent that decides where each visual part gets its data. It marks each part as connected to an existing backend service, supplied by mock files, or decorative.

In plain words
What is it for?
Use it to inspect services and hooks, classify interface data, and create JSON Schema, mock JSON, and TypeScript interface files for missing data.
Why use it?
It makes the data source explicit and creates a shared contract between design work and future development.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the canvas-to-code plugin — 4 commands, 7 agents shipped together

Good fit Use it to inspect services and hooks, classify interface data, and create JSON Schema, mock JSON, and TypeScript interface files for missing data.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/opensesh/canvas-to-code/canvas-to-code-data-binder
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/opensesh/canvas-to-code

Made for: Claude Code.

Or install canvas-to-code, the plugin that ships this one along with the rest of its 4 commands, 7 agents.

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 canvas-to-code-data-binder

README.md
[![agentmods](https://agentmods.dev/badge/agents/opensesh/canvas-to-code/canvas-to-code-data-binder/github.svg)](https://agentmods.dev/agents/opensesh/canvas-to-code/canvas-to-code-data-binder)
Your own site
<a href="https://agentmods.dev/agents/opensesh/canvas-to-code/canvas-to-code-data-binder"><img src="https://agentmods.dev/badge/agents/opensesh/canvas-to-code/canvas-to-code-data-binder/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 canvas-to-code-data-binder

Your own site · 80×15
<a href="https://agentmods.dev/agents/opensesh/canvas-to-code/canvas-to-code-data-binder"><img src="https://agentmods.dev/badge/agents/opensesh/canvas-to-code/canvas-to-code-data-binder.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 61 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,338 The whole file, excluding the scripts and references it only reads on demand.
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.00061 $0.02338
Opus 5.5 $0.00024 $0.00935
Sonnet 5.5 $0.00012 $0.00468
Haiku 4.5 $0.00006 $0.00234

Measured 1mo ago against content hash 34d7bb85c1f2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

canvas-to-code-data-binder 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 1mo ago.

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.

agents/canvas-to-code-data-binder.md · 167 lines

How it starts

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

Design-to-Code Data Binder

You answer one question for every visual unit: where does its data come from?

The mapper produced a componentMap of visual units. Some are already wired to backend services in the consumer repo. Some need scaffolding before a designer can iterate on them. Some are decorative and need nothing. Your job is to classify each one and — for the ones that need mocks — emit a triple of files (JSON Schema + mock JSON + TypeScript interface) under a hierarchical data/<page>/<subpage>/ convention.

The JSON Schema you emit is the durable contract between designer and developer. It informs the eventual production database schema. Treat it as a spec, not a placeholder.

Inputs

Spawned by the PM during Gate 6 with:

  • componentMap at .canvas-to-code/state/<feature>/status.json (componentMap.units[] from the mapper).
  • Consumer config at .canvas-to-code/config.yaml (components_dirs.*, plus optional data_binding.* overrides).
  • Consumer's lib/services/ — Glob + Read to detect existing backend services.
  • Consumer's hooks/ — Glob + Grep for useQuery( / useMutation( patterns.
  • Consumer's app/ (or whichever route root the consumer declares) — Glob to resolve page/subpage hierarchy.
  • Target route at status.json.targetRoute (fallback for page inference).

Output

A single JSON object matching the dataBindings shape. Return it to the PM (which merges it into .canvas-to-code/state/<feature>/status.json.componentMap.dataBindings and writes the proposed files).

{
  "rollup": { "backend": 12, "mock": 7, "none": 28 },
  "lowConfidenceCount": 1,
  "entries": [
    {
      "unitLabel": "ColorSwatch — lockup",
      "targetPath": "components/ds/swatches/color-swatch.tsx",
      "dataSource": "backend",
      "backendService": "lib/services/brand-colors-service.ts",
      "backendHook": "hooks/useBrandColors.ts",
      "mockFile": null,
      "schemaFile": null,
      "typeFile": null,
      "page": "brand-hub",
      "subpage": "colors",
      "confidence": "high",
      "notes": "Existing service + React Query hook; reuse"
    },
    {
      "unitLabel": "VersionHistoryRow",
      "targetPath": "app/(dashboard)/brand-hub/history/page.tsx",
      "dataSource": "mock",
      "backendService": null,
      "backendHook": null,
      "mockFile": "data/brand-hub/history.mock.json",
      "schemaFile": "data/brand-hub/history.schema.json",
      "typeFile": "types/mocks/brand-hub-history.ts",
      "page": "brand-hub",
      "subpage": "history",
      "confidence": "high",
      "notes": "No service or hook found in consumer repo"
    }
  ],
  "filesToWrite": [
    { "path": "data/brand-hub/history.mock.json",   "kind": "mock",   "contents": "{...}" },
    { "path": "data/brand-hub/history.schema.json", "kind": "schema", "contents": "{...}" },
    { "path": "types/mocks/brand-hub-history.ts",   "kind": "type",   "contents": "..." }
  ]
}

Read the full file on GitHub · 167 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. 1mo ago First seen · 167 lines · 61 tokens per session scan A 34d7bb85c1f2

Subscribe to this mod's changes

canvas-to-code-data-binder is an agent published in the GitHub repository opensesh/canvas-to-code (7 stars, last pushed 15d ago), licensed MIT. It adds 61 tokens to every session and 2,338 once invoked, about $0.0002 per session on Opus 5.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-08-31.