Browser Workbench Setup
Use this skill to configure a new repository for browser-based UI work with the smallest durable setup.
Default tool split:
playwright-interactive is the primary tool for iterative UI/UX work, auth flows, layout debugging, screenshots, and deeper investigation.
agent-browser is the secondary tool for quick smoke checks, annotated screenshots, fast snapshots, and lightweight CLI automation.
Do not create a custom framework, wrapper package, or shared browser helper layer unless the user explicitly asks for one.
Load references only as needed:
- Read references/playwright-interactive.md when setting up the primary interactive workflow.
- Read references/agent-browser.md when setting up CLI smoke checks, session persistence, or annotated screenshots.
- Read exactly one provider file when the repository auth stack is clear:
- references/auth-clerk.md
- references/auth-supabase.md
- references/auth-auth0.md
- references/auth-neon.md
If the repo uses Neon with an upstream identity provider such as Clerk or Auth0, read both auth-neon.md and the upstream provider file. Neon may be the database auth verifier while the browser login still belongs to the upstream provider.
Preconditions
- Confirm
playwright-interactive is installed and available in Codex.
- Confirm
agent-browser CLI is installed.
- Confirm Codex has
js_repl = true.
- Confirm the session can run with
danger-full-access when using playwright-interactive.
If any of those are missing, fix that first before touching the repository.
Setup Goals
For a normal web repository, finish with:
- repo-local Playwright dependency installed with the repository's package manager
- browser binaries installed
- stable artifact directories for screenshots, traces, and auth state
- ignore rules for local browser artifacts
- a clear convention for when to use
playwright-interactive vs agent-browser
Workflow
Inspect the repository first.
- Read
package.json, lockfiles, and any repo AGENTS.md.
- Detect the package manager from the repo, not from habit.
- Reuse existing test/artifact conventions if they already exist.
- Detect the auth provider from dependencies, env vars, routes, and middleware before making changes.
- Provider detection hints:
- Clerk:
@clerk/, CLERK_, NEXT_PUBLIC_CLERK_
- Supabase:
@supabase/, SUPABASE_URL, SUPABASE_, createBrowserClient, createServerClient
- Auth0:
@auth0/, AUTH0_, /auth/login, Auth0Client
- Neon Auth:
neon_auth, Neon auth endpoints, Neon JWT/JWKS setup, provider-owned auth integration
Install Playwright in the repo with the repo's package manager.
bun add -d playwright
bunx playwright install chromium
- For pnpm/npm/yarn repos, match the repo standard.
- Install only what is needed. Default browser is Chromium unless the user asked for more.
Create a minimal artifact convention.
- Preferred defaults:
output/playwright/screenshots/
output/playwright/traces/
output/playwright/auth/
output/agent-browser/
- Reuse an existing
reports/ or output/ convention if the repo already has one.
Add ignore rules for local-only artifacts.
output/playwright/
output/agent-browser/
playwright/.auth/
- Do not add duplicate ignore entries.
Standardize auth-state handling.
- Prefer Playwright
storageState for authenticated iteration and reusable test sessions.
- Use
agent-browser profiles or session names only for quick local smoke work.
- Keep auth files out of git.
- Prefer provider-supported test helpers when they exist.
- If the provider has no first-party Playwright helper, prefer seeded test users plus saved browser state.
- Avoid MFA in automated browser runs unless the provider explicitly supports it in test helpers.
Keep the responsibility split explicit.
- Use
playwright-interactive for:
- serious interactive debugging
- auth-heavy flows
- desktop/mobile passes
- console/network inspection
- screenshots and trace evidence
- Use
agent-browser for:
- quick smoke checks
- annotated screenshots
- fast snapshots
- simple DOM or screenshot diffs
Avoid unnecessary additions.
- Do not add Playwright test scaffolding unless the user asked for formal test coverage.
- Do not add helper scripts, custom CLIs, or wrapper packages by default.
- Do not add CI config unless the user asked for CI.
- For auth setup, add only the minimum repo changes needed to make interactive browser work repeatable.
- User-level tools such as
~/.agent-browser/config.json belong outside the repo.
Provider Routing
After the initial repo scan:
- Read
playwright-interactive.md for the primary workflow.
- Read
agent-browser.md for CLI setup and persistence.
- Read one provider auth file for the active identity stack.
- For Neon-backed repos:
- if Neon Auth owns the user lifecycle, read
auth-neon.md
- if Neon is only verifying JWTs from Clerk/Auth0/etc., read
auth-neon.md plus that upstream provider file
Do not load every provider reference by default.
Automation Standard
When the user asks to set this up in a repo, complete the work end to end:
- install the repo-local Playwright dependency
- install browser binaries
- create artifact directories
- add ignore rules
- add or align formal auth bootstrap only if the repo already has Playwright tests or the user asked for them
- configure
agent-browser persistence with either a profile path or a session name convention
- report the exact auth path chosen and why
Preferred Defaults
When no repo convention conflicts:
- install only
playwright
- install only Chromium first
- keep artifacts under
output/
- use repo-local ignores, not global git excludes
- keep setup changes small and reviewable
Deliverable
When you finish, report:
- package manager used
- dependency added
- directories added
- ignore rules added
- any user-level config that must exist outside the repo
- provider-specific auth path selected
- the exact command the user should run first with
playwright-interactive
First-Run Prompt
After setup, suggest a first real task such as:
Use $playwright-interactive to open the local app, verify sign-in, test theme persistence, run desktop and mobile passes, and capture screenshots.
1---
2name: browser-workbench-setup
3description: Set up browser automation and UI QA for a new repository using playwright-interactive as the primary interactive tool and agent-browser as the secondary CLI smoke-check tool. Use when a user wants to bootstrap browser testing, screenshots, auth-state reuse, or local UI debugging conventions in a fresh repo.
4metadata:
5 source: https://skillmd.com/skills/aibot88/browser-workbench-setup
6---
7
8# Browser Workbench Setup
9
10Use this skill to configure a new repository for browser-based UI work with the smallest durable setup.
11
12Default tool split:
13
14- `playwright-interactive` is the primary tool for iterative UI/UX work, auth flows, layout debugging, screenshots, and deeper investigation.
15- `agent-browser` is the secondary tool for quick smoke checks, annotated screenshots, fast snapshots, and lightweight CLI automation.
16
17Do not create a custom framework, wrapper package, or shared browser helper layer unless the user explicitly asks for one.
18
19Load references only as needed:
20
21- Read [references/playwright-interactive.md](references/playwright-interactive.md) when setting up the primary interactive workflow.
22- Read [references/agent-browser.md](references/agent-browser.md) when setting up CLI smoke checks, session persistence, or annotated screenshots.
23- Read exactly one provider file when the repository auth stack is clear:
24 - [references/auth-clerk.md](references/auth-clerk.md)
25 - [references/auth-supabase.md](references/auth-supabase.md)
26 - [references/auth-auth0.md](references/auth-auth0.md)
27 - [references/auth-neon.md](references/auth-neon.md)
28
29If the repo uses Neon with an upstream identity provider such as Clerk or Auth0, read both `auth-neon.md` and the upstream provider file. Neon may be the database auth verifier while the browser login still belongs to the upstream provider.
30
31## Preconditions
32
33- Confirm `playwright-interactive` is installed and available in Codex.
34- Confirm `agent-browser` CLI is installed.
35- Confirm Codex has `js_repl = true`.
36- Confirm the session can run with `danger-full-access` when using `playwright-interactive`.
37
38If any of those are missing, fix that first before touching the repository.
39
40## Setup Goals
41
42For a normal web repository, finish with:
43
44- repo-local Playwright dependency installed with the repository's package manager
45- browser binaries installed
46- stable artifact directories for screenshots, traces, and auth state
47- ignore rules for local browser artifacts
48- a clear convention for when to use `playwright-interactive` vs `agent-browser`
49
50## Workflow
51
521. Inspect the repository first.
53 - Read `package.json`, lockfiles, and any repo `AGENTS.md`.
54 - Detect the package manager from the repo, not from habit.
55 - Reuse existing test/artifact conventions if they already exist.
56 - Detect the auth provider from dependencies, env vars, routes, and middleware before making changes.
57 - Provider detection hints:
58 - Clerk: `@clerk/`, `CLERK_`, `NEXT_PUBLIC_CLERK_`
59 - Supabase: `@supabase/`, `SUPABASE_URL`, `SUPABASE_`, `createBrowserClient`, `createServerClient`
60 - Auth0: `@auth0/`, `AUTH0_`, `/auth/login`, `Auth0Client`
61 - Neon Auth: `neon_auth`, Neon auth endpoints, Neon JWT/JWKS setup, provider-owned auth integration
62
632. Install Playwright in the repo with the repo's package manager.
64 - For Bun repos, prefer:
65 ```bash
66 bun add -d playwright
67 bunx playwright install chromium
68 ```
69 - For pnpm/npm/yarn repos, match the repo standard.
70 - Install only what is needed. Default browser is Chromium unless the user asked for more.
71
723. Create a minimal artifact convention.
73 - Preferred defaults:
74 - `output/playwright/screenshots/`
75 - `output/playwright/traces/`
76 - `output/playwright/auth/`
77 - `output/agent-browser/`
78 - Reuse an existing `reports/` or `output/` convention if the repo already has one.
79
804. Add ignore rules for local-only artifacts.
81 - Typical entries:
82 ```gitignore
83 output/playwright/
84 output/agent-browser/
85 playwright/.auth/
86 ```
87 - Do not add duplicate ignore entries.
88
895. Standardize auth-state handling.
90 - Prefer Playwright `storageState` for authenticated iteration and reusable test sessions.
91 - Use `agent-browser` profiles or session names only for quick local smoke work.
92 - Keep auth files out of git.
93 - Prefer provider-supported test helpers when they exist.
94 - If the provider has no first-party Playwright helper, prefer seeded test users plus saved browser state.
95 - Avoid MFA in automated browser runs unless the provider explicitly supports it in test helpers.
96
976. Keep the responsibility split explicit.
98 - Use `playwright-interactive` for:
99 - serious interactive debugging
100 - auth-heavy flows
101 - desktop/mobile passes
102 - console/network inspection
103 - screenshots and trace evidence
104 - Use `agent-browser` for:
105 - quick smoke checks
106 - annotated screenshots
107 - fast snapshots
108 - simple DOM or screenshot diffs
109
1107. Avoid unnecessary additions.
111 - Do not add Playwright test scaffolding unless the user asked for formal test coverage.
112 - Do not add helper scripts, custom CLIs, or wrapper packages by default.
113 - Do not add CI config unless the user asked for CI.
114 - For auth setup, add only the minimum repo changes needed to make interactive browser work repeatable.
115 - User-level tools such as `~/.agent-browser/config.json` belong outside the repo.
116
117## Provider Routing
118
119After the initial repo scan:
120
121- Read `playwright-interactive.md` for the primary workflow.
122- Read `agent-browser.md` for CLI setup and persistence.
123- Read one provider auth file for the active identity stack.
124- For Neon-backed repos:
125 - if Neon Auth owns the user lifecycle, read `auth-neon.md`
126 - if Neon is only verifying JWTs from Clerk/Auth0/etc., read `auth-neon.md` plus that upstream provider file
127
128Do not load every provider reference by default.
129
130## Automation Standard
131
132When the user asks to set this up in a repo, complete the work end to end:
133
134- install the repo-local Playwright dependency
135- install browser binaries
136- create artifact directories
137- add ignore rules
138- add or align formal auth bootstrap only if the repo already has Playwright tests or the user asked for them
139- configure `agent-browser` persistence with either a profile path or a session name convention
140- report the exact auth path chosen and why
141
142## Preferred Defaults
143
144When no repo convention conflicts:
145
146- install only `playwright`
147- install only Chromium first
148- keep artifacts under `output/`
149- use repo-local ignores, not global git excludes
150- keep setup changes small and reviewable
151
152## Deliverable
153
154When you finish, report:
155
156- package manager used
157- dependency added
158- directories added
159- ignore rules added
160- any user-level config that must exist outside the repo
161- provider-specific auth path selected
162- the exact command the user should run first with `playwright-interactive`
163
164## First-Run Prompt
165
166After setup, suggest a first real task such as:
167
168`Use $playwright-interactive to open the local app, verify sign-in, test theme persistence, run desktop and mobile passes, and capture screenshots.`