SA

sunwood-ai-labs/logged-in-google-chrome-skill

浏览器自动化

本页由 AI 翻译,技术细节请以原文为准。 查看原文

21 stars 质量 46 趋势 10

技能用于用专用配置文件启动登录的Google Chrome会话,并通过CDP连接Playwright。

概览

使用带有专用配置文件目录的普通 Google Chrome 窗口,手动登录 Google,然后通过 CDP 连接 Playwright。这种工作流程避免了从 Playwright 启动的浏览器尝试 Google 登录时出现的“此浏览器或应用可能不安全”的屏蔽。 https://x.com/haru_maki_ch/status/2031011134564872538 - 启动一个专用的Chrome配置文件,安全可重复用于Gmail、Google账户及其他Google网页应用 - 保持用户的主Chrome配置文件与自动化分开 - 登录后通过chromium.connectOverCDP(...)连接Playwright(...) - 在多个代理任务中重复使用同一已登录的Chrome会话 - 包含启动、关闭和CDP端口验证的辅助脚本 - 用VitePress发送英语和日语双语项目文档 Google 登录经常会以类似方式拒绝自动化优先的浏览器会话: 该仓库采用更稳定的模式: 1.

概述(AI 翻译)

登录 Google Chrome 技能

使用带有专用配置文件目录的普通 Google Chrome 窗口,手动登录 Google,然后通过 CDP 连接 Playwright。这种工作流程避免了从 Playwright 启动的浏览器尝试 Google 登录时出现的“此浏览器或应用可能不安全”的屏蔽。

🎬 演示

https://x.com/haru_maki_ch/status/2031011134564872538

✨ 特色

  • 启动一个专用的Chrome配置文件,安全可重复用于Gmail、Google账户及其他Google网页应用
  • 将用户的主 Chrome 配置文件与自动化分开
  • 登录后使用 chromium.connectOverCDP(...) 附加 Playwright
  • 在多个代理任务中重复使用同一登录的Chrome会话
  • 包含启动、关闭和CDP端口验证的辅助脚本
  • 与VitePress合作的双语船舶项目文档,英文和日文版本

🎯 为什么会有这样的存在

Google 登录经常会以类似方式拒绝自动化优先的浏览器会话:

此浏览器或应用可能不安全

该仓库采用更稳定的模式:

  1. 用专用的 --user-data-dir 启动普通的 Google Chrome
  2. 让用户手动登录

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Use a normal Google Chrome window with a dedicated profile directory, log into Google manually, and then attach Playwright over CDP. This workflow avoids the “This browser or app may not be secure” block that can appear when Google login is attempted from a Playwright-launched browser.

🎬 Demo

https://x.com/haru_maki_ch/status/2031011134564872538

✨ Features

  • Launch a dedicated Chrome profile that is safe to reuse for Gmail, Google Account, and other Google web apps
  • Keep the user’s main Chrome profile separate from automation
  • Attach Playwright after login by using chromium.connectOverCDP(...)
  • Reuse the same logged-in Chrome session across multiple agent tasks
  • Include helper scripts for launch, shutdown, and CDP port verification
  • Ship bilingual project docs with VitePress in English and Japanese

🎯 Why This Exists

Google login often rejects automation-first browser sessions with a message similar to:

This browser or app may not be secure

This repository uses a more stable pattern:

  1. Start regular Google Chrome with a dedicated --user-data-dir
  2. Let the user log in manually
  3. Attach Playwright over CDP only after login succeeds

📋 Requirements

  • Windows
  • Google Chrome installed
  • Node.js 20+ recommended
  • A workspace with playwright or playwright-core available when attaching from js_repl

🗂️ Repository Layout

logged-in-google-chrome-skill/
|- SKILL.md
|- README.md
|- README.ja.md
|- agents/
|  `- openai.yaml
|- references/
|  `- troubleshooting.md
|- scripts/
|  |- launch_logged_in_chrome.ps1
|  |- close_logged_in_chrome.ps1
|  `- check_cdp_port.ps1
`- docs/
   |- .vitepress/
   |- en/
   |- guide/
   |- ja/
   `- public/

🚀 Quick Start

1. Launch dedicated Chrome

powershell -ExecutionPolicy Bypass -File .\scripts\launch_logged_in_chrome.ps1

The launch script now waits until both of these are true before it reports success:

在 GitHub 查看完整 README

推荐工具

换一个关键词,或者移除筛选条件。

安装

npx skillfish add sunwood-ai-labs/logged-in-google-chrome-skill
新手?先看 mcpskill.org 教程 →