Skip to content

Guide · Agent skill

How to use the OpenCLI Browser Control agent skill (opencli-browser)

Updated · written with AI from the project's own documentation and checked against our catalogue data

The opencli-browser skill is an agent skill from the OpenCLI project that teaches an AI agent how to drive a real Google Chrome browser through the opencli command-line tool. It is for developers who want an agent to inspect or test a web app, people automating repetitive tasks on sites they already use, and analysts who want to find which API endpoints a page calls. After this guide you will know what the skill lets the agent do, how to install it, how to phrase requests so the agent uses it, and what to watch for.

OpenCLI Browser Controljackwener/OpenCLI · Apache-2.0

Quick start

  1. 1Install OpenCLI and connect it to Chrome. Install the opencli command-line tool and connect it to Google Chrome. If the connection fails, run opencli doctor.
  2. 2Download and unzip the skill. Download the ZIP from this page and unzip it so that SKILL.md sits in a folder named opencli-browser.
  3. 3Place the skill folder. Move the folder to ~/.claude/skills/ for personal use or to .claude/skills/ in a project. Or upload it under Settings → Capabilities → Skills in the Claude apps.
  4. 4Ask for a browser task. Describe the page, site or tabs in plain terms. The agent should choose this skill when the request matches its description.
  5. 5Reuse one session name. Let the agent open the page with a --session name and reuse that name for every later command in the task.
  6. 6Review the output. Check the JSON ok field and the data or error fields. For network results, check analysisComplete and provenance before trusting them.

What is an agent skill and what does this one let the agent do?

An agent skill is a folder containing a SKILL.md file with instructions that an AI agent loads when a task matches the skill's description. This skill's description is: drive Chrome with OpenCLI to inspect pages, interact with logged-in sites, capture API evidence, and manage native tabs, groups and windows.

Once installed, the agent can open pages, read their content and interactive elements, click, type and fill forms, take screenshots, and inspect the network requests a page makes. It can work inside sessions that reuse your logged-in Chrome profile, and it can group, rename and move Chrome tabs and windows through Chrome's native APIs.

  • Inspect pages: read URL, interactive element references and page data
  • Interact: click, fill, type, select, check, upload, drag, keys and dialogs
  • Capture network activity and find candidate API endpoints
  • Manage native Chrome tabs, tab groups and windows

How do you install the opencli-browser skill?

Download the ZIP for this skill from this page and unzip it. The skill ships as a single file, SKILL.md. Put the unzipped skill folder in one of these locations:

For a personal install across projects, place it in ~/.claude/skills/. For a single project, place it in that project's .claude/skills/ folder. Alternatively, in the Claude apps you can upload the skill under Settings → Capabilities → Skills.

The skill only teaches commands. You also need the OpenCLI command-line tool (opencli) installed and connected to Chrome, and Google Chrome with access to the profile you want to use.

  • Personal: ~/.claude/skills/opencli-browser/
  • Project: .claude/skills/opencli-browser/ inside your project
  • Claude apps: Settings → Capabilities → Skills, then upload the skill

How do you trigger the skill with natural requests?

You do not need to name the skill. The agent chooses it when your request matches its description. Ask for a task in browser terms: the page, the site you are logged into, the requests a page makes, or the tabs you have open.

The skill needs Bash tool access, because it runs opencli commands. If the agent cannot run commands, it cannot use the browser.

  • Inspect the signup page on localhost:3000 and tell me what the form fields are called.
  • Open my logged-in project board and fill in the new ticket titled Login bug.
  • Find which API endpoints the pricing page calls when I click Compare plans.
  • Group my open research tabs into a group called Research and make it blue.

What does a basic browser session look like?

Page commands require a session name. Reuse the same name for the whole task, because different sessions keep their page work separate. Use --profile <name> if you need to pick a specific Chrome profile. The skill teaches the agent to discover commands with opencli list <query> and to read exact arguments with help output.

Default output is one JSON value shaped like { "ok": true, "data": ... }. Failures return ok set to false, an error object with code, message and hint, and a nonzero exit code. When error.outcome is unknown, the agent is instructed to inspect the affected state before retrying a write.

  • Use the same --session name across one task
  • Run opencli doctor when diagnosing a connection problem
  • Use opencli browser <command> --help -f json for exact arguments
opencli browser open https://example.com --session research opencli browser state --session research opencli browser click --role button --name Search --session research opencli browser close --session research

How does the agent find and act on page elements?

The state command returns the URL and interactive element refs. Interaction targets accept a ref, a CSS selector, or semantic flags such as --role, --name, --label, --text and --testid. If several elements match on purpose, --nth resolves them. If a ref goes stale, the agent reads fresh state or locates the element again.

fill replaces a field and verifies its value, while type types text. Tab commands manage tabs within a session. A bound session attaches to your current user tab: it can navigate but cannot create, select or close tabs. unbind releases the binding without closing your tab.

  • state --diagnostics adds page title and available initial-state globals
  • state --source ax selects the accessibility tree
  • find locates elements before acting
  • frames lists frame targets; eval --frame evaluates inside a chosen frame

How do you capture API evidence from a page?

The network command returns captured request keys and response shapes. Use --detail with a request key to read one cached request, --filter to select shapes, and --raw to expose response bodies. The --static option adds candidates parsed from loaded scripts, with source locations and parameter names.

Static candidates are not executed or proven APIs. Check analysisComplete, script errors, omitted scripts and networkSource before drawing conclusions. An empty live capture can reuse a recent cache, and the reported provenance shows which happened.

  • network: list captured request keys and response shapes
  • network --detail <RequestKey>: read one cached request
  • network --static: add script-derived candidates, not confirmed APIs
opencli browser network --session research opencli browser network --detail RequestKey --session research opencli browser network --static --session research

How do you manage Chrome tabs, groups and windows natively?

Native calls need no session and do not attach a page. Use describe to list supported methods, signatures, live permissions and official documentation. Use the numeric IDs that Chrome returns, replacing the example IDs in the commands below.

Tabs and windows created natively persist. Changes that touch active OpenCLI session tabs or managed groups return managed_resource_conflict. Ordinary groups can be created, renamed, recolored, moved and dissolved, and tabs.ungroup dissolves a group.

  • describe lists all native methods; describe tabs.group shows one method's details
  • Ordinary groups can be renamed, recolored and moved
  • Session-managed tabs and groups are protected from native changes
opencli browser chrome describe opencli browser chrome describe tabs.group opencli browser chrome call tabs.query '[{}]' opencli browser chrome call tabs.group '[{"tabIds":[123,456],"createProperties":{"windowId":10}}]' opencli browser chrome call tabGroups.update '[789,{"title":"Research","color":"blue"}]'

What people use it for

  • Testing a local web app by filling a form and reading the resulting page state
  • Automating repetitive steps on a site you are already logged into, such as entering data into a form
  • Finding which API endpoints a page calls after a user action
  • Taking screenshots of a page during a review
  • Organising your open Chrome tabs into named, coloured groups

Frequently asked questions

How do I install the opencli-browser skill?

Download the ZIP from this page and unzip it. Place the opencli-browser folder in ~/.claude/skills/ for personal use or in a project's .claude/skills/ folder. In the Claude apps you can instead upload it under Settings → Capabilities → Skills.

What do I need before the skill works?

You need the OpenCLI command-line tool (opencli) installed and connected to Chrome, Google Chrome with access to the target profile, and Bash tool access so the agent can run opencli commands. The skill only teaches commands and cannot run the browser by itself.

Is the opencli-browser skill free?

The skill is licensed under Apache-2.0. This page does not state pricing for OpenCLI or Chrome, so check the project's repository for licence and usage details.

Is it safe to use on my bank or email account?

No. The agent can act inside logged-in sessions and can run arbitrary JavaScript with eval, which can cause unintended changes. Use it on sites where a mistake is low-risk, and keep sensitive accounts such as banking or email out of scope.

What is the difference between a session and a bound session?

Owned sessions keep their own leased tabs until you close them or they expire when idle. A bound session attaches to your current user tab, so it can navigate but cannot create, select or close tabs. unbind releases the binding without closing your tab.

Why does network --static show endpoints that do not appear in traffic?

The --static option parses loaded scripts and lists candidates, which are not executed or proven APIs. Confirm them against live captured requests and check analysisComplete and script errors before relying on them.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use opencli-browser if you are a developer who wants an agent to inspect or test a web app, or you regularly automate tasks on sites you already use and can tolerate some risk. Pick something else if you need to work with banking or email accounts, or if you do not want to install Chrome and the opencli tool.

Download the skill