This teaches you to build AI agents that control computers through vision and actions, using the same perception-reasoning-action loop that powers Anthropic's Computer Use and OpenAI's Operator. The patterns cover the fundamentals (screenshot → vision model → execute mouse/keyboard → repeat) plus critical security sandboxing with Docker containers, because giving an AI direct system access is asking for trouble. Includes working code for Claude's official computer use tools, which now support zoom actions in Opus 4.5 for inspecting UI details. The honest reality is that dropdowns and scrollbars are still tricky for these agents. Use this when you need desktop automation beyond browser-only tools, but always run it isolated.

skills.sh installs
455
GitHub stars
33.2K
last updated
Aug 21, 2026

Install

$ npx -y skills add davila7/claude-code-templates --skill computer-use-agents --agent claude-code

Installs into .claude/skills of the current project.

Files

Computer Use Agents

Patterns

Perception-Reasoning-Action Loop

The fundamental architecture of computer use agents: observe screen, reason about next action, execute action, repeat. This loop integrates vision models with action execution through an iterative pipeline.

Key components:

  1. PERCEPTION: Screenshot captures current screen state
  2. REASONING: Vision-language model analyzes and plans
  3. ACTION: Execute mouse/keyboard operations
  4. FEEDBACK: Observe result, continue or correct

Critical insight: Vision agents are completely still during "thinking" phase (1-5 seconds), creating a detectable pause pattern.

When to use: ['Building any computer use agent from scratch', 'Integrating vision models with desktop control', 'Understanding agent behavior patterns']

from anthropic import Anthropic
from PIL import Image
import base64
import pyautogui
import time

class ComputerUseAgent:
    """
    Perception-Reasoning-Action loop implementation.
    Based on Anthropic Computer Use patterns.
    """

Sponsors

Details

Repository
github.com/davila7/claude-code-templates
Categories
Security, DevOps & CI/CD, AI & Agent Building, Automation & Workflows, CLI & Terminal
First seen
Jun 3, 2026

More from davila7/claude-code-templates

All 618

Recommended

More Security
1aj-geddes avatarsecrets-managementaj-geddes/useful-ai-promptsImplement secrets management with HashiCorp Vault, AWS Secrets Manager, or Kubernetes Secrets for secure credential storage and rotation.449skills.sh installs
2patricio0312rev avatarnginx-config-optimizerpatricio0312rev/skillsOptimizes Nginx configurations for performance, security, caching, and load balancing with modern best practices. Use when users request "Nginx setup", "reverse448skills.sh installs
3patricio0312rev avatarmulti-tenant-safety-checkerpatricio0312rev/skillsEnsures tenant isolation at query and policy level using Row Level Security, automated testing, and security audits. Prevents data leakage between tenants. Use 439skills.sh installs
4gocallum avatarclerk-nextjs-skillsgocallum/nextjs16-agent-skillsClerk authentication for Next.js 16 (App Router only) with proxy.ts setup, migration from middleware.ts, environment configuration, and MCP server integration.438skills.sh installs
5bobmatnyc avatardependency-auditbobmatnyc/claude-mpm-skillsDependency audit and cleanup workflow for maintaining healthy project dependencies. Use for regular maintenance, security updates, and removing unused packages.434skills.sh installs
6secondsky avatarapi-filtering-sortingsecondsky/claude-skillsBuilds flexible API filtering and sorting systems with query parameter parsing, validation, and security. Use when implementing search endpoints, building data 432skills.sh installs