Skip to content
cccskills
FreePublished on GitHub

octop-browser

AI browser automation via CDP. Use when you need to control a browser, navigate pages, click elements, fill forms, extract content, or take screenshots.

The English summary is being prepared. Showing the original description.

Works withPlaywright
See how to install

Files included (1)

  • SKILL.md5.4 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

octop-browser Browser Automation

You drive a real Chrome browser via the Chrome DevTools Protocol (CDP) by running the octop-browser CLI through the Bash tool. Each invocation attaches to the same Chrome process per profile, so a sequence of commands shares one persistent session.

Core Rules

  1. Always run dom-tree before click — refs expire on navigation.
  2. Default to --level interactive (~200-500 tokens) to get clickable/typeable elements.
  3. Use --level minimal (~50 tokens) only to confirm page state or URL.
  4. Use --level full (~1000-3000 tokens) only when reading page content.
  5. Use --level structured when you need JSON for programmatic processing.
  6. Never hardcode coordinates — always pass --ref from dom-tree.
  7. Use named profiles to persist login state across runs: --profile work, --profile github.
  8. On CDP error: run dom-tree --level minimal to check state, then retry.
  9. Tear down with close-session --profile <name> when finished — Chrome itself keeps running so you can reattach later.

Standard Workflow

# 1. Navigate
octop-browser navigate "https://example.com" --profile default

# 2. Get interactive elements with refs
octop-browser dom-tree --profile default
# Output:
#   [ref=inp_1] input[text] placeholder="Search"
#   [ref=btn_2] button "Search"

# 3. Act using refs — never coordinates
octop-browser click --ref inp_1 --profile default
octop-browser type "hello" --profile default
octop-browser click --ref btn_2 --profile default

# 4. (optional) capture proof
octop-browser screenshot --path /tmp/result.png --profile default

Add --json to any command when you want the full structured ToolResult (success / content / metrics / metadata / error) instead of the human-readable default.

Commands Reference

CommandRequired argsCommon options
navigate <url>url--profile, --json
dom-tree—--level {minimal,interactive,full,structured}
screenshot—--full-page, --element-ref REF, --path PATH
clickone of --ref REF / --selector CSS / --xy X Y
type <text>text--ref REF (click before typing)
scroll—--direction {up,down,left,right}, --amount N
hover <ref>ref
eval-js <expression>expression
go-back / go-forward / reload—
list-tabs—
new-tab—--url URL
switch-tab <tab_id>tab_id
close-tab—--tab-id ID
close-session—(only --profile)

All action commands accept --profile, --json, and one of --auto / --headed / --headless (the launch-mode flag is only honoured on the first call per profile — Chrome is reused after that).

Screenshots

screenshot writes a PNG to disk and prints its path (not base64). With --json, the response also includes metadata carrying url / title / width / height / size_kb / full_page.

  • Default path: BROWSER_USE_SCREENSHOTS_DIR/octop-<timestamp>.png (default ~/.octop-browser/screenshots/)
  • --full-page — capture the entire scrollable page in one call
  • --element-ref btn_2 — crop to a specific element (mutually exclusive with --full-page; element wins)
  • --path /tmp/latest.png — pin the file path; every call overwrites it

Configuration (environment variables)

All knobs are env-driven; no code changes between dev / CI / prod.

VariableDefaultUse
BROWSER_USE_MODEautoauto / headed / headless (auto picks based on DISPLAY)
BROWSER_USE_PROFILES_DIR~/.octop-browser/profilesWhere Chrome user-data-dirs live
BROWSER_USE_SCREENSHOTS_DIR~/.octop-browser/screenshotsDefault screenshot output directory
BROWSER_USE_CHROME_BINauto-detectPath to Chrome (also auto-detects Playwright's bundled Chromium)
BROWSER_USE_CDP_HOSTlocalhostRemote/Docker Chrome host
BROWSER_USE_CDP_WS_URL—Bypass launcher; connect directly to a WS URL

Login State Reuse

Profile data lives in ~/.octop-browser/profiles/<name>/. Reusing the same profile name in future sessions reuses Chrome cookies — no re-authentication needed.

# First run: log in manually (needs a desktop / headed mode)
octop-browser navigate "https://github.com/login" --profile github --headed
# ... complete login in browser ...

# All future runs: login reused automatically
octop-browser navigate "https://github.com" --profile github

Installation

pip install octop-browser

# Chrome or Chromium required:
# Ubuntu: sudo apt install chromium-browser
# macOS:  brew install --cask google-chrome
# Or, no system browser: octop-browser install-browser
#   (auto-installs `playwright` then downloads a Chromium binary; set
#    OCTOP_SKIP_PLAYWRIGHT_PIP=1 to skip the pip step)

Python API (alternative)

If you'd rather embed octop-browser in a Python script instead of shelling out, the same actions are available as from octop_browser import browser_tool returning a ToolResult. The CLI is the recommended path for skill / agent use — it's stateless from the caller's perspective and round-trips through the shell cleanly.

Repository

https://github.com/TencentCloud/octop-browser

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

AI 浏览器自动化工具,基于 CDP 协议。需要控制浏览器、页面导航、点击元素、填写表单、提取内容或截图时使用。

The English summary is being prepared. Showing the original description.

TencentCloud/octop-browser55Updated Oct 8, 2026

Publish the octop-browser Python package: cut a release branch from develop, bump version, update CHANGELOG / README, open a PR to main; after merge, Actions tag on main (PyPI + GitHub Release) and sync main into develop. Use when the user asks to publish, release, bump version, cut a release, or run /publish.

The English summary is being prepared. Showing the original description.

TencentCloud/octop-browser55Updated Oct 8, 2026

See all skills by TencentCloud

Report a problem with this skill