
Electron App Automation
Drives a local Electron app over CDP to snapshot, evaluate and smoke-test its UI.
Install
npx skills add different-ai/openwork --skill browser-automation -g -a claude-code -y- Repository
- different-ai/openwork24.4k
- Category
- Testing
- Updated
- 3d ago
- License
- See repository
- Context cost
- Lightabout 728 tokens
- Runs scripts
- No, instructions only
What it does
Local OpenWork Electron browser automation with CDP. Use when driving a local Electron dev app, browser_list, browser_snapshot, browser_eval, composer automation, or local UI smoke tests.
Browser Automation
For verdicts, do not drive CDP by hand, write or run an evals/core journey or evals/proofs proof (write-a-spec, run-tests). This skill is for exploration and debugging only.
What I Do
- Attach OpenCode browser tools to the OpenWork Electron app during local development.
- Drive the app UI through Electron's Chrome DevTools Protocol endpoint.
- Send a task/session from the composer and confirm the response in the UI.
Local Dev Setup
pnpm dev enables Electron CDP by default:
OPENWORK_ELECTRON_REMOTE_DEBUG_PORT=${OPENWORK_ELECTRON_REMOTE_DEBUG_PORT:-9823}
The default browser URL for OpenCode browser tools is:
http://127.0.0.1:9823
The app UI normally loads at:
http://localhost:5173/
To use a different CDP port, launch with an override:
OPENWORK_ELECTRON_REMOTE_DEBUG_PORT=9830 pnpm dev
To disable Electron CDP for a run:
OPENWORK_ELECTRON_REMOTE_DEBUG_PORT=0 pnpm dev
Background Launch
Use a detached launch when the user wants the app running in the background:
nohup pnpm dev > /tmp/openwork-dev.log 2>&1 &
Then wait for the CDP port:
lsof -nP -iTCP:9823 -sTCP:LISTEN
Browser Tool Flow
- List targets with
browser_listusingbrowser_url: "http://127.0.0.1:9823". - Select the
OpenWorktarget ID. - Read state with
browser_evalorbrowser_snapshot. - Fill the Lexical composer by targeting
[contenteditable="true"][data-lexical-editor="true"]. - Click the
Run taskbutton. - Confirm the session response by checking
document.body.innerTextor the current URL.
Send A Session
Use this browser_eval pattern after selecting the OpenWork target:
(() => {
const editor = document.querySelector('[contenteditable="true"][data-lexical-editor="true"]');
if (!editor) return { ok: false, reason: 'editor not found' };


