Browser Harness — Prompts
Verbatim Excerpt 1: SKILL.md — Core CDP Guidance
## What actually works
- Screenshots first: use capture_screenshot() to understand the current page quickly, find visible targets, and decide whether you need a click, a selector, or more navigation.
- Clicking: capture_screenshot() → read the pixel off the image → click_at_xy(x, y) → capture_screenshot() to verify. Suppress the Playwright-habit reflex of "locate first, then click" — no getBoundingClientRect, no selector hunt. Drop to DOM only when the target has no visible geometry (hidden input, 0×0 node).
- Bulk HTTP: http_get(url) + ThreadPoolExecutor. No browser for static pages (249 Netflix pages in 2.8s).
- After goto: wait_for_load().
- Wrong/stale tab: ensure_real_tab().
- Verification: print(page_info()) is the simplest "is this alive?" check, but screenshots are the default way to verify whether a visible action actually worked.
- DOM reads: use js(...) for inspection and extraction when the screenshot shows that coordinates are the wrong tool.
Technique: "Coordinate clicks default" opinionated guidance. Explicit suppression of Playwright-style habits. Describes decision tree as "if X then Y" rules. Anti-pattern prohibition ("no getBoundingClientRect, no selector hunt").
Verbatim Excerpt 2: SKILL.md — Design Constraints
## Design constraints
- Coordinate clicks default. Input.dispatchMouseEvent goes through iframes/shadow/cross-origin at the compositor level.
- Connect to the user's running Chrome. Don't launch your own browser.
- cdp-use is only for CDPClient.send_raw. Prefer raw CDP strings over typed wrappers.
- run.py stays tiny. No argparse, subcommands, or extra control layer.
Technique: Iron-Law constraints. Each constraint is a prohibition or a default behavior. Four constraints govern the entire architecture. Pattern is closest to superpowers' "explicit antipatterns" approach but applied to implementation details.
Verbatim Excerpt 3: Self-Healing Pattern (from README)
● agent: wants to upload a file
│
● agent-workspace/agent_helpers.py → helper missing
│
● agent writes it agent_helpers.py
│ + custom helper
✓ file uploaded
Technique: Visual ascii-art workflow diagram showing the self-healing loop. The prompt pattern: when a capability is missing, write it to agent_helpers.py rather than failing or asking the user.