Back to Skills

clawdis-canvas

steipete
Updated 2 days ago
26 views
468
45
468
View on GitHub
Designdesign

About

This skill enables developers to programmatically control the Clawdis Canvas panel via CLI for presenting HTML/JS interfaces and A2UI surfaces. Key capabilities include rendering content, evaluating JavaScript, capturing snapshots, and managing gateway-hosted A2UI applications with action bridging. Use it to automate UI testing, visualization, and interaction workflows within the Clawdis environment.

Documentation

Clawdis Canvas

Use Canvas to render HTML/JS or A2UI surfaces and capture snapshots.

Core commands

  • Present: clawdis canvas present [--node <id>] [--target <path>]
  • Hide: clawdis canvas hide
  • Eval JS: clawdis canvas eval --js "..."
  • Snapshot: clawdis canvas snapshot

A2UI

  • Push JSONL: clawdis canvas a2ui push --jsonl /path/to/file.jsonl
  • Reset: clawdis canvas a2ui reset

Notes

  • Keep HTML under ~/clawd/canvas when targeting remote nodes.
  • Use snapshot after renders to verify UI state.
  • Treat A2UI as gateway-hosted at http(s)://<gateway-host>:18789/__clawdis__/a2ui/.
  • Rely on canvas a2ui push/reset to auto-navigate the Canvas to the gateway-hosted A2UI page.
  • Expect A2UI to fail if the Gateway does not advertise canvasHostUrl or is unreachable:
    • A2UI_HOST_NOT_CONFIGURED
    • A2UI_HOST_UNAVAILABLE

A2UI quick flow

  1. Ensure the Gateway is running and reachable from the node.
  2. Build JSONL with v0.8 server→client messages (beginRendering, surfaceUpdate, dataModelUpdate, deleteSurface).
    • Do not use v0.9 createSurface (unsupported).
  3. Push JSONL and (optionally) snapshot the result.

Example JSONL (v0.8)

cat > /tmp/a2ui-v0.8.jsonl <<'EOF'
{"surfaceUpdate":{"surfaceId":"main","components":[{"id":"root","component":{"Column":{"children":{"explicitList":["title","content"]}}}},{"id":"title","component":{"Text":{"text":{"literalString":"A2UI (v0.8)"},"usageHint":"h1"}}},{"id":"content","component":{"Text":{"text":{"literalString":"If you can read this, A2UI is live."},"usageHint":"body"}}}]}}
{"beginRendering":{"surfaceId":"main","root":"root"}}
EOF

clawdis canvas a2ui push --jsonl /tmp/a2ui-v0.8.jsonl --node <id>

Action callbacks (A2UI → agent)

  • A2UI user actions (buttons, etc.) are bridged from the WebView back to the node via clawdisCanvasA2UIAction.
  • Handle them on the agent side as CANVAS_A2UI messages (node → gateway → agent).

Quick Install

/plugin add https://github.com/steipete/clawdis/tree/main/clawdis-canvas

Copy and paste this command in Claude Code to install this skill

GitHub 仓库

steipete/clawdis
Path: skills/clawdis-canvas
relaywhatsapp

Related Skills

langchain

Meta

LangChain is a framework for building LLM applications using agents, chains, and RAG pipelines. It supports multiple LLM providers, offers 500+ integrations, and includes features like tool calling and memory management. Use it for rapid prototyping and deploying production systems like chatbots, autonomous agents, and question-answering services.

View skill

Algorithmic Art Generation

Meta

This skill helps developers create algorithmic art using p5.js, focusing on generative art, computational aesthetics, and interactive visualizations. It automatically activates for topics like "generative art" or "p5.js visualization" and guides you through creating unique algorithms with features like seeded randomness, flow fields, and particle systems. Use it when you need to build reproducible, code-driven artistic patterns.

View skill

webapp-testing

Testing

This Claude Skill provides a Playwright-based toolkit for testing local web applications through Python scripts. It enables frontend verification, UI debugging, screenshot capture, and log viewing while managing server lifecycles. Use it for browser automation tasks but run scripts directly rather than reading their source code to avoid context pollution.

View skill

requesting-code-review

Design

This skill dispatches a code-reviewer subagent to analyze code changes against requirements before proceeding. It should be used after completing tasks, implementing major features, or before merging to main. The review helps catch issues early by comparing the current implementation with the original plan.

View skill