Agent browser

From CalebDane7/agent-browser · View interactive version

Agent browser is an AI agent skill from the GitHub repository CalebDane7/agent-browser. Use real Chrome for app/UI testing, sign-in/login, dashboard verification and browser tasks, even if unnamed. Excludes information-only research.

How to use this skill

Skill file

Agent Browser

Use the installed agent-browser command in the user's existing Windows Stable Chrome.

Default to the runtime's configured default account; select another enrolled

profile only when requested. Work in your own background tabs, alongside the

user and other agents.

Every task that needs real browser interaction or browser-visible proof uses

this skill, including browser work inside a project whose main artifact is not

a website. Perform every accessible browser action yourself. Do not delegate

clicks, navigation, inspection, screenshots, setup, or verification to the

user, and do not request manual confirmation for actions the user has already

authorized. Ask for user input only at a proven user-only boundary, while

retaining the exact tab and session as instructed below.

App testing includes signing in. On a login page, read

authentication before deciding access is blocked.

Use the saved sign-in or, for an app the user owns, retrieve the existing app

login from its authorized deployment. If that deployment has the password,

use it privately and sign in yourself; do not ask the user for it. A password

field alone is not a user-only boundary. This skill also covers browser-visible

proof inside non-web projects, forms, downloads, screenshots and existing-tab

help; API/source-only checks do not need a browser. Wallet/extension requests

retain the state protections below and do not gain extension-UI access.

Start Here

Parallelize immediately when independent work can finish sooner. Give each

worker a unique session and its own tab tree, even within the same profile.

Serialize only dependent actions, writers to the same tab, or changes that could

race shared account state. Open only tabs needed now—not idle placeholders.

Generate these values once and retain them across tool calls; shell variables

do not necessarily survive a new tool call. Repeat the exact account and session

on every command, including cleanup:

# Use an exact enrolled handle (see "Choose The Account"). To use the configured
# default instead, omit --account consistently on every command.
: "${browser_account:?Set the requested alias from the local operator mapping}"
IFS= read -r task_uuid </proc/sys/kernel/random/uuid
browser_session="browser-task-${task_uuid//-/}"
agent-browser --account "$browser_account" --session "$browser_session" open URL
agent-browser --account "$browser_account" --session "$browser_session" snapshot -i --compact
# Act on the intended control's fresh ref; verify the requested visible result.
# When finished, close—unless this tab is still being used with the user.
agent-browser --account "$browser_account" --session "$browser_session" close

Ordinary browsing needs no installation audit, connection setup, Chrome launch,

prewarm, or reference-file reading. open reuses the approved private transport.

For a missing installation or a newly requested profile, read

fast setup and reuse once. Do not reinstall to retry a

failed task; setup and ordinary connection recovery are different paths.

Close Finished Tabs; Preserve Co-Working Tabs

wait for its process to exit. Do not leave blank or finished tabs consuming

memory, and do not wait for other workers before cleaning up your own lane.

or it awaits genuine user-only input. Retain the exact account/session and

report why it stays open; resume there, not in a replacement tab. A finished

task with no active collaboration is not a reason to retain it.

close a user's pre-existing tab, another worker's tab, or an entire browser

as task cleanup. The scoped connection-recovery exception below is separate.

End an invited user-tab attachment by detaching, not by closing the user tab.

owner, or cleanup failed with the compact error. Run cleanup in the original

worker: the installed wrapper binds the alias to its real owner namespace.

Reusing a child's alias from the parent does not access or close the child's

tab. Resume that worker for cleanup when possible; otherwise report the exact

failure to the runtime maintainer. Never forge owner metadata or use broad

cleanup.

Small Parallel Worker Packet

Read the agent-browser skill. Account: <handle>. Session: <unique purpose + UUID>.
Task/URL: <independent workflow>. Allowed actions: <read-only or exact writes>.
Result: <observable outcome>. Own only this session's tab tree.
Open → compact snapshot → act → verify → close, including after failure.
Preserve a tab still being used with the user or awaiting genuine user input.
Return the result, minimal evidence/error, and exact cleanup/retention status.

Workers open their own tabs when ready. Refill useful independent lanes as they

finish. Never share element refs across sessions or have two writers operate

the same tab. The current cap is 16 live sessions total, not a target: normally

use only a few and release each as soon as its work ends.

The installed wrapper separates real agent owners even if their aliases match.

Keep the same worker for an ongoing workflow; a new worker with the same name

gets its own tab. Confirmed native owner-process death triggers exact cleanup;

child-thread completion alone does not prove process death or cleanup.

Choose The Account

Account handles are local to each installation; none are built in.

account handles and the Chrome profile directory each one maps to.

enrolled handle from that local mapping. Display names, emails, and profile

directories are not automatically valid handles.

List the handles without printing the file's private profile keys:

node -e 'const c=require(process.env.HOME+"/.config/agent-browser/extension-profiles.json");for(const p of c.profiles)console.log(p.account+" -> "+p.profileDirectory)'

Keep this machine-specific mapping private; never publish it or copy it into

shared instructions.

A session name does not select an account. Omission of --account selects

the configured default for that command. Do not invent email aliases or

silently substitute a different profile. For a new mapping/enrollment, follow

fast setup and reuse.

Verify the page's visible identity before account-sensitive actions. Use the

correct profile's saved sign-in/account chooser before asking for login input.

Background And User-Tab Collaboration

Normal open creates an inactive task tab. An offline enrolled profile starts

without a startup window; its extension creates a minimized task window only

when needed and retires that owned window after its last task closes. Do not

pre-open one window per profile or activate Chrome merely to inspect a page.

Website-triggered popups can bring Chrome forward; ordinary task tabs must

still stay inactive. This accepted limitation does not authorize agent-driven

activation or waive cleanup of exact task-owned popup descendants. A finished

task's owned popup left after close is a cleanup failure; report the exact

error to the runtime maintainer without closing guessed or user-owned tabs.

For explicit help in the user's selected tab, use --current-tab with the

requested account and a fresh session. The first command claims that profile's

currently focused tab; verify its URL before acting. Keep the flag and the exact

account/session on subsequent commands. Once attached, the user can minimize

Chrome and work elsewhere; commands continue without bringing it forward.

Matching close detaches and leaves the user's tab open. Claim, minimized

interaction, and detach/survival passed the maintainer's real-Chrome check on

September 6, 2026. Details:

session management.

Multiple explicitly invited agents may share one user tab. Complete commands

are serialized there, each agent retains its own session, and each close

detaches only that agent. Use separate owned tabs for independent work.

At unavoidable user input, retain the task session. With the user's permission,

use foreground --input-boundary TYPE as documented in

commands; otherwise identify the tab for the user to

select. After input, background must repeat the exact account, session, and

--current-tab prefix when applicable. It conditionally returns only while the

saved handoff is still valid. Cancellation, denial, an unconfirmed result, or

no handoff does not promise focus; do not retry or force focus. Resume in the

same tab and preserve it while working together.

Fast Interaction Loop

get or is for a specific value/state, find for a semantic control,

screenshot for pixels, and console / errors for page diagnostics.

See commands for syntax and availability. New

full-page/selector/JPEG capture, relative uploads, error-buffer clearing,

and bounded JSON improvements are now installed and documented there. Use the

ordinary command; do not switch binaries to access them.

click, fill, or get. Ref labels alone do not identify the right control.

Each new snapshot replaces the ref map, including scoped snapshots. Use refs

only from the latest successful snapshot. Scope with CSS, not an @ref; do

not dump get text body by default.

snapshot -i --compact --json, after the usual account/session prefix.

JSON is a format, not a guarantee of small output; scope the observation first.

Always wait for command exit, even if output arrives early; another session

may continue meanwhile. Take screenshots when visual evidence adds value.

Reload/reopen to verify persistence when the task requires a saved change.

for source/header/status checks; do not start browser tabs for those alone.

Failure And State Protection

For a previously working browser connection that is now lost, use the normal

close/reopen recovery below first—not toolbar pinning, pairing or a setup audit.

The wrapper already attempts bounded recovery, including starting an offline

enrolled profile once. Preserve the primary browser or website error separately

from any later ownership or cleanup diagnostic. For an ordinary navigation or

site failure, diagnose the website, DNS, or local-preview owner with read-only

tools and current project authority; do not treat the website failure itself as

an Agent Browser runtime fault or ask the user to perform routine checks. Report

transport, ownership, wrapper, or browser-runtime failures, with the exact

error, to the runtime maintainer through the

repository issues;

installation, new-profile enrollment, and extension/pairing problems belong to

fast setup and reuse. If

the requested action succeeded but cleanup failed, preserve the cleanup error

without replaying the action. When a command error and cleanup diagnostic both

matter, retain both. Do not repeat an unchanged failed action, cycle new

sessions, replace an authenticated tab, or repeat a mutation. Keep unrelated

independent work moving; report a failure once with the next evidence-changing

action, not repeated status messages.

9222, unscoped direct Chrome launch, browser-runtime doctor, a different browser,

copied profile, custom state, or alternate --user-data-dir.

previously showed extension icons while losing the user's working

authentication/wallet state.

One normal, scoped Chrome close/reopen is the first lost-connection recovery below. An enabled

extension or browser-wide debugging banner is not proof of profile enrollment.

Pairing is per profile; ordinary reuse should not ask again. For a missing

installation or a newly requested profile, follow

fast setup and reuse and perform its steps yourself,

including loading the extension and the pairing click. A fresh pairing or

approval prompt during ordinary reuse needs diagnosis; do not re-pair,

reinstall, or click through it to retry a failed task.

vaults/recovery data, MetaMask settings, or hardware-wallet/USB configuration.

Existing app credentials from the authorized deployment may be retrieved and

used only for its sign-in through the authentication guidance above.

The ordinary route controls page tabs, not extension UI/storage. A site

connection does not authorize a wallet signature or transaction.

chat or shell. Keep that tab/session for the user, as described above.

Recovery After Restart Or Account/Token Changes

A previous offline error is not current connection state. Check the installed

broker's current health once through its supported control contract; compare

any failure receipt's time and broker generation. If the requested profile is

now connected, resume the same account/session and verify its URL and visible

page. An old profile-unbound receipt can coexist with a healthy enrolled

profile.

When recovery is authorized, perform accessible setup yourself. Do not ask the

user to open Chrome merely because no window is visible. If a previously working

profile is currently offline, **first normally close and reopen that same Chrome

profile once**, using the supported exact-profile/native recovery route. The

wrapper's windowless bootstrap is not proof that this normal restart was tried.

Bind the actual mapped profile directory and affected windows/sessions; preserve

saved tabs, cookies and login state, and do not dismiss an unsaved-work prompt.

Resolve any real conflict with another active owner before closing its window.

Keep background operation where supported; never force focus restoration.

Then resume the same account/session and check the intended page through ordinary

Agent Browser. If recovered, stop troubleshooting. Only if this attempt fails (or

cannot safely run) inspect the specific remaining failure before proposing pinning,

pairing, re-enrollment, extension changes or a deeper transport repair. A profile

label, enabled icon or old unbound receipt does not prove the mapped profile lost

its enrollment. Do not repeat the restart without new evidence, kill all Chrome

or WSL, clear saved state, or replace the profile. A website/login error is not a

lost browser connection; an account/token change alone does not prove one.

Read More Only When Needed

extension, wallet, or transport state; no ordinary recovery authority.

newly requested profile only.

Other legacy donor references are not instructions for the installed private

route until their commands and capabilities are verified against the installed

wrapper and page capability.

Proof capture for public pages

Bind proof to the actual URL, viewport, scroll position, loaded assets and relevant

state or moment. Earlier captures sometimes reset scroll or returned the prior

frame. Inspect the captured position and content; use a warm-up or second settled

capture when that defect is observed, not as a ritual on every browser action.

Background or hidden documents may pause or throttle animation. Inspect actual

visibility and frame progression. Forced screenshot frames can help inspect poses;

they do not establish natural cadence, input response, continuous motion or device

performance. Obtain temporal proof under supported, authorized rendering conditions.

If those conditions are unavailable, retain that exact proof gap. This does not

authorize foreground activation, transport bypass or changing browser settings.

See requestAnimationFrame

and document visibility.

A narrow same-engine reflow can test layout when its styles, assets and content

are faithful. A cloned srcdoc view may lose live state, listeners and canvas

content; it is not proof of the original app's behavior, phone gestures, browser

chrome or physical-device performance. Prefer the actual supported responsive

surface when available, and label clone evidence as reflow only. See

DOM cloning limits.

Verify the served asset identity: HTML may be dynamic while CSS/media remains

cached. Fetch the exact versioned URLs referenced by the live page, inspect cache

status and compare delivered bytes with the intended export. Preserve the project's

cache/versioning contract; a correct local render cannot establish the live result.

Open and inspect every capture used as evidence; an unread screenshot proves nothing.

Observe the browser's actual prefers-reduced-motion value. A requested static

branch is not by itself a missing-animation bug. Respect the user's accessibility

setting; do not change the OS preference just to make a test animate. Where a

supported and authorized scoped test override exists, keep it local, restore it

and verify both relevant branches separately. The normal frame and reduced-motion

paths have different expected behavior. Preference meaning.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.