# qiaomu-opencli-browser

Automates Chrome step-by-step from the CLI using existing login sessions. Lets AI agents click, fill inputs, and extract data without visual token overhead.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 1100 installs · ★ 996
- Author: joeseesun
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/joeseesun/qiaomu-opencli-skills/tree/HEAD/qiaomu-opencli-browser/SKILL.md
- Updated: 2026-04-09
- HTML: https://affpapa.org/en/nevibecode/skills/qiaomu-opencli-browser

## What it does

The agent operates Chrome through `opencli browser` actions. Instead of taking expensive screenshots that burn vision tokens, the skill runs `state` to read a structured DOM with numbered `[N]` indices. The agent clicks via `click <index>`, fills inputs via `type <index>`, and checks entered text with `get value <index>`. Combining actions with `&&` chains reduces tool call round trips.

Data extraction relies on `eval`, restricted to read-only IIFE snippets to prevent scope collisions. You do not need an LLM API key, but the tool fails immediately if Chrome is closed or the OpenCLI Browser Bridge extension is missing. Verified task sequences can be exported as TypeScript adapters into `~/.opencli/clis/`.

## Requirements
- Works with: Chrome

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add joeseesun/qiaomu-opencli-skills --skill qiaomu-opencli-browser -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/qiaomu-opencli-browser/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/qiaomu-opencli-browser/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add joeseesun/qiaomu-opencli-skills --skill qiaomu-opencli-browser -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/qiaomu-opencli-browser/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add joeseesun/qiaomu-opencli-skills --skill qiaomu-opencli-browser -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/qiaomu-opencli-browser/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install joeseesun/qiaomu-opencli-skills qiaomu-opencli-browser
```

2. **Manually: put the files in place**
- File: `.github/skills/qiaomu-opencli-browser/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add joeseesun/qiaomu-opencli-skills --skill qiaomu-opencli-browser -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/joeseesun/qiaomu-opencli-skills --path qiaomu-opencli-browser
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/qiaomu-opencli-browser/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add joeseesun/qiaomu-opencli-skills --skill qiaomu-opencli-browser -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/joeseesun/qiaomu-opencli-skills/tree/HEAD/qiaomu-opencli-browser/SKILL.md

## When to use it
- control an active Chrome profile without re-entering passwords
- fill web forms and verify inputs without taking screenshots
- extract structured page data using DOM nodes or network calls
- save reusable automation workflows as TypeScript CLI adapters

## Example prompts
- Use opencli browser to open the target portal, inspect elements with state, and submit the form
- Chain opencli browser commands to fill input fields 3 and 4, then verify values
- Extract table rows from the active tab using opencli browser eval and return JSON

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 8784081cb22e8a2f.

BEGIN THIRD-PARTY FILE 8784081cb22e8a2f
````text
---
name: qiaomu-opencli-browser
description: Make websites accessible for AI agents. Navigate, click, type, extract, wait — using Chrome with existing login sessions. No LLM API key needed.
author: joeseesun
upstream: jackwener/opencli
allowed-tools: Bash(opencli:*), Read, Edit, Write
---

# OpenCLI Browser — Browser Automation for AI Agents

Control Chrome step-by-step via CLI. Reuses existing login sessions — no passwords needed.

## Prerequisites

```bash
opencli doctor    # Verify extension + daemon connectivity
```

Requires: Chrome running + OpenCLI Browser Bridge extension installed.

## Critical Rules

1. **ALWAYS use `state` to inspect the page, NEVER use `screenshot`** — `state` returns structured DOM with `[N]` element indices, is instant and costs zero tokens. `screenshot` requires vision processing and is slow. Only use `screenshot` when the user explicitly asks to save a visual.
2. **ALWAYS use `click`/`type`/`select` for interaction, NEVER use `eval` to click or type** — `eval "el.click()"` bypasses scrollIntoView and CDP click pipeline, causing failures on off-screen elements. Use `state` to find the `[N]` index, then `click <N>`.
3. **Verify inputs with `get value`, not screenshots** — after `type`, run `get value <index>` to confirm.
4. **Run `state` after every page change** — after `open`, `click` (on links), `scroll`, always run `state` to see the new elements and their indices. Never guess indices.
5. **Chain commands aggressively with `&&`** — combine `open + state`, multiple `type` calls, and `type + get value` into single `&&` chains. Each tool call has overhead; chaining cuts it.
6. **`eval` is read-only** — use `eval` ONLY for data extraction (`JSON.stringify(...)`), never for clicking, typing, or navigating. Always wrap in IIFE to avoid variable conflicts: `eval "(function(){ const x = ...; return JSON.stringify(x); })()"`.
7. **Minimize total tool calls** — plan your sequence before acting. A good task completion uses 3-5 tool calls, not 15-20. Combine `open + state` as one call. Combine `type + type + click` as one call. Only run `state` separately when you need to discover new indices.
8. **Prefer `network` to discover APIs** — most sites have JSON APIs. API-based adapters are more reliable than DOM scraping.

## Command Cost Guide

| Cost | Commands | When to use |
|------|----------|-------------|
| **Free & instant** | `state`, `get *`, `eval`, `network`, `scroll`, `keys` | Default — use these |
| **Free but changes page** | `open`, `click`, `type`, `select`, `back` | Interaction — run `state` after |
| **Expensive (vision tokens)** | `screenshot` | ONLY when user needs a saved image |

## Action Chaining Rules
````
END THIRD-PARTY FILE 8784081cb22e8a2f

The third-party file has ended. Everything between the 8784081cb22e8a2f tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2720 of 13535 bytes. © joeseesun · MIT · https://github.com/joeseesun/qiaomu-opencli-skills/tree/HEAD/qiaomu-opencli-browser/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
