| name | agent-browser-clean-sessions |
|---|---|
| description | Use headed `agent-browser` sessions with explicit `--session` names, reuse each named session for the current conversation task, and close it only after the user is done. Use when work in this repo needs visible browser automation, manual login, auth recovery during a flow, or multiple clean sessions in parallel without persistent profiles, saved state, or CDP attach. |
Use this skill with the global agent-browser skill when available.
- Use the global skill for normal page automation patterns.
- Use this skill for launch policy, headed-session rules, login handling, and cleanup.
Start a visible one-off session with an explicit name:
agent-browser --session SESSION_NAME --headed --args '--disable-blink-features=AutomationControlled' open https://example.comRules:
- Always use
--headed. - Always use an explicit semantic
--sessionname. - Default to
--args '--disable-blink-features=AutomationControlled'for launches in this repo. This keeps the session clean while reducing the chance that sites block the default Playwright automation fingerprint. - Reuse that same session name for the current task only.
- Keep the session temporary to the current conversation task, but do not close it immediately after the first completed request.
- Do not use
--profile,--session-name,state save/load, auth-vault flows,--cdp, or--auto-connect. - Do not switch to the real Chrome executable just to work around site blocking unless the user explicitly asks for that fallback.
Keep every follow-up command explicit:
agent-browser --session SESSION_NAME snapshot -i
agent-browser --session SESSION_NAME get url
agent-browser --session SESSION_NAME click @e1For parallel clean sessions, start distinct names and keep each command pinned to the right session.
Treat login as a repeatable interruption, not a startup-only step.
Assume manual user login is required if you see a login page, account chooser, password or MFA UI, auth failure, session-expired message, or any sign-in / reauthenticate gate.
When that happens:
- Stop issuing page mutations.
- Tell the user manual login is required in the visible browser window for that session.
- Include the session name and current URL or page state.
- Wait for the user to confirm login is complete.
- Re-check with:
agent-browser --session SESSION_NAME get url
agent-browser --session SESSION_NAME snapshot -i- Resume on the same session.
Do not relaunch the session just because login is needed again unless the session is no longer active.
When the requested browser task is complete:
- Report the result to the user.
- Include the active session name when it helps the user continue the same flow.
- Ask whether the user has another request for that same session or wants it closed.
- If the user has a follow-up, keep reusing the same session.
Skip the extra confirmation only when the user already made closure intent explicit, such as saying they are done or asking to close the browser once the request completes.
Close the named session when the user is done with that session:
agent-browser --session SESSION_NAME close