Browser session
Use this skill in OpenCode, Claude Code, and Codex. It owns shared route selection, the
verified Edge adapter, runtime-specific extension and in-app surfaces, CDP fallbacks,
task-tab isolation, and focus safety. Re-check installed tool instructions and live
schemas when a named surface is absent.
chrome-devtools MCP allowlist
Targets in this list bypass the browser extension in every route that offers one. An
entry matches the exact hostname and its subdomains; do not infer sibling or look-alike
domains.
Avito traffic discipline
Treat one account, browser profile, and public IP as one browsing lane for the whole
parent task. Avito work is sequential even when the rest of the research is delegated:
- appoint one Avito operator; subagents may analyze captured data but must not browse
avito.ru concurrently;
- keep only one Avito navigation, search, or listing load in flight. Prefer one task
tab; extra tabs may hold queued pages, but interact with only one at a time;
- let the current page finish loading and inspect it before requesting the next page;
shortlist from search results and reuse captured data instead of repeatedly reopening
or refreshing listings;
- do not bulk-load listings, paginate rapidly, poll availability, or run retry loops;
- when Avito shows an IP or security-check interstitial that requires no user action,
keep the same page, controller, and profile. Wait five seconds once without
reloading, navigating, or initiating another request, then inspect the same page
again. Continue serial browsing if the requested content is visible;
- if the same interstitial remains on the second inspection, or Avito returns a CAPTCHA
requiring user action,
429, timeout, access-denied, or an error page, treat it as
site throttling rather than a controller failure. Stop Avito requests across the
parent task, preserve collected results, and return DEGRADED; do not switch
controllers, profiles, agents, or IP addresses to continue;
- resume only when the user requests another check or ordinary access is already
visibly restored. Perform that check serially through the same browser profile.
Choose the surface
- Prefer a purpose-built connector, API, or CLI when it can perform the semantic
operation. An explicit request to open, inspect, or operate a browser UI overrides
this preference.
- When the target hostname matches the
chrome-devtools MCP allowlist,
use the runtime's MCP route: OpenCode uses the live chrome-devtools target in its
current tool catalog without inferring a profile; Claude Code and Codex use MCP
against the verified Edge profile. This route overrides the runtime default and an
explicit in-app selection. If MCP cannot attach or complete the operation, continue
directly to the agent-edge fallback under the shared unattended-Edge condition.
- In Claude Code or Codex, use the runtime's in-app browser immediately when the user
explicitly requests it. That explicit choice is sticky: do not substitute Edge or
another browser after an authentication or connection failure unless the user
approves the switch.
- In Claude Code or Codex, use the runtime's in-app browser for local web development
and previews unless the user explicitly requests Edge:
- Codex: its in-app browser;
- Claude Code: its Browser pane.
- For every other browser-control task, use the runtime-specific default:
- OpenCode: the live
chrome-devtools MCP exposed in the current tool catalog;
- Codex: its browser extension in the verified Edge profile;
- Claude Code:
chrome-devtools MCP against that Edge profile. Do not use the
Claude browser extension unless the user explicitly requests it.
- In Codex, if the extension is unavailable, disconnected, or lacks a required
DevTools capability, retry its documented recovery once and then use
chrome-devtools MCP against the same Edge profile.
- If MCP cannot attach or cannot perform the required operation, use
agent-edge,
which connects agent-browser to the same Edge profile. Because the current
agent-browser brings newly created and selected tabs to the foreground, use this
fallback only when the user is not simultaneously working in Edge. If that condition
is unknown and the fallback would require creating or switching tabs, ask one short
question instead of taking over the window.
- Once a controller works, keep it through ordinary stale-reference, redraw, and
timeout errors. Do not alternate controllers on the same task tab.
Outside the allowlist route above, the in-app browser remains the isolated route in
Claude Code and Codex for an explicit request and local web development. It has a
separate profile and does not carry the user's Edge extensions. Use Edge when exact
account state, region, cart, saved data, personalized content, ad blocking, or another
installed extension matters.
Shared Edge safety
Treat the executable, profile, extensions, localhost CDP endpoint, launcher, and
controllers as adapter parameters. On another machine, substitute and verify them
instead of copying the Edge-specific values below.
- use the dedicated, continuously used automation profile rather than the browser's
default profile;
- attach every controller to that same existing Edge profile rather than launching a
clean browser;
- before authenticated or private work, verify that the CDP discovery endpoint returns
success and belongs to the browser process using the expected automation profile;
controller availability alone does not establish profile identity;
- create a task-owned background tab; never assume the user's active tab is the task tab;
- when the task depends on the existing authenticated profile, never pass
isolatedContext or an equivalent new-context option; a task-owned tab provides
isolation without discarding that profile's cookies and storage;
- with an extension, use its session-owned logical task tab and leave it inactive;
- with
chrome-devtools, create the page with background: true, select it with
bringToFront: false, and never invoke Page.bringToFront or
Target.activateTarget;
- never control one tab through the extension and CDP at the same time;
- keep credentials, cookies, tokens, and local storage in the dedicated browser profile rather than copying them into prompts or repository files;
- assume the controller and model can receive inspected page contents and network data; avoid opening unrelated private surfaces, do not capture network headers unless the task requires them, and never echo secret header values into chat, logs, or files.
Do not run browser-wide HAR or broad network capture in the personal Edge profile. Use
a clean standalone agent-browser session for that work.
Verified Edge adapter
- Profile:
~/Library/Application Support/Microsoft Edge Automation.
- Launcher:
~/Applications/Edge (Agent).app with remote-debugging port 9223.
- Codex primary outside the exceptions in Choose the surface:
the ChatGPT browser extension installed in this Edge.
- Claude Code primary outside the local-development exception:
chrome-devtools MCP.
- Codex MCP route:
chrome-devtools MCP configured with
--browserUrl http://127.0.0.1:9223.
- Last fallback:
agent-edge, which wraps agent-browser --cdp 9223 against the same
profile.
- Leave pre-existing tabs, windows, downloads, bookmarks, and settings untouched.
- Re-snapshot after navigation, filtering, modal changes, and redraws because element references become stale.
- If an Edge route cannot attach, confirm that
Edge (Agent).app is running before
declaring that controller unavailable.
Read before mutating. Posting, purchasing, sending, deleting, or changing account data still requires authority from the user's request.
OpenCode
- Use the live
chrome-devtools MCP in the current tool catalog as the primary
browser-control surface. Do not infer configuration paths, flags, or a separate
in-app browser from another runtime.
- Create a task-owned page with
background: true, select it with
bringToFront: false, and keep one controller on that task page. Apply the shared
private-surface safety and Avito traffic rules.
- If the MCP is absent, use
agent-edge only under the shared unattended-Edge
condition. A restart conclusion is permitted only when safe evidence shows that the
MCP is configured but not visible in the live catalog; otherwise return DEGRADED or
BLOCKED with the missing prerequisite.
Claude Code
- For local web development, previews, and an explicit request for the built-in
browser, use the Claude Code Browser pane. Read its current tool instructions
before acting; this exception remains primary for that scope.
- For other browser work, use the
chrome-devtools MCP from ~/.claude.json with the
shared focus-safe rules. Do not initialize or fall back to the Claude browser
extension unless the user explicitly requests that extension.
- If MCP tools are absent after Edge is running, restart Claude Code once. Use
agent-edge only under the shared unattended-Edge condition.
Codex
- For local web development, previews, and an explicit request for the in-app browser,
read and follow
browser:control-in-app-browser and select its distinct in-app
binding immediately. This exception remains primary for that scope.
- Except for the allowlist route in Choose the surface,
select the Edge extension directly for other browser work. Do not let
getDefault() or getForUrl() silently choose the in-app browser. Read and follow
the installed chrome:control-chrome skill; it owns the current setup and extension
APIs.
- The Codex MCP route uses
~/.codex/config.toml and the shared focus-safe rules.
Outside the earlier exceptions, enter it only after the Edge extension remains
unavailable following its documented troubleshooting.
- If MCP tools are absent after Edge is running, restart Codex once. Use
agent-edge
only under the shared unattended-Edge condition.
Install an adapter
Read references/setup.md for the portable adapter contract and the verified Edge example. Never commit browser profile contents or credentials.
Failure behavior
For the Avito signals defined in
Avito traffic discipline, follow that section's stop rule
instead of entering the controller fallback chain.
Report cancelled or failed browser calls as failures. For an implicit/default browser
selection, use the runtime-specific chain: Codex extension → MCP → agent-edge;
OpenCode MCP → agent-edge; Claude Code MCP → agent-edge; use the allowlist route defined in
Choose the surface instead of the Codex default. For an allowed
explicit in-app choice, do not enter an Edge chain without approval. If an implicitly
selected local-development browser is unavailable, use the runtime's Edge chain and
report the fallback. Do not substitute remembered data or a public page when the task
required the authenticated source. Return DEGRADED or BLOCKED with the failed route
and missing prerequisite when the permitted chain is exhausted.
Done
Report the runtime, browser surface, controller, task-owned tab or page, requested
result, and any checks that could not be completed. For mutating work, verify the
resulting UI state or server response before claiming completion.
The onboarding declaration is the machine-readable onboarding contract.
1---2name: x9-browser-session3description: Use when browser work requires choosing between a connector, a local browser, and an existing authenticated session, or when an agent must safely operate the user's logged-in browser - «открой в моём браузере», «используй мою сессию», «поработай в залогиненном браузере», "use my logged-in browser". Do not use for ordinary web research that can be completed with direct HTTP/search tools or for browser implementation details already owned by a project-specific test skill.4---56# Browser session78Use this skill in OpenCode, Claude Code, and Codex. It owns shared route selection, the9verified Edge adapter, runtime-specific extension and in-app surfaces, CDP fallbacks,10task-tab isolation, and focus safety. Re-check installed tool instructions and live11schemas when a named surface is absent.1213## `chrome-devtools` MCP allowlist1415Targets in this list bypass the browser extension in every route that offers one. An16entry matches the exact hostname and its subdomains; do not infer sibling or look-alike17domains.1819- `avito.ru`2021## Avito traffic discipline2223Treat one account, browser profile, and public IP as one browsing lane for the whole24parent task. Avito work is sequential even when the rest of the research is delegated:2526- appoint one Avito operator; subagents may analyze captured data but must not browse27 `avito.ru` concurrently;28- keep only one Avito navigation, search, or listing load in flight. Prefer one task29 tab; extra tabs may hold queued pages, but interact with only one at a time;30- let the current page finish loading and inspect it before requesting the next page;31 shortlist from search results and reuse captured data instead of repeatedly reopening32 or refreshing listings;33- do not bulk-load listings, paginate rapidly, poll availability, or run retry loops;34- when Avito shows an IP or security-check interstitial that requires no user action,35 keep the same page, controller, and profile. Wait five seconds once without36 reloading, navigating, or initiating another request, then inspect the same page37 again. Continue serial browsing if the requested content is visible;38- if the same interstitial remains on the second inspection, or Avito returns a CAPTCHA39 requiring user action, `429`, timeout, access-denied, or an error page, treat it as40 site throttling rather than a controller failure. Stop Avito requests across the41 parent task, preserve collected results, and return `DEGRADED`; do not switch42 controllers, profiles, agents, or IP addresses to continue;43- resume only when the user requests another check or ordinary access is already44 visibly restored. Perform that check serially through the same browser profile.4546## Choose the surface47481. Prefer a purpose-built connector, API, or CLI when it can perform the semantic49 operation. An explicit request to open, inspect, or operate a browser UI overrides50 this preference.512. When the target hostname matches the [`chrome-devtools` MCP allowlist](#chrome-devtools-mcp-allowlist),52 use the runtime's MCP route: OpenCode uses the live `chrome-devtools` target in its53 current tool catalog without inferring a profile; Claude Code and Codex use MCP54 against the verified Edge profile. This route overrides the runtime default and an55 explicit in-app selection. If MCP cannot attach or complete the operation, continue56 directly to the `agent-edge` fallback under the shared unattended-Edge condition.573. In Claude Code or Codex, use the runtime's in-app browser immediately when the user58 explicitly requests it. That explicit choice is sticky: do not substitute Edge or59 another browser after an authentication or connection failure unless the user60 approves the switch.614. In Claude Code or Codex, use the runtime's in-app browser for local web development62 and previews unless the user explicitly requests Edge:63 - Codex: its in-app browser;64 - Claude Code: its Browser pane.655. For every other browser-control task, use the runtime-specific default:66 - OpenCode: the live `chrome-devtools` MCP exposed in the current tool catalog;67 - Codex: its browser extension in the verified Edge profile;68 - Claude Code: `chrome-devtools` MCP against that Edge profile. Do not use the69 Claude browser extension unless the user explicitly requests it.706. In Codex, if the extension is unavailable, disconnected, or lacks a required71 DevTools capability, retry its documented recovery once and then use72 `chrome-devtools` MCP against the same Edge profile.737. If MCP cannot attach or cannot perform the required operation, use `agent-edge`,74 which connects `agent-browser` to the same Edge profile. Because the current75 `agent-browser` brings newly created and selected tabs to the foreground, use this76 fallback only when the user is not simultaneously working in Edge. If that condition77 is unknown and the fallback would require creating or switching tabs, ask one short78 question instead of taking over the window.798. Once a controller works, keep it through ordinary stale-reference, redraw, and80 timeout errors. Do not alternate controllers on the same task tab.8182Outside the allowlist route above, the in-app browser remains the isolated route in83Claude Code and Codex for an explicit request and local web development. It has a84separate profile and does not carry the user's Edge extensions. Use Edge when exact85account state, region, cart, saved data, personalized content, ad blocking, or another86installed extension matters.8788## Shared Edge safety8990Treat the executable, profile, extensions, localhost CDP endpoint, launcher, and91controllers as adapter parameters. On another machine, substitute and verify them92instead of copying the Edge-specific values below.9394- use the dedicated, continuously used automation profile rather than the browser's95 default profile;96- attach every controller to that same existing Edge profile rather than launching a97 clean browser;98- before authenticated or private work, verify that the CDP discovery endpoint returns99 success and belongs to the browser process using the expected automation profile;100 controller availability alone does not establish profile identity;101- create a task-owned background tab; never assume the user's active tab is the task tab;102- when the task depends on the existing authenticated profile, never pass103 `isolatedContext` or an equivalent new-context option; a task-owned tab provides104 isolation without discarding that profile's cookies and storage;105- with an extension, use its session-owned logical task tab and leave it inactive;106- with `chrome-devtools`, create the page with `background: true`, select it with107 `bringToFront: false`, and never invoke `Page.bringToFront` or108 `Target.activateTarget`;109- never control one tab through the extension and CDP at the same time;110- keep credentials, cookies, tokens, and local storage in the dedicated browser profile rather than copying them into prompts or repository files;111- assume the controller and model can receive inspected page contents and network data; avoid opening unrelated private surfaces, do not capture network headers unless the task requires them, and never echo secret header values into chat, logs, or files.112113Do not run browser-wide HAR or broad network capture in the personal Edge profile. Use114a clean standalone `agent-browser` session for that work.115116## Verified Edge adapter117118- Profile: `~/Library/Application Support/Microsoft Edge Automation`.119- Launcher: `~/Applications/Edge (Agent).app` with remote-debugging port `9223`.120- Codex primary outside the exceptions in [Choose the surface](#choose-the-surface):121 the ChatGPT browser extension installed in this Edge.122- Claude Code primary outside the local-development exception: `chrome-devtools` MCP.123- Codex MCP route: `chrome-devtools` MCP configured with124 `--browserUrl http://127.0.0.1:9223`.125- Last fallback: `agent-edge`, which wraps `agent-browser --cdp 9223` against the same126 profile.127- Leave pre-existing tabs, windows, downloads, bookmarks, and settings untouched.128- Re-snapshot after navigation, filtering, modal changes, and redraws because element references become stale.129- If an Edge route cannot attach, confirm that `Edge (Agent).app` is running before130 declaring that controller unavailable.131132Read before mutating. Posting, purchasing, sending, deleting, or changing account data still requires authority from the user's request.133134## OpenCode135136- Use the live `chrome-devtools` MCP in the current tool catalog as the primary137 browser-control surface. Do not infer configuration paths, flags, or a separate138 in-app browser from another runtime.139- Create a task-owned page with `background: true`, select it with140 `bringToFront: false`, and keep one controller on that task page. Apply the shared141 private-surface safety and Avito traffic rules.142- If the MCP is absent, use `agent-edge` only under the shared unattended-Edge143 condition. A restart conclusion is permitted only when safe evidence shows that the144 MCP is configured but not visible in the live catalog; otherwise return `DEGRADED` or145 `BLOCKED` with the missing prerequisite.146147## Claude Code148149- For local web development, previews, and an explicit request for the built-in150 browser, use the Claude Code Browser pane. Read its current tool instructions151 before acting; this exception remains primary for that scope.152- For other browser work, use the `chrome-devtools` MCP from `~/.claude.json` with the153 shared focus-safe rules. Do not initialize or fall back to the Claude browser154 extension unless the user explicitly requests that extension.155- If MCP tools are absent after Edge is running, restart Claude Code once. Use156 `agent-edge` only under the shared unattended-Edge condition.157158## Codex159160- For local web development, previews, and an explicit request for the in-app browser,161 read and follow `browser:control-in-app-browser` and select its distinct in-app162 binding immediately. This exception remains primary for that scope.163- Except for the allowlist route in [Choose the surface](#choose-the-surface),164 select the Edge extension directly for other browser work. Do not let165 `getDefault()` or `getForUrl()` silently choose the in-app browser. Read and follow166 the installed `chrome:control-chrome` skill; it owns the current setup and extension167 APIs.168- The Codex MCP route uses `~/.codex/config.toml` and the shared focus-safe rules.169 Outside the earlier exceptions, enter it only after the Edge extension remains170 unavailable following its documented troubleshooting.171- If MCP tools are absent after Edge is running, restart Codex once. Use `agent-edge`172 only under the shared unattended-Edge condition.173174## Install an adapter175176Read [references/setup.md](references/setup.md) for the portable adapter contract and the verified Edge example. Never commit browser profile contents or credentials.177178## Failure behavior179180For the Avito signals defined in181[Avito traffic discipline](#avito-traffic-discipline), follow that section's stop rule182instead of entering the controller fallback chain.183184Report cancelled or failed browser calls as failures. For an implicit/default browser185selection, use the runtime-specific chain: Codex extension → MCP → `agent-edge`;186OpenCode MCP → `agent-edge`; Claude Code MCP → `agent-edge`; use the allowlist route defined in187[Choose the surface](#choose-the-surface) instead of the Codex default. For an allowed188explicit in-app choice, do not enter an Edge chain without approval. If an implicitly189selected local-development browser is unavailable, use the runtime's Edge chain and190report the fallback. Do not substitute remembered data or a public page when the task191required the authenticated source. Return `DEGRADED` or `BLOCKED` with the failed route192and missing prerequisite when the permitted chain is exhausted.193194## Done195196Report the runtime, browser surface, controller, task-owned tab or page, requested197result, and any checks that could not be completed. For mutating work, verify the198resulting UI state or server response before claiming completion.199200The [onboarding declaration](references/onboarding.json) is the machine-readable onboarding contract.