Skip to main content

Claude Code and Computer Use

· 4 min read
Sanjeev Sarda
High Performance Developer

Notes on Claude Code and Computer Use from Anthropic's course on Claude. Covers workflow patterns.

claude

Claude code is a CLI based coding assistant. Computer use is a set of tools that allow Claude to interact with a desktop environment. These both serve as the foundations for agents and allow for:

  • Tool integration and usage
  • Multi-step task execution
  • Environmental interaction
  • Autonomous problem-solving

You can use Claude Code for a number of phases in product development, not just writing code:

alt text

Typical Workflow

alt text

TDD Workflow

We can also use Claude code with a test driven development workflow:

  1. Feed context into Claude - Same as before, show Claude relevant files
  2. Ask Claude to think of test cases - Have Claude brainstorm what tests would validate your new feature
  3. Ask Claude to implement those tests - Select the most relevant tests and have Claude write them
  4. Ask Claude to write code that passes the tests - Claude will iterate on the implementation until all tests pass

MCP Extensions

You can use custom MCP based tools, or existing ones to enhance how Claude code works:

alt text

Automating Development with MCP and Claude Code

An example of automating the development process:

  1. A Sentry server to fetch production error details
  2. A Jira server to read ticket requirements
  3. A Slack server to notify your team when work is complete
  4. Custom servers for your internal tools and APIs

You can adapt this process by:

  • Adjusting the error detection frequency
  • Customizing which types of errors to prioritize
  • Adding specific debugging instructions for your application
  • Integrating with different logging systems
  • Setting up notifications for critical issues

Parallelizing with Claude Code

You can run multiple instances to allow parallel execution of a task if the task is decomposable and seperable:

alt text

One challenge is file conflicts - this is solved by giving each instance it's own workspace to make isolated changes which are then merged back into main using a typical feature branch workflow:

alt text

You can also automate this step using a prompt:

alt text

You can also implement this prompt as a custom command:


To create custom commands:

Add a .md file to .claude/commands
Put your prompt inside the file
Use $ARGUMENTS as a placeholder for dynamic values
Run with /project:filename argument


For example, /project:create_worktree feature_b
would create a worktree named "feature_b".

Typical Parallel Workflow

  1. Create multiple worktrees for different features
  2. Launch Claude Code in each workspace
  3. Assign different tasks to each instance
  4. Let them work in parallel
  5. Commit changes when each task completes
  6. Merge all branches back to main

You can then also use a prompt to handle the merging and handle any conflicts:

alt text

Computer Use

Useful for things like:

  • Automated QA testing of web applications
  • Data entry and form filling
  • Website navigation and information gathering
  • UI testing and validation
  • Repetitive desktop tasks

Runs in it's own isolated docker container, you interact with Claude via chat and watch the container.

Uses the same kind of flow as a regular tool where you register schemas and the LLM sends a response back to you telling you how to use the tool.

alt text

The container can run anything that supports:

  • key - Press keyboard keys
  • mouse_move - Move the cursor
  • left_click - Click at specific coordinates
  • screenshot - Take a screenshot
  • scroll - Scroll the screen

https://www.anthropic.com/learn