origin-browser-automation-policy

Defines default policies for AI-driven browser automation tool selection and session cleanup.

Updated Dec 9, 2025
One-click install
npx skills add https://github.com/Aki2022/skills --skill origin-browser-automation-policy-aki2022
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: origin-browser-automation-policy
Source: https://github.com/Aki2022/skills/tree/main/origin-browser-automation-policy
Command: npx skills add https://github.com/Aki2022/skills --skill origin-browser-automation-policy-aki2022

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI agents automating browsers often pick the wrong tool, leak sessions into throwaway profiles, fail logins silently, and leave orphaned browser processes running. This Skill establishes a cross-repo default policy so every browser task follows consistent rules for tool choice, profile usage, and cleanup. ## Core Features & Use Cases - Tool Selection Rules: Defaults to playwright-cli in headless mode, switching to Chrome with a dedicated automation profile only for authentication, SSO, 2FA, or bot-detection scenarios. - Session Hygiene: Enforces named persistent sessions, pre-flight checks for stray sessions via playwright-cli list, and verified cleanup at task end so no orphaned browsers remain. - Safety Boundaries: Prohibits account creation and password entry even on request, mandates hand-off of credential fields to the user, and requires explicit approval before touching the user's daily browser profile. - Use Case: An agent asked to log into a ticketing site and submit a form checks for stray sessions, launches the dedicated Chrome profile, verifies login state by reading page content, fills all non-credential fields, hands off the password step, and confirms zero browsers remain afterward. ## Quick Start Apply the browser automation policy to decide whether to use playwright-cli or Chrome for logging into this website, and clean up all sessions when finished.

Frequently Asked Questions about origin-browser-automation-policy

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
When should I use Chrome instead of playwright-cli for browser automation?

Use Chrome only when authentication requires it, such as persistent login sessions, SSO, 2FA, or reCAPTCHA hand-off, or when a site bot-detects headless playwright. Always use a dedicated automation profile, never the user's default profile.

How do I detect bot detection when automating a website with playwright?

Bot detection often lets the page load but rejects the form submit with a 403 or ERR_EMPTY_RESPONSE while the page silently stays put. Check the console and network log before assuming the click failed; a 403 on the POST means switch tools, not retry.

Why is my dedicated browser profile not logged in after automation?

The likely cause is issuing a bare playwright-cli command without the -s session flag, which opens a separate throwaway in-memory browser instead of the named persistent session. Any login performed there evaporates on close, leaving the dedicated profile untouched.

Can an AI agent create an account or enter a password during browser automation?

No. Account creation and setting new passwords are prohibited even when the user explicitly requests it. The agent fills every other field, then hands off the credential fields and final submit to the human while the tab stays open.

How do I verify browser sessions are cleaned up after automation?

Run playwright-cli list to confirm no browsers remain, and run the repo's doctor script such as chrome-agent-doctor if available. Close abandoned sessions immediately when switching tools, and report the final browser state to the user.