From tandem
How to operate the Chrome browser shared with the human (the tandem MCP's browser_* tools). Use it whenever you need to navigate, read/analyze pages, get past blocks that require human interaction (captchas, anti-bot checkpoints, logins), or inspect the network/DOM in real time alongside the human.
How this skill is triggered — by the user, by Claude, or both
Slash command
/tandem:tandemThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
The human and you share ONE SAME Chrome in real time. The human sees it and drives it with the mouse;
The human and you share ONE SAME Chrome in real time. The human sees it and drives it with the mouse;
you operate it with the browser_* tools of the tandem MCP (Playwright over CDP). What one does,
the other sees: state, cookies, and session are the same.
browser_* tools give ECONNREFUSED 127.0.0.1:9222,
Chrome isn't running: ask the human to run /tandem:browser-start (or run it yourself if you
have the command available). Check state with /tandem:browser-status.browser_snapshot (accessibility tree, better than a screenshot
for reasoning and acting), browser_evaluate (JS), browser_network_requests, data
extraction, filling forms, clicking by snapshot ref.There are two ways to navigate; choose by the task, not one by default:
web-navigator subagent: when it's HEAVY read/extraction without walls
(large snapshots, scraping, walking many pages). The subagent swallows the DOM/snapshots in
ITS context and returns to you only the distilled data → this context isn't polluted. You share
the SAME Chrome (global state), so the human keeps seeing the window.browser_tabs (new) and work there.browser_snapshot, or by a unique durable
selector (target accepts both — [verified]). Never coordinates. If there's a profile with sel:,
acting by selector avoids the snapshot (see "Act without a snapshot" and the tandem:map skill).browser_evaluate runs arbitrary JS on the page: use it for analysis, not for destructive
actions or exfiltration. No sending session data to third parties.browser-start/-stop).
When Chrome is killed and a new one starts on the same port — a voluntary stop→start OR
Chrome dying mid-session — the MCP still holds a connectOverCDP handle to the OLD process and
doesn't notice until a tool fails.browser_* after a new Chrome fails with "Target page/context/browser has been
closed" (dead handle); that very failure triggers the reconnect, so the SECOND tool works
[verified 2026-06-29]. (ECONNREFUSED 127.0.0.1:9222 is different: no Chrome at all → /tandem:browser-start.)browser_tabs as a
WARMUP right after browser-start — so the human never sees the error. Root cause is in
@playwright/mcp's CDP reconnect (a changed-process endpoint), not in tandem's scripts.tandem:map skill)The section below is CROSS-site technique (applies to any website). The knowledge
OF-a-specific-site (its routes, its search, its locators) lives in a per-host profile
managed by the tandem:map skill (~/.claude/tandem/sites/<host>.md).
scripts/map.sh show <host>). If it exists,
read it BEFORE firing snapshots — you navigate knowingly, not re-deriving. If it doesn't exist and the
work isn't trivial, offer the human to do a recon and save it (assisted recon).eNN refs are ephemeral: in profiles, locators are anchored by role+name,
never by ref or position. Detail: the tandem:map skill and tandem/docs/01-navigation-memory.md.These rules are born from concrete navigations, not theory. They grow each time a new website breaks something. Mark each rule as [verified] (lived) or [hypothesis] (to validate).
browser_snapshot of large pages can exceed the token limit (seen:
135 K on a catalog page). Do NOT dump it into the context. Extract only what's needed with
browser_evaluate (JS that returns clean data) or with grep over the file the snapshot
saves to disk. The full snapshot is the last resort, not the first.browser_evaluate with a
targeted querySelectorAll and return a compact array, not the whole tree.target of browser_click/type/evaluate accepts a unique selector in addition
to the snapshot ref: CSS (h1) and Playwright engines (role=button[name="X"], regex in name=).
Tested resolving without a prior snapshot.tandem:map profile that has sel:, act by selector and SKIP the snapshot
(it costs ~18× the profile), validating the route first with fingerprint.mjs check (a gate, not faith).
Full flow: tandem:map skill, §"Frugal flow".browser_wait_for on the sel BEFORE acting: the
first attempt may not find the element yet.scripts/recipe.mjs compile <host> <recipe> <args>
compiles it to steps (--step, observable) or a Playwright function (--fast, 1 call via
browser_run_code_unsafe — mandatory dry-run, RCE-equivalent). Detail: tandem:map skill.a[href*="/x/"]) captures junk: auxiliary files,
duplicates, internal links. Filter and dedupe BEFORE reporting.browser_evaluate
that scrolls to the bottom in a loop until the count STABILIZES (N iterations with no
change) with a safety cap, and collects the data in the same pass:
while (stable<3 && iters<60){ scrollTo(0,scrollHeight); await sleep(350); n=count; if(n==prev)stable++ else{stable=0;prev=n} }
Result: 10→100 in 6 iterations, stopped on its own. A single tool call does all the loading.browser_evaluate using SAME-ORIGIN fetch + DOMParser
(it doesn't reload the human's window on each jump) and accumulate, with an EXPLICIT page CAP.
Seen: books.toscrape.com, 3 of 50 pages → 60 books. If you need more than the cap, raise it
consciously and say so; never walk all N without a limit or silence it.browser_evaluate of the TOP document doesn't reach them (can't read or click inside
the iframe). Seen on theguardian.com (iframe "SP Consent Message").browser_snapshot DOES flatten iframes: the buttons appear with frame refs
(like f2e58) and browser_click by that ref acts on them. Pattern: snapshot → locate the
button ("Accept all"/"Reject all") → browser_click by ref. If it fails, the human closes it with the mouse.
Accepting/rejecting cookies is the human's decision: don't click "Accept all" on your own unless
the human asks.browser_snapshot(filename: "x.md") saves relative to the MCP's cwd (ended up in ~),
IGNORING --output-dir → it clutters the home. Use an ABSOLUTE path in filename, or don't pass filename
(the automatic reference already goes to the output-dir).browser_navigate waits for the initial render (Playwright waits for 'load'): on
quotes.toscrape.com/js the 10 JS-painted quotes were ready with no extra wait. You only
need browser_wait_for for DEFERRED content (later XHR, lazy after interaction).browser_snapshot returns inline refs. Pattern: browser_type
by ref in each field → browser_click on submit (or browser_type submit:true) → verify the
post-action state (e.g. a /logout link appears). Validated on quotes.toscrape.com/login.
Login with 2FA/captcha: the human does it (human-AI handoff).Every new website that breaks a pattern → add the rule here with its [verified] mark. Don't add theoretical rules you haven't lived: this profile is valuable because it's born of evidence, not a catalog.
npx claudepluginhub bgmacris/quimera-ai --plugin tandemCreates, edits, and verifies skills using a test-driven development approach with pressure scenarios and subagents.