How to Let AI Control Your Logged-In Browser: A Practical Guide to BrowserSkill

71 views 0 likes 0 comments 20 minutesOriginalTutorial

Step-by-step guide to installing BrowserSkill's CLI and browser extension, integrating it with AI agents like Cursor and Claude Code, and automating real-browser tasks using your existing login sessions without disrupting your normal workflow.

#AI Automation # Browser Control # BrowserSkill # Open Source # Cursor # Claude Code # Practical Guide
How to Let AI Control Your Logged-In Browser: A Practical Guide to BrowserSkill

How to Let AI Control Your Logged-In Browser: A Practical Guide to BrowserSkill

1. The Problem You Might Be Facing

As a backend developer, I use various AI coding tools daily—Cursor, Claude Code, Codex, and more. But there's always been a major pain point: these tools can only manipulate your codebase; they can't touch your browser.

What if you want AI to check data on an internal management system, scrape information from a website where you're already logged in, or automatically fill out a long testing form? Traditional solutions involve writing Selenium/Playwright scripts or setting up a separate headless browser environment. However, these approaches can't reuse your existing logged-in sessions. You'd have to create test accounts and re-implement login flows, which is time-consuming.

A much better scenario: AI temporarily borrows the browser you're already using, operates on your logged-in websites, and hands the tabs back to you once done, leaving your personal workflow completely unaffected. This is exactly what Tencent's open-source project BrowserSkill solves.

By the end of this tutorial, you will:

  • Install the CLI tool and browser extension on your machine.
  • Integrate BrowserSkill with your AI coding tools (using Cursor/Claude Code as examples).
  • Use natural language commands to let AI operate a real browser and complete a task.
  • Understand how it achieves "non-intrusive operation" without disrupting your work.

2. Prerequisites

Before we begin, ensure you meet the following requirements:

  1. Operating System: macOS (Apple Silicon / Intel), Linux (x64 / ARM64), or Windows x64 are supported. (I'm using macOS; Linux users can follow the same steps.)
  2. Browser: Chrome or Microsoft Edge (Chromium-based, supports loading extensions outside the official store). Firefox support is planned.
  3. An Active, Logged-In Browser Session: This is BrowserSkill's core use case—reusing your existing authentication state.
  4. An AI Agent with Shell Execution: This guide focuses on Cursor and Claude Code, but Codex, OpenClaw, CodeBuddy, and others are compatible.
  5. Basic Terminal Skills: Ability to run curl commands and understand basic paths/permissions.

3. Step 1: Install the CLI Tool bsk

At the heart of BrowserSkill is a command-line interface called bsk. It acts as a local bridge between your AI Agent and the browser. Installation varies by OS.

For macOS / Linux users, run this in your terminal:

bash 复制代码
curl -fsSL https://raw.githubusercontent.com/Tencent/BrowserSkill/main/install.sh | sh

This script downloads bsk to ~/.local/bin and adds it to your PATH. Verify the installation with:

bash 复制代码
bsk --version

If a version number is printed, the CLI is successfully installed.

Why this approach? AI Agents fundamentally work by executing shell commands. bsk acts as the "translator" between the AI and your browser—the AI tells bsk what to do, and bsk instructs the browser extension to execute it.

For Windows users, run this in PowerShell:

powershell 复制代码
irm https://raw.githubusercontent.com/Tencent/BrowserSkill/main/install.ps1 | iex

Verify using bsk --version as well.


4. Step 2: Install the Browser Extension

With the CLI ready, the browser needs its "hands and feet". Install the extension from your browser's official store:

After installation, you'll see a small BrowserSkill icon in your toolbar. Clicking it shows the connection status, which we'll use later.

Key Point: Once installed, the extension creates an independent "Agent Window" inside your browser. All AI operations will be confined to this window, leaving your other tabs completely untouched. This is the secret behind its "non-intrusive" design.


5. Step 3: Integrate BrowserSkill with Your AI Tool

Method 1: One-Click Setup (Recommended)

If you're using Cursor or Claude Code, the easiest method is to paste the following prompt directly into the AI chat:

复制代码
Set up browser-skill on this machine by following https://raw.githubusercontent.com/Tencent/BrowserSkill/main/AGENT_INSTALL.md

The AI will automatically read the installation guide, execute the steps, and walk you through the configuration. This is the officially recommended approach since different Agents have slightly different setup requirements, and letting the AI read the docs is the most reliable method.

Method 2: Manual Skill Installation

Alternatively, you can install it manually via the terminal:

bash 复制代码
bsk install-skill

This will prompt an interactive menu. Use the spacebar to select your target AI Agent (e.g., Cursor, Claude Code, Codex), then press Enter to confirm. To view all supported Agents, run:

bash 复制代码
bsk install-skill --list

Essentially, this command copies a SKILL.md file into your AI Agent's skills directory, teaching the Agent: "Ah, I can use bsk to control the browser."


6. Hands-On: Let AI Open a Webpage and Summarize It

With everything set up, let's run a complete practical test.

Task Description

Ask the AI to open example.com, read the page content, and summarize it.

Execution Steps

  1. Start a fresh AI Agent session (open a chat window in Cursor or Claude Code).
  2. Enter the command:
复制代码
/browser-skill open example.com and summarize what is on the page.
  1. You will see an independent Agent Window pop up in your browser. The AI, via the extension, automatically navigates to example.com, extracts the text, and returns the summary to you.
  2. Once the task is complete, the Agent Window automatically hands back tab control to you (unless you instructed it to close).

Behind the Scenes

Here's the plain-English breakdown of what just happened:

复制代码
You type command → AI detects browser operation needed → AI runs shell command `bsk ...` →
bsk CLI notifies local bsk daemon via IPC → daemon connects to browser extension via WebSocket →
extension opens target page inside Agent Window → reads content & returns to daemon → daemon to CLI → CLI to AI → AI presents result to you

The entire chain runs locally. You never hand over browser control to the cloud, ensuring security and privacy.


7. Real-World Scenario: Scraping Data from a Logged-In Dashboard

This is where BrowserSkill truly shines. Imagine you have an internal management system (e.g., DevOps dashboard, ticketing system, finance portal) where you're already logged in, and you want AI to extract data from a specific page.

Simply tell the AI:

复制代码
/browser-skill open our ticketing system homepage, navigate to the "Pending Tickets" page, and list all ticket titles along with their current status.

Because the Agent reuses your existing browser session, it requires zero additional authentication—you're logged in, so it "inherits" your session. This is notoriously difficult to achieve with Selenium (which requires separate cookie management or dedicated WebDriver sessions).


8. Special Setup for DeepSeek Harness (dsh) Users

If you're using DeepSeek Harness (dsh), BrowserSkill offers a dedicated npm plugin:

sh 复制代码
dsh plugin --profile web add @wxg-prc-cpg/browser-skill-dsh-plugin
dsh --profile web

This plugin injects native browser_* tools directly, bypassing the need to call bsk via shell. It also comes with a real-time web monitoring panel. After installation, you can skip bsk install-skill, though the bsk CLI and browser extension remain prerequisites.


9. FAQ & Troubleshooting

Q: Will my browser lag while the AI is operating it?
No. AI operations run in a completely isolated Agent Window, separate from your normal browsing experience. You can let the AI work while you continue surfing.

Q: What happens if a CAPTCHA or manual confirmation popup appears?
BrowserSkill has a built-in human-in-loop mechanism. When encountering AI-blockers (CAPTCHAs, login confirmations, etc.), it pauses and prompts you to handle it manually. Once resolved, it resumes automatically—a highly practical design.

Q: I get command not found when running bsk --version.
Verify that ~/.local/bin is in your system PATH by running echo $PATH. If missing, add the following to your shell config (.zshrc or .bashrc):

bash 复制代码
export PATH="$HOME/.local/bin:$PATH"

Then reload with source ~/.zshrc (or .bashrc).

Q: Does it support Firefox?
Not yet. Firefox support is on the roadmap.


10. Conclusion

In this tutorial, we walked through the complete BrowserSkill workflow:

  1. Install the bsk CLI (one curl command)
  2. Install the browser extension (Chrome or Edge store)
  3. Connect to your AI Agent using bsk install-skill
  4. Command your AI to operate a real browser using natural language

Its core value is clear: enabling AI to interact with your logged-in browser without interrupting your daily workflow. For developers who frequently manage backend systems, scrape authenticated pages, or automate form filling, this is an "install-and-forget" tool that quickly becomes indispensable.

Next Steps

  • Try more complex browser tasks: multi-page navigation, auto-filling forms, or taking screenshots.
  • Explore more bsk subcommands via bsk --help.
  • Dive into the architecture: check the project repo's SKILL.md and technical docs.

Project Repository: Tencent/BrowserSkill (1.4k+ Stars and growing). If you have interesting automation use cases, feel free to share them in the comments!

Last Updated:2026-08-28 10:04:20

Comments (0)

Post Comment

Loading...
0/500
Loading comments...