claude-computer-use

claude-computer-use is a skill for Claude Code, Codex from malue-ai/dazee-small. It costs 67 tokens per session (2,350 once invoked), scanned A, original, MIT.

A desktop-automation skill that uses screenshots and Claude's visual understanding to control apps with mouse and keyboard actions.

In plain words
What is it for?
It can inspect the screen, click, drag, scroll, type, press keys, and wait while carrying out tasks in desktop applications.
Why use it?
It helps when normal browser or operating-system automation cannot reach an app, especially when the app has no accessibility interface.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It can inspect the screen, click, drag, scroll, type, press keys, and wait while carrying out tasks in desktop applications.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/malue-ai/dazee-small/claude-computer-use
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.

Any agent
npx skills add malue-ai/dazee-small --skill claude-computer-use
Clone the repo
git clone --depth 1 https://github.com/malue-ai/dazee-small

Made for: Claude Code, Codex.

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 claude-computer-use

README.md
[![agentmods](https://agentmods.dev/badge/skills/malue-ai/dazee-small/claude-computer-use/github.svg)](https://agentmods.dev/skills/malue-ai/dazee-small/claude-computer-use)
Your own site
<a href="https://agentmods.dev/skills/malue-ai/dazee-small/claude-computer-use"><img src="https://agentmods.dev/badge/skills/malue-ai/dazee-small/claude-computer-use/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 claude-computer-use

Your own site · 80×15
<a href="https://agentmods.dev/skills/malue-ai/dazee-small/claude-computer-use"><img src="https://agentmods.dev/badge/skills/malue-ai/dazee-small/claude-computer-use.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,350 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00067 $0.02350
Opus 5.5 $0.00027 $0.00940
Sonnet 5.5 $0.00013 $0.00470
Haiku 4.5 $0.00007 $0.00235

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

Security

Grade A, and why

claude-computer-use scanned grade A with 1 finding 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 3mo 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

subprocess.run(["screencapture", "-x", "/tmp/screen.png"])
instances/xiaodazi/skills/claude-computer-use/SKILL.md · 252 lines

How it starts

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

Claude Computer Use

Anthropic 官方桌面自动化 API(beta)。通过截屏 + Claude 视觉理解 + 坐标操作控制任意桌面应用。

何时使用

这是终极后备方案,仅在以下情况使用:

  1. peekaboo (macOS) / pywinauto (Windows) / browser (网页) 无法操作目标应用
  2. 需要视觉判断(看屏幕内容决定下一步)
  3. 目标应用不暴露 Accessibility API
  4. 用户明确要求精确坐标控制

优先使用轻量方案(成本更低、速度更快):

  • 网页 → browser tool
  • macOS 桌面 → peekaboo
  • Windows 桌面 → pywinauto

支持的操作

操作 说明
screenshot 截取当前屏幕
left_click 在坐标 [x, y] 点击
right_click 右键点击
double_click 双击
triple_click 三击(全选文本)
middle_click 中键点击
mouse_move 移动鼠标到坐标
left_click_drag 拖拽(从当前位置到目标坐标)
scroll 滚动(方向 + 数量)
type 输入文本
key 按键/组合键(如 "ctrl+s")
hold_key 按住某键指定时长
wait 等待指定秒数

工作流程

循环:
  1. 截屏 (screencapture / pyautogui.screenshot)
  2. 发送截图给 Claude Computer Use API
  3. Claude 分析截图,返回 tool_use (action + coordinates)
  4. 在本地执行操作 (cliclick/xdotool/pyautogui)
  5. 如果任务未完成,回到步骤 1

完整示例

macOS 实现

import anthropic
import subprocess
import base64
import json

client = anthropic.Anthropic()

def screenshot():
    """截取 macOS 屏幕"""
    subprocess.run(["screencapture", "-x", "/tmp/screen.png"], check=True)
    with open("/tmp/screen.png", "rb") as f:
        return base64.b64encode(f.read()).decode()

def execute_action(action_type, **kwargs):
    """执行鼠标/键盘操作 (macOS 使用 cliclick 或 AppleScript)"""
    if action_type == "left_click":
        x, y = kwargs["coordinate"]
        subprocess.run(["cliclick", f"c:{x},{y}"])
    elif action_type == "type":
        text = kwargs["text"]
        subprocess.run(["cliclick", f"t:{text}"])
    elif action_type == "key":
        key = kwargs["key"]
        # 通过 AppleScript 发送按键
        subprocess.run(["osascript", "-e",
            f'tell application "System Events" to keystroke "{key}"'])
    elif action_type == "scroll":
        direction = kwargs.get("direction", "down")
        amount = kwargs.get("amount", 3)
        delta = -amount if direction == "down" else amount
        # AppleScript 模拟滚动
        subprocess.run(["osascript", "-e",
            f'tell application "System Events" to scroll area 1 by {delta}'])
    elif action_type == "mouse_move":
        x, y = kwargs["coordinate"]
        subprocess.run(["cliclick", f"m:{x},{y}"])
    elif action_type == "screenshot":
        pass  # 下一轮循环自动截屏

def computer_use_loop(task: str, max_iterations: int = 10):
    """Computer Use 主循环"""
    messages = [{"role": "user", "content": [
        {"type": "text", "text": task}
    ]}]

    for i in range(max_iterations):
        # 1. 截屏
        img_b64 = screenshot()

        # 2. 追加截图到消息
        if i > 0:
            messages.append({"role": "user", "content": [
                {"type": "tool_result", "tool_use_id": tool_use_id,
                 "content": [{"type": "image", "source": {
                     "type": "base64", "media_type": "image/png", "data": img_b64
                 }}]}
            ]})
        else:
            messages[0]["content"].append({
                "type": "image", "source": {
                    "type": "base64", "media_type": "image/png", "data": img_b64
                }
            })

        # 3. 调用 Claude Computer Use API
        response = client.beta.messages.create(
            model="claude-sonnet-4-6",
            max_tokens=1024,
            tools=[{
                "type": "computer_20250124",
                "name": "computer",
                "display_width_px": 1920,
                "display_height_px": 1080,
            }],
            messages=messages,
            betas=["computer-use-2025-01-24"],
        )

        # 4. 解析响应
        messages.append({"role": "assistant", "content": response.content})

        # 检查是否完成
        if response.stop_reason == "end_turn":
            print("任务完成")
            break

        # 5. 执行操作
        for block in response.content:
            if block.type == "tool_use":
                tool_use_id = block.id
                action = block.input.get("action")
                print(f"  执行: {action} {block.input}")
                execute_action(action, **block.input)

    return messages

Read the full file on GitHub · 252 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. 3mo ago First seen · 252 lines · 67 tokens per session scan A 5ccbd95c521f

Subscribe to this mod's changes

claude-computer-use is a skill published in the GitHub repository malue-ai/dazee-small (37 stars, last pushed 8mo ago), licensed MIT. It adds 67 tokens to every session and 2,350 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

claude-computer-use compared with skills from other repositories

claude-computer-use next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
claude-computer-usemalue-ai/dazee-smallSkill378mo agoMITA67Claude Code, Codex
android-multiprofilechromium/chromiumSkill26ktodayBSD-3-ClauseA73Claude Code, Codex
pinchtab-mcppinchtab/pinchtabSkill11k10d agoMITA52Claude Code, Codex
azure-messaging-webpubsub-javamicrosoft/skillsSkill3.3kyesterdayMITA43Claude Code
cua-driverdavidondrej/skillsSkill4.4kyesterdayMITA68Claude Code, Codex
open-design-browsercompozy/compozySkill2.9ktodayMITA56Claude Code, Codex
southwestborski/travel-hacking-toolkitSkill1.1k4d agoMITA40Claude Code