flow-next-drive
Drive any UI surface like a real user - a web app, a Chromium-backed desktop app (Electron / WebView2, reached over CDP), or a genuinely native app (macOS AppKit/SwiftUI, or a non-CDP webview) reached via the Cua Driver / Computer Use. Detects the surface, picks the best available driver, degrades gracefully. Use to navigate sites, verify deployed UI, test web or desktop apps, capture baseline screenshots, drive a sign-in flow, scrape data, fill forms, run an e2e check, or inspect current page state. Triggers on "check the page", "verify UI", "test the site", "test this app", "drive the app", "automate this desktop app", "read docs at", "look up API", "visit URL", "browse", "screenshot", "scrape", "e2e test", "login flow", "capture baseline", "see how it looks", "inspect current", "before redesign", "Electron app", "native app".
gmickel · 已有 AI 审核记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add gmickel/flow-next --skill flow-next-drive技能说明
name: flow-next-drive description: Drive any UI surface like a real user - a web app, a Chromium-backed desktop app (Electron / WebView2, reached over CDP), or a genuinely native app (macOS AppKit/SwiftUI, or a non-CDP webview) reached via the Cua Driver / Computer Use. Detects the surface, picks the best available driver, degrades gracefully. Use to navigate sites, verify deployed UI, test web or desktop apps, capture baseline screenshots, drive a sign-in flow, scrape data, fill forms, run an e2e check, or inspect current page state. Triggers on "check the page", "verify UI", "test the site", "test this app", "drive the app", "automate this desktop app", "read docs at", "look up API", "visit URL", "browse", "screenshot", "scrape", "e2e test", "login flow", "capture baseline", "see how it looks", "inspect current", "before redesign", "Electron app", "native app".
Codex note — Browser Use vs this skill: Codex desktop (v0.124+) bundles a Browser Use plugin (invoke
$browser-use <task>) controlling its in-app browser. Scope is narrow:localhost,127.0.0.1,::1,file://, current in-app tab. No cookies, no auth, no extensions, no production sites, no Electron apps, no mobile sims. For those narrow cases, delegate: use$browser-usedirectly, or just describe the task in prose (Codex routes natural-language plugin calls). Use this skill (the prose triggers listed above —check the page,verify UI,test this app, etc.) for everything outside that scope — production sites, authenticated flows, cookies/saved sessions, Electron / native apps, iOS Simulator, proxies, headed browsers, video recording, visual diff. In Codex CLI (no desktop app, no in-app browser), always use this skill — Browser Use is not available there.
flow-next-drive — surface-aware UI automation
Drive any UI surface the way a real user would. Whatever driver the environment has, the work is the same shape: observe / navigate → snapshot → act on fresh refs → capture evidence → release. This skill is a router: it detects the surface, picks the highest available driver on a ladder, degrades gracefully when a richer driver is absent, and hands off to a per-rung reference for the command detail.
It orchestrates drivers — it does not reimplement them. The default rung (Vercel's agent-browser CLI) is the only driver assumed present; every other rung is detected and optional. A pass must succeed with whatever the environment actually has — most cloud VMs, Linux, and CI have no Computer Use, so it is never a hard dependency and never on a headless/no-display path.
Driver ladder + universal-flow structure adapted from Ray Fernando's
running-bug-review-boardskill (Apache-2.0) — see CHANGELOG.
Step 1 — Detect the surface, then branch
Classify the target into one of three buckets and take the matching path. The universal flow (Step 2) is shared; only the actuation and the per-surface reference differ.
| # | Surface | What it is | Path |
|---|---|---|---|
| A | Web app | A URL in a browser (localhost dev server, staging, production) | Web ladder (Step 3) |
| B | Chromium-backed desktop app | Electron / Windows WebView2 — Chromium under the hood, exposes a CDP debug port | Web ladder (Step 3), attaching over CDP to the app's remote-debugging port |
| C | True-native / non-CDP surface | macOS AppKit/SwiftUI, Catalyst, or a webview exposing no CDP (macOS WKWebView, which Tauri uses on macOS) | Native rung (Step 4) — Cua Driver → Computer Use (attended); Cua Sandbox (headless/CI) |
How to decide:
- A bare URL, or a dev/staging/prod web app → A.
- A desktop app you can launch with
--remote-debugging-port=<n>(or one already exposing one) → B. Electron and Windows WebView2 are Chromium; the web ladder drives them by CDP-attach. Do not route these to Computer Use. - A desktop app with no CDP port — genuinely native (AppKit/SwiftUI), or a macOS WKWebView / Tauri-on-macOS app — → C. Per-platform caveat: Windows WebView2 is CDP-drivable (→ B); macOS WKWebView generally is not (→ C) — verify per platform.
When unsure whether a desktop app exposes CDP, probe for B first (try to launch/attach with a debug port). If no port is reachable, fall to C.
When .flow/features/ exists, Read .flow/features/README.md and the matching feature files first. They pre-resolve the route, preconditions, and gotchas. Select by **Surface:** plus sub-feature IDs (feature-entry-contract.md). Live detection above remains the fallback when the map is absent or does not cover this target.
Done when
- The target is classified A, B, or C before any driving starts, and the classification is stated. A pass that started acting before naming the surface has broken this.
- A desktop app was probed for a CDP port before being routed to C.
- When
.flow/features/existed, matching feature files were read before driving; live detection was the fallback otherwise.
Step 2 — The universal flow (all surfaces)
observe / list what's open
navigate to the target (URL, or focus the app window)
snapshot → fresh element refs (after a DOM change; for ONE known target prefer semantic find)
act → click / fill / type / press / scroll toward the next step
verify → expected text/state appeared AND console clean + no failed API/network requests
capture → screenshot + console/errors at the moment of interest (and on failure)
release → close the tab / end the session when fully done
verify is not DOM-only — every verify checks the console is clean and no API/network request failed, alongside the expected text or state. A pass declared on a green-looking DOM while a request returned 500 or the console threw an uncaught exception has broken this: that is exactly the silent breakage a real use