SkillsReviewed · zenstory-ai

browser-cdp: Chrome session reuse skill

browser-cdp is a Chrome automation skill for developers and AI-assistant users who need existing website logins, but setup can force-close regular Chrome windows and lose unsaved work. It combines agent-browser instructions with a Node.js helper that prepares a separate browser profile for Chrome DevTools Protocol (CDP) control; successful login transfer is unverified.

Researched 15 Nov 2026

In short.

browser-cdp is a browser automation skill for developers and AI-assistant users who want to reuse Chrome sign-ins, but preparing a session can close ordinary Chrome windows and lose unsaved work. Its helper copies or refreshes authentication data and checks the identity and process ownership of a newly launched debugging endpoint. Existing-endpoint reuse lacks those checks, and switching profiles without --reset can retain earlier debug-profile data. Its token-extraction example can expose live credentials to the assistant and output logs. No commands were executed; login transfer, operating-system compatibility and runtime reliability remain unverified.

Researched and written by an AI model and checked by a second AI model. How it works

Coverage comprises skills/browser-cdp/SKILL.md and skills/browser-cdp/scripts/setup-cdp-chrome.js at commit 41a9b6c855d7d29a2bf214b4eefda2b10a0e8afb, plus the repository-root LICENSE. Other repository folders, agent-browser source and dependencies, Chrome internals, websites and assistant-host integrations were not assessed. Nothing was executed. Successful setup, authentication transfer, account isolation, timing, cleanup and operating-system behavior remain UNVERIFIED.

The overview

Identity

browser-cdp lives in skills/browser-cdp within zenstory-ai/oh-story-claudecode. It comprises predominantly Chinese-language assistant instructions in SKILL.md and a Node.js helper at scripts/setup-cdp-chrome.js. The separate agent-browser command-line tool performs browser interactions.

Original source folder: [https://github.com/zenstory-ai/oh-story-claudecode/tree/main/skills/browser-cdp]. The files are pinned to commit 41a9b6c855d7d29a2bf214b4eefda2b10a0e8afb.

Assessment

The resource provides concrete guidance for an assistant that needs to navigate authenticated websites, inspect pages and interact with controls. Its useful detail lies in browser preparation, consent handling, profile recovery and checking that a newly started endpoint belongs to the intended launch.

Adoption requires accepting browser interruption and another persistent copy of authentication data. The source supports understanding the implementation, but supplies no execution results establishing reliable sign-in reuse or cross-platform operation.

Who it is for

It suits developers and technical assistant users who control the computer and Chrome accounts being automated. Beginners need familiarity with terminal commands, browser profiles and process termination. Experienced developers get readable setup code and explicit failure conditions.

The files do not establish installation procedures or compatibility guarantees for a particular assistant host. The instructions being predominantly Chinese may also affect accessibility for some users.

Capabilities

The guide documents opening pages, waiting, evaluating JavaScript, extracting page text, obtaining interactive snapshots, clicking and typing through agent-browser. Its token-reading example checks localStorage or document.cookie; it does not establish universal discovery of a site's credentials.

The helper supports status detection, a dry run, configurable ports, source-profile selection, resetting the debug profile and launching Chrome. These are implemented or documented capabilities, not demonstrated runtime outcomes.

Using it

Requirements

The guide requires Node.js 20+, separately installed agent-browser and an existing Google Chrome source profile. It lists macOS and Linux, with Windows explicitly experimental. The helper searches specific Chrome installation paths rather than accepting an arbitrary browser executable.

New-launch ownership verification requires process and port inspection tools: lsof, ss or fuser with ps on Unix-like systems, or Windows networking and process queries using netstat, PowerShell or wmic as applicable. Missing tools or permissions can make verification fail.

Actual setup rejects a missing source profile. This differs from a dry-run message suggesting it would start with an empty profile.

How it works

CDP is Chrome's remote-control interface. The helper probes [http://127.0.0.1:9222/json/version] by default. Without --reset or an explicit --profile, an existing response can trigger immediate reuse. Otherwise, setup can stop Chrome, wait for the TCP port to become free, copy or refresh profile data under ~/chrome-debug-profile, copy Local State and clear browser singleton locks.

Chrome launches with a separate user-data directory, a debugging port and --remote-allow-origins=*. Before reporting a successful new launch, the helper requires a browser WebSocket identity, a changed identity when a prior one was available, a live spawned process and ownership of all port listeners by that process tree. At least one listener must have the matching debugging-port argument. Failed startup validation triggers an attempt to terminate the newly launched process tree.

Setup

The documented preparation installs agent-browser with npm install -g agent-browser and starts with node <skill-directory>/scripts/setup-cdp-chrome.js 9222 --detect-only. If the intended debugging session is already available, browser commands connect using agent-browser --cdp 9222.

Before preparation that would terminate running Chrome, the guide requires a dry run, disclosure of the affected process count and user approval. When Chrome processes are running and --yes is not supplied, noninteractive setup exits with code 3 and NEEDS_CONSENT. In an interactive terminal it asks y/N and exits with code 2 if the user refuses. The flag represents caller confirmation; the script cannot establish whether consent was actually obtained.

--reset deletes the persistent debug directory. Explicit --profile selects the source profile and bypasses immediate endpoint reuse, but does not itself clear an existing destination. A changed port must also be used in subsequent browser commands.

Example

With the intended browser connected on port 9222 and a page already open, agent-browser --cdp 9222 snapshot -i requests references for interactive elements. The command agent-browser --cdp 9222 eval 'document.body.innerText.substring(0, 8000)' requests up to 8,000 characters of page text. These illustrate documented operations; neither command was executed and no output was observed.

Assessment & evidence

Limitations

Preparation can force-terminate Chrome by executable name, affecting ordinary windows as well as debugging sessions. Consent does not narrow that process scope. The debug profile contains copied cookies and login databases and persists after the browser closes.

Existing-endpoint detection accepts any nonempty response with an HTTP status below 400 from /json/version, without validating its JSON structure, browser identity or listener ownership. The stricter ownership checks apply to newly launched instances, so a ready status alone does not establish the intended browser session.

The guide presents authentication-token extraction as a core feature. Following its agent-browser --cdp 9222 eval 'localStorage.getItem("token") || document.cookie' example prints any returned tokens or cookies into the terminal and the AI assistant's session. This exposes any returned live credentials to the assistant and anything that logs its output. Use this step only for accounts you control.

The helper puts no access control on the debugging port and passes --remote-allow-origins=*, which drops Chrome's origin restriction on DevTools connections. While the debug window is open, programs that can reach 127.0.0.1 on that port can control the signed-in browser. Close the debug window when finished, as the guide's stop section describes.

When the debug profile already exists, --profile without --reset refreshes selected authentication files while leaving other contents in place. Earlier local storage and other profile data can therefore remain. The guide also warns that Chrome 127+ encryption and operating-system credential protections can prevent cookie transfer, requiring manual login.

The nominal 30-second startup loop is not a strict wall-clock deadline: HTTP probes and synchronous process queries can extend it. Runtime timing, cleanup completeness and platform compatibility were not assessed.

Design tradeoffs

The main benefit is coordinating an assistant's browser commands with a persistent, potentially authenticated Chrome profile. The separate directory avoids enabling debugging directly on the usual Chrome data directory, while creating another local copy of account-related data.

The new-launch identity and ownership gates are designed to avoid attaching to an old or unrelated browser. They do not establish successful authentication. Immediate endpoint reuse and partial profile refresh make unattended account or profile switching a weaker fit without additional confirmation of the resulting session.

Alternatives

For an existing, trusted CDP-enabled Chrome session, the guide supports connecting directly with agent-browser and avoiding another setup cycle. If copied authentication fails, manually signing into the persistent debug Chrome window is the documented alternative to transferring cookies.

The skill files offer no comparison with other browser automation tools, so relative reliability, security and ease of use are unknown.

Evidence

The source basis comprises the instructions [https://raw.githubusercontent.com/zenstory-ai/oh-story-claudecode/41a9b6c855d7d29a2bf214b4eefda2b10a0e8afb/skills/browser-cdp/SKILL.md], setup implementation [https://raw.githubusercontent.com/zenstory-ai/oh-story-claudecode/41a9b6c855d7d29a2bf214b4eefda2b10a0e8afb/skills/browser-cdp/scripts/setup-cdp-chrome.js] and license [https://raw.githubusercontent.com/zenstory-ai/oh-story-claudecode/41a9b6c855d7d29a2bf214b4eefda2b10a0e8afb/LICENSE].

These files support descriptions of documented commands and source-level behavior. They provide no measured success rate, benchmark, demonstrated browser journey or verified account transfer. The agent-browser implementation and Chrome internals are outside this evidence.

Access & freshness

Costs

The skill files state no pricing or usage measurements. The helper uses local Node.js and Chrome and contains no model API configuration. Charges associated with an assistant host, agent-browser or target websites are not established, and total operating cost is unknown.

Rights

The repository's MIT license permits use, modification, redistribution, sublicensing and sale of the software and associated documentation, provided the copyright and permission notice accompany copies or substantial portions. It disclaims warranties.

The skill files and repository-root license do not include separate terms for Chrome, agent-browser, assistant services or website content. The software license does not establish permission to access someone else's account or automate a particular website.

Freshness

The source snapshot was captured on 2026-11-15 at 17:51:37.940 UTC and uses commit 41a9b6c855d7d29a2bf214b4eefda2b10a0e8afb. This timestamp is not an upstream release date.

The guide does not pin an agent-browser version, and its example Chrome version is not compatibility evidence. Current main contents, upstream release history and compatibility with other Chrome builds are unknown.

Practical next steps

Obtain both skill files from the pinned source, preserve their directory relationship and retain the MIT notice with redistributed copies. Confirm the intended source profile, save browser work and inspect the dry-run output before authorizing Chrome termination.

After connecting, confirm the browser contains the intended account and page, particularly when reusing an existing endpoint or switching profiles. A clean destination requires --reset, which deletes existing debug-profile data. If cookie transfer fails, the guide recommends manual login in the debug browser.

Evidence for this report

LICENSEnotice · checked 2026-11-15
skills/browser-cdp/SKILL.mdselected · checked 2026-11-15