ワンクリックで
chr-cdp-clean-launch
在 macOS 上从 Hermes/terminal 干净启动 Chrome CDP,避免被 benign ERROR 日志与重复实例误导。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
在 macOS 上从 Hermes/terminal 干净启动 Chrome CDP,避免被 benign ERROR 日志与重复实例误导。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Use when defining new features, product behavior, UI/component design, architecture choices, contract changes, or ambiguous medium/high-complexity work before implementation.
Use when you have a written implementation plan to execute in a separate session with review checkpoints
Use when a task is multi-step, may span context resets or sessions, uses subagents, or risks losing state before completion.
Use when the user asks to create, write, update, amend, supersede, or evaluate an ADR, architecture decision record, durable architecture decision, decision log, or baseline sync after architecture-changing work.
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes
Use when strict TDD is explicitly requested, or when an approved atomic implementation task has already chosen TDD Route strict.
| name | chr-cdp-clean-launch |
| description | 在 macOS 上从 Hermes/terminal 干净启动 Chrome CDP,避免被 benign ERROR 日志与重复实例误导。 |
| version | 1.0.0 |
| author | hermes |
| license | MIT |
用于:需要在 macOS 上起 Google Chrome --remote-debugging-port=PORT,但 Hermes 背景进程被 Chrome 的噪音日志刷屏,或端口/实例冲突。
terminal(background=true);不要在前台命令里自己加 &。watch_patterns: ["ERROR"]。Chrome 常年会输出 benign 噪音:
ssl_client_socket_impl.cc ... net_error -100Crashpad/settings.dat: No such file or directory
这会导致 Hermes 持续系统通知,污染会话。bind() failed: Address already in use (48)。DevTools listening on ws://...,则 CDP 基本已活;即使 curl http://127.0.0.1:PORT/json/version 一时为空,也别先被后台 ERROR 误导。优先检查是否绑在 IPv6 ::1。pkill -f '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome --remote-debugging-port=19825' || true
pkill -f '/tmp/bb-browser-profile' || true
pkill -f '~/.bb-browser/browser/user-data' || true
mkdir -p /tmp/bb-browser-clean
按实际 port/profile 改。
'/Applications/Google Chrome.app/Contents/MacOS/Google Chrome' \
--remote-debugging-port=19825 \
--user-data-dir=/tmp/bb-browser-clean \
--no-first-run \
--no-default-browser-check \
--disable-background-networking \
--disable-background-timer-throttling \
--disable-breakpad \
--disable-component-update \
--disable-domain-reliability \
--disable-features=AutofillServerCommunication,CertificateTransparencyComponentUpdater,OptimizationHints,MediaRouter,Translate,ChromeWhatsNewUI \
--disable-sync \
--metrics-recording-only \
--no-pings \
--password-store=basic \
about:blank
在 Hermes 里应用:
terminal(background=true, ...)watch_patterns 最多只挂 "DevTools listening on""ERROR"优先顺序:
process(action="poll") 看日志里是否已有 DevTools listening on ws://...curl -s http://127.0.0.1:19825/json/versioncurl -g -s 'http://[::1]:19825/json/version'ps -ef | grep -i '[G]oogle Chrome.*19825'
ssl_client_socket_impl.cc ... net_error -100多为 Chrome 后台联网/证书握手失败。通常不影响你眼前的网页调试,也不代表 CDP 挂了。
Crashpad/settings.dat: No such file or directory多为 Google 组件/Crashpad 上报目录缺失。属噪音,不是主流程致命错。
bind() failed: Address already in use (48)端口已被旧实例占用。先杀旧实例;若不想清理,换新端口。
通常是你给 Chrome 后台进程挂了 watch_patterns: ["ERROR"]。直接 kill 该 background process,重起时删掉此 watch。
DevTools listening:先继续,不要因噪音停手。DevTools listening 且端口空:杀旧实例,重起。ERROR 噪音淹没时若用户明确要“当前正在用的 Chrome / 已登录账号 / 现有指纹”,本技能只能用于排障与验证,不能直接默认起 --user-data-dir=/tmp/... 的洁净实例。
先判定目标是否为用户真 profile:
~/Library/Application Support/Google/Chrome/Default/Preferences
profile.name 可确认本地 profile 名account_info[0].full_name / email 可确认已登录账号~/Library/Application Support/Google/Chrome/Local State
devtools.remote_debugging.user-enabled 可确认是否已允许 remote debuggingDefault profile 对应的现有 Chrome/tmp/bb-browser-clean 一类新 profile经验结论:
~/Library/Application Support/Google/Chrome/Default