all repos — sz-chrome-remote-cdp @ 681ea9d0b3b89bec1ad8c57ef79ae2d4d82ef49b

pi-browser-harness, patched to drive a Chrome on another host over CDP, with castle_cdp_search web search

docs(readpage): flag SPA-shell results so models don't trust them as the page
Igor Soarez igor@soarez.org
Wed, 05 Aug 2026 13:42:46 +0100
commit

681ea9d0b3b89bec1ad8c57ef79ae2d4d82ef49b

parent

cdcfb137a83d178d0d22df0eb97aae768e8abf9c

2 files changed, 3 insertions(+), 1 deletions(-)

jump to
M skills/pi-browser-harness/SKILL.md → skills/pi-browser-harness/SKILL.md

@@ -41,6 +41,8 @@ Pass `@(x,y)` from `browser_snapshot` straight to `browser_click`. No screenshot round-trip.

`browser_web_search` and `browser_read_page` each run in their own isolated tab and never touch the user's current tab. Pair them for a research question: search for candidate URLs, then read the promising ones. +`browser_read_page` runs a reader-mode heuristic: JS-rendered pages (X, social SPAs, login walls) can come back as a short nav shell — if the result is tiny or reads like chrome, don't treat it as the page; re-read the `og:title`/`og:description` meta or pull the content with `browser_execute_js` (e.g. `document.querySelector('article')?.innerText`). + ## Connection Setup Browser control is **on-demand** — the daemon does NOT start automatically.
M src/domains/readpage/read-page.ts → src/domains/readpage/read-page.ts

@@ -158,7 +158,7 @@ "Read a page as clean article text — main content with nav/ads/boilerplate stripped. Pass a url (opened in an isolated tab, read, then closed) or a targetId of an owned tab. Reader-mode counterpart to browser_web_search.",

promptSnippet: "Read a page's main content as clean text", promptGuidelines: [ "Returns readable main-article text — use this over browser_snapshot/browser_execute_js when you want an article's content for reading or research.", - "Boilerplate-heavy or structure-less pages fall back to bounded body text rather than erroring.", + "If the result is short or reads like a nav shell (e.g. JS-rendered social pages like X, login-walled pages), extraction likely ran before the app rendered or missed the content — do NOT treat the shell as the page. Re-read via og:title/og:description, or use browser_execute_js with an article/content selector.", ], parameters: ReadPageArgs, concurrency: "parallel",