with one click
opencli-browser
// Make websites accessible for AI agents. Navigate, click, type, extract, wait — using Chrome with existing login sessions. No LLM API key needed.
// Make websites accessible for AI agents. Navigate, click, type, extract, wait — using Chrome with existing login sessions. No LLM API key needed.
Automatically fix broken OpenCLI adapters when commands fail. Load this skill when an opencli command fails — it guides you through diagnosing the failure via OPENCLI_DIAGNOSTIC, patching the adapter, retrying, and filing an upstream GitHub issue after a verified fix. Works with any AI agent.
Use when creating a new OpenCLI adapter from scratch, adding support for a new website or platform, exploring a site's API endpoints via browser DevTools, or when a user asks to automatically generate a CLI for a website. Covers automated generation, API discovery workflow, authentication strategy selection, TS adapter writing, and testing.
Use when quickly generating a single OpenCLI command from a specific URL and goal description. 4-step process — open page, capture API, write TS adapter, test. For full site exploration, use opencli-explorer instead.
Use when running OpenCLI commands to interact with websites (Bilibili, Twitter, Reddit, Xiaohongshu, etc.), desktop apps (Cursor, Notion), or public APIs (HackerNews, arXiv). Covers installation, command reference, and output formats for 87+ adapters.
基于 opencli 命令的智能搜索路由器。当用户想要搜索、查询、查找或研究信息时,尤其是涉及指定网站、社交媒体、技术资料、新闻、购物、旅游、求职、金融或中文内容时,务必使用此 skill
| name | 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. |
| allowed-tools | Bash(opencli:*), Read, Edit, Write |
Control Chrome step-by-step via CLI. Reuses existing login sessions — no passwords needed.
opencli doctor # Verify extension + daemon connectivity
Requires: Chrome running + OpenCLI Browser Bridge extension installed.
state to inspect the page, NEVER use screenshot — state returns structured DOM with [N] element indices, is instant and costs zero tokens.click/type/select for interaction, NEVER use eval to click or type — eval "el.click()" bypasses scrollIntoView and CDP click pipeline.get value, not screenshots — after type, run get value <index> to confirm.state after every page change — after open, click (on links), scroll, always run state.&& — combine commands to reduce overhead.eval is read-only — use eval ONLY for data extraction, never for clicking, typing, or navigating.network to discover APIs — most sites have JSON APIs. API-based adapters are more reliable than DOM scraping.opencli browser open <url>opencli browser state → elements with [N] indicesclick, type, select, keysopencli browser wait selector ".loaded" or wait text "Success"opencli browser state or opencli browser get value <N>~/.opencli/clis/<site>/<command>.jsopencli browser open <url> # Open URL (page-changing)
opencli browser back # Go back (page-changing)
opencli browser scroll down # Scroll (up/down, --amount N)
opencli browser state # Structured DOM with [N] indices — PRIMARY tool
opencli browser screenshot [path.png] # Save visual to file — ONLY for user deliverables
opencli browser get title # Page title
opencli browser get url # Current URL
opencli browser get text <index> # Element text content
opencli browser get value <index> # Input/textarea value (use to verify after type)
opencli browser get html # Full page HTML
opencli browser get html --selector "h1" # Scoped HTML
opencli browser get attributes <index> # Element attributes
opencli browser click <index> # Click element [N]
opencli browser type <index> "text" # Type into element [N]
opencli browser select <index> "option" # Select dropdown
opencli browser keys "Enter" # Press key (Enter, Escape, Tab, Control+a)
opencli browser wait time 3 # Wait N seconds
opencli browser wait selector ".loaded" # Wait until element appears
opencli browser wait selector ".spinner" --timeout 5000 # With timeout
opencli browser wait text "Success" # Wait until text appears
opencli browser eval "document.title"
opencli browser eval "JSON.stringify([...document.querySelectorAll('h2')].map(e => e.textContent))"
opencli browser network # Show captured API requests
opencli browser network --detail 3 # Show full response body of request #3
opencli browser network --all # Include static resources
opencli browser close # Close automation window
Always chain when possible — fewer tool calls = faster completion:
# GOOD: open + inspect in one call
opencli browser open https://example.com && opencli browser state
# GOOD: fill form in one call
opencli browser type 3 "hello" && opencli browser type 4 "world" && opencli browser click 7
# GOOD: click + wait + state in one call
opencli browser click 12 && opencli browser wait time 1 && opencli browser state
state first — never guess element indiceseval for data extraction — eval "JSON.stringify(...)" is faster than multiple get callsnetwork to find APIs — JSON APIs are more reliable than DOM scrapingopencli op is shorthand for opencli browser| Error | Fix |
|---|---|
| "Browser not connected" | Run opencli doctor |
| "attach failed: chrome-extension://" | Disable 1Password temporarily |
| Element not found | opencli browser scroll down && opencli browser state |
| Stale indices after page change | Run opencli browser state again |