Agent Skillsdifferent-ai/openwork › daytona-chrome-cdp

daytona-chrome-cdp

GitHub

在Daytona沙箱中启动独立Chrome浏览器并通过CDP控制,用于Web登录、OAuth流程及与Electron环境隔离的网页操作验证。

.opencode/skills/daytona-chrome-cdp/SKILL.md different-ai/openwork

触发场景

需要在沙箱中运行标准Chrome而非Electron 执行Web端登录或OAuth授权流程 进行纯浏览器环境的自动化测试

安装

npx skills add different-ai/openwork --skill daytona-chrome-cdp -g -y
更多选项

非标准路径

npx skills add https://github.com/different-ai/openwork/tree/dev/.opencode/skills/daytona-chrome-cdp -g -y

不安装直接使用

npx skills use different-ai/openwork@daytona-chrome-cdp

指定 Agent (Claude Code)

npx skills add different-ai/openwork --skill daytona-chrome-cdp -a claude-code -g -y

安装 repo 全部 skill

npx skills add different-ai/openwork --all -g -y

预览 repo 内 skill

npx skills add different-ai/openwork --list

SKILL.md

Frontmatter
{
    "name": "daytona-chrome-cdp",
    "description": "Launch and control standalone Chrome in a Daytona sandbox via CDP. Use for web sign-in, OAuth, Den Web setup, browser-only flows, or when the app should not be driven through Electron CDP."
}

Daytona Standalone Chrome CDP

Use this skill when a Daytona sandbox needs a normal Chrome/Chromium browser in the XFCE display, separate from the Electron app. This is useful for Den Web sign-in, OAuth provider setup, browser-only admin flows, and checking what a user would see in a regular browser.

Launch Chrome

Run inside the Electron or server sandbox:

daytona exec "$SANDBOX" -- "bash -lc 'mkdir -p /tmp/daytona-chrome-profile; DISPLAY=:99 nohup chromium --no-sandbox --disable-dev-shm-usage --remote-debugging-address=0.0.0.0 --remote-debugging-port=9222 --user-data-dir=/tmp/daytona-chrome-profile about:blank >/tmp/daytona-chrome.log 2>&1 &'"

If chromium is missing, try google-chrome, google-chrome-stable, or install Chromium in the sandbox only when needed.

Get The CDP URL

CHROME_CDP_URL=$(daytona preview-url "$SANDBOX" -p 9222 2>/dev/null | grep -v '^time=')

Then connect browser tools:

browser_list({ browser_url: CHROME_CDP_URL })

Verify It Is Not Electron

After selecting the Chrome target:

navigator.userAgent

Expected: contains Chrome/ or Chromium/ and does not contain Electron/.

Drive A Web Flow

Use normal browser tools:

browser_navigate({ browser_url: CHROME_CDP_URL, target_id: TARGET_ID, url: DEN_WEB_URL })
browser_snapshot({ browser_url: CHROME_CDP_URL, target_id: TARGET_ID })
browser_click({ browser_url: CHROME_CDP_URL, target_id: TARGET_ID, uid: UID })
browser_fill({ browser_url: CHROME_CDP_URL, target_id: TARGET_ID, uid: UID, value: VALUE })

Validate with the daytona-flow-validator loop. Do not assume navigation or sign-in worked until the post-action snapshot or URL proves it.

Common Uses

  • Sign into Den Web while Electron remains on the desktop handoff screen.
  • Complete OAuth approval pages from a mock or real provider.
  • Configure web-only admin state before validating Electron sync.
  • Compare Den Web behavior against Electron cloud account behavior.

Stop Chrome

daytona exec "$SANDBOX" -- "bash -lc 'pkill -f \"chromium.*remote-debugging-port=9222\" || pkill -f \"chrome.*remote-debugging-port=9222\" || true'"

版本历史

  • ff5d298 当前 2026-08-20 11:35

同 Skill 集合

.opencode/skills/agent-first-screenshots/SKILL.md
.opencode/skills/browser-automation/SKILL.md
.opencode/skills/build-a-witness/SKILL.md
.opencode/skills/cloud-dashboard-walkthrough/SKILL.md
.opencode/skills/create-plugin/SKILL.md
.opencode/skills/daytona-cloud-instance/SKILL.md
.opencode/skills/daytona-cloud-server/SKILL.md
.opencode/skills/daytona-dev/SKILL.md
.opencode/skills/daytona-electron-den/SKILL.md
.opencode/skills/daytona-electron-test/SKILL.md
.opencode/skills/daytona-flow-validator/SKILL.md
.opencode/skills/daytona-recording-artifacts/SKILL.md
.opencode/skills/daytona-secrets-volume/SKILL.md
.opencode/skills/daytona-seeded-cloud-demo/SKILL.md
.opencode/skills/daytona-windows-cert/SKILL.md
.opencode/skills/diagnose-a-red-run/SKILL.md
.opencode/skills/fraimz/SKILL.md
.opencode/skills/get-env-var/SKILL.md
.opencode/skills/openwork-models/SKILL.md
.opencode/skills/product-tutorial-pipeline/SKILL.md
.opencode/skills/prove-a-pr/SKILL.md
.opencode/skills/publish-evidence/SKILL.md
.opencode/skills/run-evals/SKILL.md
.opencode/skills/run-tests/SKILL.md
.opencode/skills/shadcn/SKILL.md
.opencode/skills/upload-photo/SKILL.md
.opencode/skills/write-a-spec/SKILL.md
.warden/skills/desktop-den-sync-review/SKILL.md
.warden/skills/diff-security-review/SKILL.md

元信息

文件数
0
版本
757601b
Hash
f0d409e3
收录时间
2026-08-20 11:35

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-17 00:15
浙ICP备14020137号-1