claude-computer-use
БесплатноБез исполняемых скриптовНе проверенClaude computer use is an Anthropic API tool that lets Claude see a desktop through screenshots and operate it with mouse and keyboard. Use when automating…
от TerminalSkills★ 221 звезда на GitHubОб этом скилле
Claude Computer Use
Overview
Computer use is a client-side tool of the Claude API. Claude asks for actions (take a screenshot, click, type, scroll), your program performs them on a desktop you control and returns the result, and the loop repeats until the task is done. No selectors are needed, so it suits legacy apps and GUIs with no API. For tasks that stay inside web pages, Anthropic's browser use tool is the closer fit.
Current API shape (checked 2026-10): a single entry {"type": "computer_toolset_20260801"} in tools, no beta header. Claude 5.5 and later models on the Claude API and Google Cloud accept only this toolset. Older models (Opus 4.5 to 4.8, Sonnet 4.6) use computer_20251124 with beta header computer-use-2025-11-24; Opus 5 and Sonnet 5 accept both shapes. Sonnet 4.5 and Haiku 4.5 use computer_20250124 with computer-use-2025-01-24. The computer_20241022 version from the first beta is gone.
Always run it in a sandbox (container or VM) without credentials or production access. Web pages and images can contain prompt injections.
Instructions
Setup
pip install anthropic pillow pyautogui
sudo apt-get install -y xvfb scrot xdotool # Linux sandbox display and screenshots
export ANTHROPIC_API_KEY=... # from the environment, never in code
The fastest safe start is Anthropic's reference container (Linux desktop, VNC viewer, Streamlit UI, agent loop):
docker run -e ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY \
-v $HOME/.anthropic:/home/computeruse/.anthropic \
-p 127.0.0.1:5900:5900 -p 127.0.0.1:8501:8501 -p 127.0.0.1:6080:6080 -p 127.0.0.1:8080:8080 \
-it ghcr.io/anthropics/anthropic-quickstarts:computer-use-demo-latest
Open http://localhost:8080 for the combined view. Source: github.com/anthropics/anthropic-quickstarts, computer-use-demo.
Declare the tools
import anthropic
client = anthropic.Anthropic()
MODEL = "claude-sonnet-5-5"
TOOLS = [
{"type": "computer_toolset_20260801"},
{"type": "bash_20250124", "name": "bash"},
{"type": "text_editor_20250728", "name": "str_replace_based_edit_tool"},
]
The toolset takes no display size: coordinates are in the pixel space of the screenshots you return. It rejects name, display_width_px, display_height_px, display_number and enable_zoom. To withhold a member, use "configs": {"zoom": {"enabled": false}}. Declaring the toolset costs about 4,500 input tokens per request.
Member tools
Claude's tool_use blocks have "toolset_name": "computer" and a name that is one of 17 members; input has no action field.
| Member | Input |
|---|---|
screenshot, cursor_position |
none |
zoom |
region: [x0, y0, x1, y1] (returns an image) |
left_click, right_click, middle_click, double_click, triple_click |
optional coordinate: [x, y], optional text modifiers such as shift or ctrl+shift |
left_click_drag |
start_coordinate, coordinate |
mouse_move |
coordinate |
left_mouse_down, left_mouse_up |
none |
scroll |
scroll_direction (up/down/left/right), scroll_amount, optional coordinate |
type |
text |
key |
text such as ctrl+s, optional repeat 1-100 |
hold_key |
text, duration seconds (max 300) |
wait |
duration seconds (max 300) |
Agent loop
import base64, subprocess, time
from pathlib import Path
import pyautogui
def screenshot_block() -> dict:
subprocess.run(["scrot", "-o", "/tmp/screen.png"], check=True)
# Images must fit the model limit (2576 px long edge for 5.x models): downscale
# larger screens with Pillow and scale Claude's coordinates back up.
data = base64.standard_b64encode(Path("/tmp/screen.png").read_bytes()).decode()
return {"type": "image", "source": {"type": "base64", "media_type": "image/png", "data": data}}
def run_member(name: str, a: dict):
"""Perform one computer member call; return text or an image block."""
xy = a.get("coordinate")
if name == "screenshot":
return [screenshot_block()]
if name == "left_click":
pyautogui.click(*xy)
elif name == "right_click":
pyautogui.rightClick(*xy)
elif name == "double_click":
pyautogui.doubleClick(*xy)
elif name == "mouse_move":
pyautogui.moveTo(*xy)
elif name == "type":
pyautogui.write(a["text"], interval=0.02)
elif name == "key":
for _ in range(a.get("repeat", 1)):
pyautogui.hotkey(*a["text"].lower().split("+"))
elif name == "scroll":
amount = a["scroll_amount"] * (-1 if a["scroll_direction"] == "down" else 1)
pyautogui.scroll(amount, *(xy or pyautogui.position()))
elif name == "wait":
time.sleep(a["duration"])
else:
raise NotImplementedError(name) # implement the rest as needed (zoom, drag, ...)
time.sleep(0.5)
return "OK"
def run_agent(task: str, max_steps: int = 25) -> str:
messages = [{"ro
Установить claude-computer-use в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл claude-computer-use?
Claude computer use is an Anthropic API tool that lets Claude see a desktop through screenshots and operate it with mouse and keyboard. Use when automating GUI workflows, browser automation without CSS selectors, desktop app testing, or any task that requires seeing and interacting with a graphical interface.
Как установить скилл claude-computer-use?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл claude-computer-use запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic