agent-canvas
БесплатноБез исполняемых скриптовНе проверенInteractive element picker for web pages. Opens a browser with click-to-select UI overlay. Use when you need to let users visually select DOM elements…
от diegosouzapw★ 68 звёзд на GitHubОб этом скилле
Agent Canvas
Interactive element picker that opens a browser window with a DevTools-like selection overlay. Users hover to highlight elements and click to select. Returns detailed element info including selector, bounding box, and computed styles.
First-Time Setup
Before first use, verify dependencies are installed:
uv run .claude/skills/agent-canvas-setup/scripts/check_setup.py check
If checks fail, ask user which installation scope they prefer and run:
# Recommended: minimal footprint, uv manages deps on-demand
uv run .claude/skills/agent-canvas-setup/scripts/check_setup.py install --scope temporary
# Alternative: create .venv in project
uv run .claude/skills/agent-canvas-setup/scripts/check_setup.py install --scope local
See agent-canvas-setup skill for full details on installation options.
Quick Start for AI Agents
When using agent-canvas, always follow this pattern:
- Launch the picker (browser opens for user interaction)
- Wait for browser to close (user finishes selecting/editing)
- Read session from disk (NOT from stdout - it may be lost)
# 1. Launch (user interacts with browser)
uv run .claude/skills/agent-canvas/scripts/agent_canvas.py pick http://localhost:3000 --with-edit --with-eyes
# 2. After browser closes, read the latest session
SESSION_ID=$(ls -t .canvas/sessions/ | head -1)
cat .canvas/sessions/$SESSION_ID/session.json | jq '.summary'
Commands
SKILL_DIR=".claude/skills/agent-canvas/scripts"
Pick Element
Open browser with element picker overlay. Streams selection events as JSON lines until window is closed:
# Basic pick - opens browser, streams selections as JSON lines
uv run $SKILL_DIR/agent_canvas.py pick http://localhost:3000
# Pick with agent-eyes integration (adds screenshot + detailed styles per selection)
uv run $SKILL_DIR/agent_canvas.py pick http://localhost:3000 --with-eyes
# Pick with edit panel (floating DevTools for live style editing)
uv run $SKILL_DIR/agent_canvas.py pick http://localhost:3000 --with-edit
# Full workflow: picker + edit panel + agent-eyes (recommended)
uv run $SKILL_DIR/agent_canvas.py pick http://localhost:3000 --with-edit --with-eyes
# Save all selections and edits to file when done
uv run $SKILL_DIR/agent_canvas.py pick http://localhost:3000 --with-edit --output ./session.json
User interaction:
- Browser opens with blue highlight overlay
- Hover over elements to see selector labels
- Click to select (overlay flashes green, counter increments)
- Keep clicking to select more elements
- Close browser window when done
Streamed output (JSON lines):
{"event": "session_started", "url": "http://localhost:3000", "timestamp": "...", "features": {"picker": true, "eyes": true, "edit": true}}
{"event": "selection", "index": 1, "timestamp": "...", "element": {"tag": "button", "selector": "#submit", ...}}
{"event": "style_change", "timestamp": "...", "selector": "#submit", "property": "backgroundColor", "newValue": "#ff0000"}
{"event": "session_ended", "timestamp": "...", "total_selections": 1, "total_edits": 1}
With --with-eyes, each selection event also includes eyes (detailed styles) and screenshot fields.
With --with-edit, style changes made in the floating panel are emitted as style_change events.
Watch for Changes
Monitor page for DOM changes, capture screenshots on each change:
# Watch with default 2s interval
uv run $SKILL_DIR/agent_canvas.py watch http://localhost:3000
# Custom interval
uv run $SKILL_DIR/agent_canvas.py watch http://localhost:3000 --interval 5
# Custom output directory
uv run $SKILL_DIR/agent_canvas.py watch http://localhost:3000 --output-dir ./snapshots
Outputs JSON events to stdout:
{"event": "watch_started", "url": "http://localhost:3000", "interval": 2.0}
{"event": "change_detected", "iteration": 1, "timestamp": "...", "screenshot": ".canvas/screenshots/..."}
Typical Workflow
Let user select element:
uv run $SKILL_DIR/agent_canvas.py pick http://localhost:3000 --with-eyesUse returned selector for further analysis:
# Get accessibility info for selected element uv run .claude/skills/agent-eyes/scripts/agent_eyes.py a11y http://localhost:3000 --selector "#selected-element"Make changes to the element's styles/content
Verify changes with agent-eyes:
uv run .claude/skills/agent-eyes/scripts/agent_eyes.py screenshot http://localhost:3000
Integration with Agent Eyes
When --with-eyes flag is used, agent-canvas calls agent-eyes to:
- Get detailed element description (computed styles, attributes, visibility)
- Take a screenshot of the selected element
This provides comprehensive visual context for the AI agent to understand and modify the selected element.
Integration with Canvas Edit
When --with-edit flag is used, agent-canvas loads the canva
Установить agent-canvas в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл agent-canvas?
Interactive element picker for web pages. Opens a browser with click-to-select UI overlay. Use when you need to let users visually select DOM elements, identify element selectors, or get detailed element information interactively. Triggers on "select an element", "pick element", "let me choose", "which element", or any interactive element selection task. Integrates with agent-eyes for visual context.
Как установить скилл agent-canvas?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл agent-canvas запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic