Seamless Login Tool: Persistent Sessions via Standalone Chrome and CDP

Preface

When asking Agents to operate domestic content platforms, the common bottleneck isn’t “not knowing how to write scripts,” but rather login: QR code scanning, captchas, and risk control measures often block automation. Re-logging in for every task is costly and difficult to reproduce stably.

The following is an introduction to the SkillHub community Skill “Browser Login-Free Artifact” (coordinates @user_7850d9d3/chrome-debug-login). Its approach is not to bypass captchas in the code for you, but to launch a separate Chrome instance with a debugging port. You manually log in once, storing the Cookies in an independent user data directory. Then, the Agent manipulates this same browser instance via the Chrome DevTools Protocol (CDP), thereby reusing the logged-in state.

What is this

One-sentence positioning: A guide for Agents regarding Chrome remote debugging and login state persistence (Universal SKILL.md format).

Source and Origin: Published by community user user_7850d9d3, sourced from the community; categorized under life-service on SkillHub, current version 1.0.0. The official introduction is: “Log in once for lifetime access.” The page tags show requires_api_key=false, requiring no additional API Key.

SkillHub Page Data (based on crawl data): Rating 100000, 3044 downloads, install count 0.

Problem Solved: After completing manual login in a real Chrome (non-headless), the login state is written to disk; the Agent interacts via the debugging port on localhost to list tabs, execute JavaScript, read/write Cookies, etc., reducing the need for repeated scanning and adaptation for automated logins.

Core Functions

The following capabilities are derived from the Skill’s SKILL.md text and can be reproduced step-by-step.

  1. Independent User Data Directory
    Isolated from your daily primary Chrome to avoid conflicts between debugging configurations and main configurations, and to reduce the risk of account mixing under an exposed debugging port.

  2. Launch Chrome in Debug Mode
    Uses --remote-debugging-port=9222, --remote-allow-origins=* (often required for connecting to CDP in Chrome 128+), and --user-data-dir pointing to an independent directory. Supports Windows shortcuts, command lines, or batch auto-start.

  3. Port and Health Check
    Use curl http://localhost:9222/json/version to confirm the debugging port is available; use /json to view the list of tabs.

  4. Manual Login and Persistence Verification
    Open the target site in the debugging browser and manually log in; close it and restart to check if the logged-in state persists. The Skill documentation explains that Cookies are stored in SQLite under the independent directory (e.g., Default/Cookies) and reminds that Cookies for some platforms may still expire, requiring re-login.

  5. Common CDP Operation Examples
    The documentation provides examples of opening new tabs, closing tabs, executing Runtime.evaluate, simulating clicks and form filling, and reading page text via HTTP/WebSocket (including a Python websocket snippet).

  6. Extending to New Platforms
    Simply manually log in once to a new site in the debugging browser; the documentation states no code changes or additional configuration are needed.

  7. Security and Limitations Notes
    Emphasizes that the debugging port binds to localhost by default, suggests using minor accounts (alt accounts), and addresses FAQs such as “switching machines requires rebuilding or migrating the data directory, and acceptance by various platforms is not guaranteed.”

The 原理说明.md (Principle Explanation.md) in the same directory further explains the relationship between anti-scraping, captchas, CDP, and independent user-data-dir, which can be read in conjunction with the main document.

Installation and Activation

Install via SkillHub

The installation prompt given on the SkillHub skill page is: first read the installation instructions, then install the Skill at these coordinates.

Please install `@user_7850d9d3/chrome-debug-login` based on https://skillhub.cn/install/skillhub.md.

If you already have the skillhub CLI on your local machine, you can install the Skill to the skills directory recognized by your current Agent according to the official installation documentation (the documentation emphasizes using --dir, otherwise the default ./skills/ might not be recognized):

command -v skillhub && skillhub --version

skillhub install chrome-debug-login --namespace user_7850d9d3 --dir <your Agent skills directory>

If the CLI is not installed, the installation documentation provides a one-click script (full installation or CLI only):

curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash

Skills Directories for Various Clients (Excerpt from SkillHub Installation Docs)

Installation paths vary by client. Common examples are as follows:

  • Cursor: ~/.cursor/skills/
  • Claude Code: ~/.claude/skills/
  • Codex: ~/.codex/skills/ or .agents/skills/ under the project

After installation, restart or refresh the Agent according to the requirements of your client to load the Skill. This article has not separately verified the loading differences between Codex CLI and Claude Code; refer to their respective official instructions.

Prerequisites for Use After Activation

The Skill itself does not replace Chrome: you need to install Google Chrome on your local machine, create an independent data directory as per the documentation, and launch the browser with debugging parameters. The Agent connects to an existing debugging instance under the guidance of the Skill, rather than automatically installing the browser for you.

Typical Usage

The following is a summary based on the four stages of the Skill documentation; specific commands should be based on SKILL.md.

Stage 1: Environment Setup (One-time)

  1. Create an independent user data directory, e.g., on Linux:
    mkdir -p ~/.config/google-chrome/调试浏览器
  1. Launch Chrome (Linux example):
    google-chrome --remote-debugging-port=9222 --remote-allow-origins=* --user-data-dir=~/.config/google-chrome/调试浏览器
  1. Verify the port:
    curl http://localhost:9222/json/version

Stage 2: Manual Login (At least once per platform)

Open the target platform in the debugging browser and manually complete the login; this can be repeated for multiple sites. The documentation suggests avoiding random data clearing during the login process, and restarting Chrome after closing to check if the login state persists.

Stage 3: Agent Automation

The Agent connects to http://localhost:9222, first using GET /json to obtain the tabs and webSocketDebuggerUrl, then performs page operations via CDP. The Python examples in the documentation demonstrate how to call Network.getAllCookies and Runtime.evaluate.

Stage 4: Extending Platforms

Repeat “Open → Manual Login → Verify Persistence” on new sites.

Example command line to view tabs:

curl http://localhost:9222/json

Open a new tab:

curl -X PUT "http://localhost:9222/json/new?https://www.baidu.com"

The official documentation includes a configuration table for “Instance Reference: Shuangse Yanying Studio @Xiaolan” at the end (Chrome path, data directory name, port 9222, list of logged-in platforms, etc.), which is for setup reference only; directory names and ports can be customized based on your local environment.

Scenarios and Cautions

Who is it suitable for

  • Developers or studios who need Agents to post, read pages, fill forms, etc., in a logged-in real browser and can accept the cost of a first-time manual login.
  • Teams hoping to use CDP to uniformly control multiple tabs and platforms, rather than reverse-engineering interfaces for each site individually.

Limitations and Risks

  • Configuration Cost: Independent directories, shortcuts, ports, and firewall troubleshooting make the initial setup heavier than pip install solutions.
  • Login State is Not Absolutely Permanent: The FAQ states that Cookies for some platforms will expire, requiring re-login in the debugging browser after invalidation.
  • Security: Any process on the local machine that can access localhost:9222 can potentially control the browser; the documentation suggests using minor accounts and keeping the data directory isolated from the main Chrome.
  • Compliance and Terms: Automated control of third-party platforms must comply with the service agreements of each site and local laws; the Skill provides a technical path but does not replace your judgment on account and content compliance.
  • Headless: The documentation explicitly discourages headless mode to reduce the probability of being identified as a bot.

Conclusion

The “Browser Login-Free Artifact” breaks the problem down into two things: a human uses a real Chrome to complete a one-time login and persist the Cookies, and the Agent reuses that same instance via CDP to complete subsequent operations. If you are looking for a browser login solution on SkillHub in the life-service category that does not require an API Key, you can start by installing the Skill from the official page and coordinates @user_7850d9d3/chrome-debug-login, then set up the debugging environment step-by-step according to SKILL.md.

  • Official API Entry: https://api.skillhub.cn/user_7850d9d3/chrome-debug-login
  • SkillHub Skill Page: https://www.skillhub.cn/skills/user_7850d9d3/chrome-debug-login
  • Installation Instructions: https://skillhub.cn/install/skillhub.md
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye