Top 200 ReposEXPLORER
Browse agents, categories and pages
Back to results
Planned, not doneThe source describes an intention, not a finished result.

Control a Mac Chess Session With Claude

Overview

Use the Claude computer use tool from a small program on a separate Mac user account or virtual machine so Claude can read a chess board from screenshots, make moves with the mouse and keep a move log in a text file.

Problem or Objective

More in Games and Simulations

AI Agents and Models

Tools and Integrations

Tools
Claude computer use · macOS
Prerequisites
Claude API access with the computer use tool, a separate macOS user account or virtual machine with a chess application, and code to run the agent loop.

How It Works

Set up a separate macOS user account or virtual machine with only a chess application and a text editor, signed in to nothing else. Build or adapt a computer-use agent loop that sends Claude screenshots and carries out its mouse and keyboard actions; the native-macOS reference implementation in the anthropics/claude-quickstarts repository is one way to build this. Scale screenshots and coordinates correctly for a Retina display. Start a new game against the computer, give Claude the prompt below, and let it play: after each move it writes the move in standard notation to the log file. Watch the session, stop the loop if Claude clicks outside the board, and compare the log with the game record at the end.

Implementation Workflow

Steps assembled from the agents, tools and prompt of this entry. Adapt them to your own setup.

  1. Choose the agentSet up Claude computer use.
  2. Connect the toolsConnect the tools this workflow relies on: Claude computer use, macOS.
  3. Check the prerequisitesClaude API access with the computer use tool, a separate macOS user account or virtual machine with a chess application, and code to run the agent loop.
  4. Gather your detailsCollect what the prompt asks for: Colour Claude plays, Computer opponent level, Move log file, How to make a move, Maximum number of moves.
  5. Run the starter promptPaste the starter prompt below into Claude computer use and adapt it to your case.
  6. Check against the documentationCompare what you get with the documentation at platform.claude.com before you rely on it.

Practical Starter Prompt: Play one game of chess on screen

Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].

Preview
You are playing [Colour Claude plays] in the chess application that is open on screen, against the computer at [Computer opponent level]. Use only the chess window and [Move log file] in the text editor. Before each move, take a screenshot and describe the position briefly; then make one legal move by [How to make a move]. After each move, add it in standard notation to [Move log file]. Stop after [Maximum number of moves] moves or when the game ends. Ask me before resigning, offering a draw or starting a new game, and do not open any other application.

Run this only in the separate account or virtual machine, watch the session, and answer Claude when it asks about resigning, a draw or a new game.

Expected Results and Benefits

This is a suggested workflow, not a reported result. The points below are what the cited documentation says the tools can do.

This is a suggested workflow, not a reported outcome. Anthropic's computer use documentation describes a tool that lets Claude act on a desktop through screenshots plus mouse and keyboard actions run by your own application, and notes that macOS Retina screenshots need their coordinates scaled. It also says some interface elements can be tricky to manipulate. Nothing on the pages covers chess, so whether Claude reads the board and plays legal, sensible moves has to be watched game by game.

Limitations and Considerations

Anthropic recommends a dedicated virtual machine or container with minimal privileges; do not run the loop on an account with your email, passwords or files. Each turn of the agent loop is a new API call that carries screenshots, so long games cost tokens; the documentation recommends a maximum iteration limit to prevent unexpected API costs, so set a move limit as well. It also says some interface elements can be tricky to manipulate with the mouse and suggests prompting for keyboard shortcuts then; check whether your chess app accepts click-to-move or typed moves. Results depend on your setup and were not independently reproduced by Top 200 Repos.

GitHub Repositories

Suggested Implementation Component

A repository that could serve as a building block. It is not part of the cited account and is not evidence that the workflow was run.

Sources

  1. Computer use tool - Claude Platform Docs (opens in a new tab)

    Project documentation · platform.claude.com · Undated · Source checked 25 Nov 2026, 12:00 UTC

    What this source supports
    • Anthropic recommends using a dedicated virtual machine or container with minimal privileges to prevent direct system attacks or accidents.
    • Some UI elements (such as dropdowns and scrollbars) might be tricky for Claude to manipulate using mouse movements.
    • macOS Retina displays capture screenshots at a device pixel ratio of 2, so the image is twice the resolution of the logical screen coordinates.
  2. anthropics/claude-quickstarts README (opens in a new tab)

    Project documentation · github.com · Undated · Source checked 25 Nov 2026, 11:59 UTC

    What this source supports
    • The Computer Use Demo is an environment and tools that Claude can use to control a desktop computer.
    • Computer Use Best Practices is a pedagogical, native-macOS reference implementation of a computer-use agent.
Report a problem

More with Claude computer use

Planned, not done

Complete a Sample Tax Form With Computer Use

Have Claude's computer use tool fill a blank practice copy of a tax form inside an isolated virtual machine, using figures from a local file, then check every line yourself before anything is filed.

platform.claude.com
Planned, not done

Test Visual Computer Use on a Domestic Flight Search

Try Claude's computer use tool in Anthropic's reference container on a real task: have it search a travel site for a one-way domestic flight and report the options it found, stopping before any booking step.

platform.claude.com
Planned, not done

Assemble a Complex Multi-Node Workflow through Computer Use

Run Claude's computer use tool in an isolated container and have it build a large n8n workflow node by node in the n8n editor from your written spec, with no real credentials, then test every branch yourself before publishing.

platform.claude.comn8n-io/n8n

View all: Claude computer use