agentsclimarketplace

Canvas

Skill hidetoame/claude-code-gui/skills/canvas

Open the Claude Code GUI canvas in the browser and draw the explanation there. **Primary trigger phrase: 図で説明して / 図で説明 / explain with a diagram / show this visually**. Also fires on: 図にして / 図解して / ビジュアルで説明 / 絵で説明 / draw it / sketch it / illustrate / diagram this / キャンバスを開く / canvas show — use whenever the user wants a visual/figure-based explanation rather than plain text. The canvas is a shared multimodal space where the user and Claude can communicate beyond text — using figures (SVG), pen marks (bidirectional pointing), and CSS animation. Multi-repo aware — each repository (cwd at Claude Code launch) has its own isolated pages/marks/history/files.From its SKILL.md

Install
npx -y skills add hidetoame/claude-code-gui --skill canvas

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

6.8 KB, as published. Nobody here has run it

Open Claude Code GUI canvas

The local server is started automatically on Claude Code session start (via the SessionStart hook). The cwd at launch is auto-registered as a repository in the canvas registry.

To open the canvas in your browser, run:

open "http://127.0.0.1:${CLAUDE_CODE_GUI_PORT:-8766}/canvas.html"

(or click: http://127.0.0.1:8766/canvas.html)

What this gives you

A shared canvas where:

  • The user can draw red shapes (pen, circle, rectangle, polygon) and write instructions
  • Claude can place blue shapes/arrows/labels (claude_marks) and animate them (pulse, flow, fadein, shake, trace)
  • Both see the same Object — and can point at it
  • Pages are organized in a hierarchy (notebook → pages → history)
  • Files (images, etc.) can be dropped onto the canvas and shared with Claude
  • The topmost header shows the active repository; users can switch via the ▼ dropdown

Multi-repo model (important)

The canvas server is a single process per machine, but data is completely isolated per repository. When you operate the canvas, you are always operating on the active repo's data.

  • A "repo" = a directory path (typically the cwd of a Claude Code session that launched this plugin)
  • All data endpoints (pages, marks, history, files, instructions) read/write the active repo's data dir
  • The active repo can be switched from the canvas UI's ▼ dropdown (user-driven) or by POST /repos/active (Claude-driven, see Rule 1)

Rules for Claude (you)

Each rule states what to do and why (so you can judge edge cases instead of blindly following).

  1. Switch the active repo to your cwd before any canvas operation.

    • What: Before reading/writing canvas state (open canvas, post a page, draw marks, etc.), call GET /repos/active. If path ≠ your session's cwd, call POST /repos/active {"slug": "<your-slug>"} to switch. Don't ask the user to flip the dropdown.
    • Why: The user expects whichever Claude Code session they're talking to to drive the canvas. Asking them to switch manually defeats the point of having Claude on the canvas. The start-server.sh hook does not force-switch on launch (that would let multiple sessions stomp each other) — it only registers. So the moment of switching is when this skill fires.
  2. Registering the cwd is idempotent and usually unnecessary.

    • What: POST /repos {"path": "<cwd>", "set_active_if_unset": true} is safe to call any time, but start-server.sh already did it on SessionStart. So normally you only need /repos/active.
  3. A new page must have visible content in the same response.

    • What: When you create a page (e.g. user says "explain X visually"), do POST /pages and POST /history as a pair, immediately, in the same turn.
    • Why: A blank page leaves the user staring at "このページにはまだCanvasがありません" with no clue what to do. The server auto-creates an empty initial history so the page is at least drawable, but a just-created page should be populated by you, not the server's placeholder.
  4. Pending instructions queue (/instructions) is your inbox.

    • What: GET /instructions returns canvas-issued instructions waiting for you (red mark + comment from the user). After acting, DELETE /instructions/{id} to mark resolved, or DELETE /instructions to clear all.
    • Why: If you don't dequeue, the same instruction will keep appearing every poll.

Server endpoints (Claude reads/writes these)

Repository registry (multi-repo)

  • GET /repos — list registered repos: [{slug, path, label, added_at, last_used_at}, ...]
  • POST /repos body {path, label?, set_active_if_unset?} — register (idempotent)
  • GET /repos/active — {slug, repo} of the active repo
  • POST /repos/active body {slug} — switch active repo. You call this when your cwd doesn't match the current active (see Rule 1).
  • DELETE /repos/{slug} — unregister (data on disk preserved)

Pages / canvas (scoped to active repo)

  • GET/POST /marks?page_id=X — user shapes
  • GET/POST /claude-marks?page_id=X — Claude shapes (animation key supported: pulse, flow, fadein, shake, trace)
  • POST /history — push a new SVG body to the page
  • GET /history?page_id=X — list history entries
  • GET /history/{id} — one entry incl. body_svg
  • GET /pages, POST /pages ({title, parent_id}), DELETE /pages/{id}
    • Important: POST /pages auto-creates an empty initial history entry (trigger=🆕 新規ページ) so the page is immediately drawable. Do NOT manually create a "first empty" history — the server already did it. Just POST /history when you have actual content to push.
  • GET/POST /current-page — {page_id}
  • GET /instructions, POST /instructions, DELETE /instructions/{id}, DELETE /instructions
  • GET/POST /questions?page_id=X, DELETE /questions?page_id=X
  • GET /answers?page_id=X, POST /answers?page_id=X, DELETE /answers?page_id=X
  • POST /files (multipart upload), GET /files/{id} (raw)
  • GET /file-registry?page_id=X — files attached to a page

Visualize (image generation)

  • POST /visualize — GPT-Image-2 visualization (requires OPENAI_API_KEY)
  • GET /visualize/jobs/{id} — job status
  • GET /visualize/jobs?active=1 — list active jobs (filtered to active repo)

Default base URL: http://127.0.0.1:8766

Typical interaction patterns

  • User points at something with a red mark → instruction appears in GET /instructions. Read it, identify the mark id, do the work.
  • Claude wants to point at something → POST /claude-marks?page_id=X with [{id, kind, cx, cy, ..., animation: "pulse"}].
  • Claude wants to ask the user a structured question → POST /questions?page_id=X with single/multi/score/text fields. Poll GET /answers?page_id=X for response, then DELETE /questions?page_id=X to dismiss.
  • Claude wants to render an image of the current page context → POST /visualize with {page_id, prompt, reference_file_ids?}. Poll GET /visualize/jobs/{id} for completion.

Keep looking

Skills are one crate of 607,533. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.