Agent Skills › different-ai/openwork › drive-desktop-cdp

drive-desktop-cdp

GitHub

通过CDP无头驱动桌面应用,执行JS、截图及发送Prompt,用于手动验证UI变更或复现聊天状态。

.opencode/skills/drive-desktop-cdp/SKILL.md different-ai/openwork

Trigger Scenarios

需要手动检查UI变更 复现特定的聊天状态

Install

npx skills add different-ai/openwork --skill drive-desktop-cdp -g -y
More Options

Non-standard path

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

Use without installing

npx skills use different-ai/openwork@drive-desktop-cdp

指定 Agent (Claude Code)

npx skills add different-ai/openwork --skill drive-desktop-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": "drive-desktop-cdp",
    "description": "Drive the running OpenWork app over CDP from the shell, headless by default (nothing opens on screen). Evaluate JS, take screenshots, open a new session, send a prompt with a chosen model, wait for the run to finish. Use when checking a UI change by hand in a world or pnpm dev, or when reproducing a chat state."
}

Drive the app over CDP

For verdicts, write or run an evals/core journey or evals/proofs proof (write-a-spec, run-tests). This skill is for checking changes by hand and reproducing states quickly.

Find the app

Default to the app in headless Chrome. It runs this checkout (Vite hot reload included) and opens nothing on the developer's screen:

pnpm world up dev-app-web --detach -- --browser   # prints webUrl and cdp http://127.0.0.1:<port>
pnpm world down dev-app-web                        # when you are done

Use a desktop window only when the change needs the desktop shell (titlebar, native menus, deep links, the built-in browser pane, updater, quit and relaunch) or the user asks for it. A desktop window opens and takes focus on this computer:

  • pnpm dev: CDP on http://127.0.0.1:9823.
  • pnpm world up live-desktop -- --allow-shared-state prints cdp http://127.0.0.1:<port> and uses the real installed profile.

Set CDP_URL to the address the world printed for every command.

Commands

S=.opencode/skills/drive-desktop-cdp/scripts/cdp.mjs
export CDP_URL=http://127.0.0.1:55322

node $S new-session                                 # always start a fresh session first
node $S send "Claude Opus 5.5" "Say hello"          # pick the model by its picker name, then send
node $S wait-idle 180                               # until the Run task button is back
node $S shot /tmp/after.png                         # screenshot of the whole page
node $S eval 'document.querySelector("main")?.innerText.slice(-500)'

Rules

  • Never type into an existing session: run new-session first. The app can switch sessions on its own between commands.
  • A world started with --allow-shared-state uses your real config and history. Anything you send is real.
  • Reload after state-heavy changes: node $S eval 'location.reload(); 1'.
  • Read stored v2 history when the UI hides something: sqlite3 ~/.config/openwork/opencode-v2/state/opencode.db "select type, substr(data,1,300) from session_message where session_id='<id>' order by seq".

Version History

  • b73f6c6 Current 2026-10-19 21:56

Same Skill Collection

.opencode/skills/add-a-feature/SKILL.md
.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-chrome-cdp/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/daytona/SKILL.md
.opencode/skills/diagnose-a-red-run/SKILL.md
.opencode/skills/fake-model-faults/SKILL.md
.opencode/skills/fix-design-notes/SKILL.md
.opencode/skills/fraimz/SKILL.md
.opencode/skills/get-env-var/SKILL.md
.opencode/skills/hunt-a-prod-error/SKILL.md
.opencode/skills/measure-chat-flicker/SKILL.md
.opencode/skills/open-a-pr/SKILL.md
.opencode/skills/openwork-models/SKILL.md
.opencode/skills/preview-my-work/SKILL.md
.opencode/skills/product-tutorial-pipeline/SKILL.md
.opencode/skills/prove-a-pr/SKILL.md
.opencode/skills/publish-evidence/SKILL.md
.opencode/skills/record-a-demo/SKILL.md
.opencode/skills/release/SKILL.md
.opencode/skills/reproduce-chat-states/SKILL.md
.opencode/skills/review-a-contributor-pr/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/validate-a-release/SKILL.md
.opencode/skills/verify-openwork/SKILL.md
.opencode/skills/write-a-spec/SKILL.md
.warden/skills/confidentiality-review/SKILL.md
.warden/skills/contributor-screen/SKILL.md
.warden/skills/design-spec-review/SKILL.md
.warden/skills/desktop-den-sync-review/SKILL.md
.warden/skills/diff-security-review/SKILL.md
.warden/skills/spec-provenance-review/SKILL.md
integrations/agent-plugins/openwork-connect/skills/openwork-connect/SKILL.md

Metadata

Files
0
Version
b73f6c6
Hash
15e58ba0
Indexed
2026-10-19 21:56

홈 - 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-24 21:55
浙ICP备14020137号-1