# Build Gemini Browser-Control Agents

Browser automation agents are hard to wire together safely and consistently. This skill provides setup steps and a Playwright loop for Gemini Computer Use workflows.

## Install

```bash
npx skillstore add am-will/gemini-computer-use
```

## Metadata

- - Slug: am-will-gemini-computer-use
- - Version: 1.0.0
- - Author: am-will
- - GitHub username: am-will
- - License: MIT
- - Repository: https://github.com/am-will/codex-skills/tree/main/skills/gemini-computer-use/
- - Ref: main
- - Supported tools: Claude, Codex, Claude Code
- - Risk level: medium
- - Risk factors: scripts, network, env\_access, external\_commands
- - Quality score: 50
- - Quality tier: warning
- - Public page: https://skillstore.pages.dev/skills/am-will-gemini-computer-use
- - Manifest: https://skillstore.pages.dev/api/skills/am-will-gemini-computer-use/manifest

## Capabilities

- Creates a runnable Python agent loop for Gemini Computer Use.
- Uses Playwright to open Chromium, navigate pages, and execute browser actions.
- Sends screenshots and function responses back to the Gemini model.
- Supports safety confirmation when the model requests user approval.
- Allows users to exclude predefined Computer Use actions at runtime.
- Documents environment setup for API keys and browser selection.

## Use Cases

- Prototype Browser Agents: Build a working proof of concept that lets Gemini inspect pages and operate a Chromium browser.
- Test Computer Use Workflows: Run controlled browser tasks and inspect how screenshots, function calls, and responses move through the loop.
- Evaluate Safety Controls: Experiment with excluded actions, confirmation prompts, and sandboxed browser profiles before broader deployment.

## Prompt Templates

### Run a Simple Browser Task

```
Use this skill to run Gemini Computer Use against a public website. Start at [URL], complete [task], and use no more than [turn count] turns.
```

### Restrict Risky Actions

```
Configure the Computer Use agent for [goal]. Exclude these actions: [actions]. Explain how the exclusions change the browser behavior.
```

### Adapt the Agent Loop

```
Update the Playwright agent loop for [project need]. Preserve screenshot feedback, function responses, and safety confirmation handling.
```

### Review a Deployment Plan

```
Review my plan to run this Computer Use agent on [site type]. Identify privacy risks, browser sandbox settings, excluded actions, and human approval points.
```

## Limitations

- Requires a valid Gemini API key and Google GenAI access.
- Shares browser screenshots and URLs with the Gemini service during runs.
- Does not provide an independent local safety policy for risky actions.
- Targets browser automation only, not desktop-wide computer control.

## Best Practices

- Run the browser in a fresh profile with the minimum account permissions needed.
- Use excluded actions for typing, navigation, or clicks that are not required for the task.
- Avoid pages with secrets, customer data, payments, or irreversible account actions.

## Anti Patterns

- Do not run the agent inside a browser profile that is logged into sensitive accounts by default.
- Do not source env files from untrusted repositories or shared folders.
- Do not treat model safety confirmation as a complete policy control.

## Security Audit

- - Safe to publish: true
- - Audited at: 2026-06-28T08:27:03.172\+00:00
- - Summary: Static findings for Markdown backticks, weak cryptography, and certificate files are false positives after context review. The confirmed risk is legitimate but elevated: the Python script sends browser screenshots and URLs to Gemini, then executes model-selected browser actions through Playwright.

## Stats

- - Views: 198
- - Downloads: 12
- - Favorites: 0
- - Popularity score: 0
