Bash Tool (Anthropic Computer Use)
## what it does
What it does
The Bash skill gives Claude computer use agents a persistent shell session. Commands execute in sequence, environment variables persist across calls, and the agent can run multiline scripts, pipe output, and react to exit codes.
This is the reference bash tool from Anthropic’s computer-use-demo quickstart.
Installation
npx cache add anthropic-bash
# or source directly:
# https://github.com/anthropics/anthropic-quickstarts/tree/main/computer-use-demo
How it works
The bash tool maintains a persistent subprocess with a 120-second timeout per command. Output (stdout + stderr) is captured and returned to the model. The agent uses this to:
- Install packages (
pip install,npm install) - Run tests (
pytest,npm test) - Manipulate files (
grep,sed,awk) - Execute scripts end-to-end
Safety notes
The tool runs in a Docker container in the reference demo, sandboxing command execution to the container’s filesystem. If you adapt it outside Docker, treat it as executing arbitrary code with your user’s permissions.
Compatibility
Full support in Claude claude-code computer use sessions. Cline supports shell execution via its own mechanism — partial skill overlap. Cursor and Aider are not computer-use agents and cannot use this skill.
## compatibility
## embed this badge
