playwright-auth
Use when the user needs to log into a website for browser automation, save auth cookies, or sync browser profiles to cloud
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/mixpeek/amux/HEAD/.claude/commands/playwright-auth.md -o ~/.claude/commands/playwright-auth.mdplaywright-auth.md
# /playwright-auth — Browser Auth Profile Manager Manages Playwright browser auth profiles so Claude sessions (local and cloud) can access authenticated sites. ## How It Works - **capture** — opens a real headed browser; you log into GitHub, Google, Notion, etc.; profile is saved to `~/.amux/playwright-auth/profile/` and automatically synced to cloud - **sync** — ships the saved profile to the cloud VM via gcloud IAP - **status** — shows profile age and whether it's been synced ## Instructions The user's request is: **$ARGUMENTS** Parse the argument: ### `capture` or empty Run the capture command and wait for completion: ```bash amux playwright-auth capture ``` This opens a browser. Inform the user to log into any sites they need, then close the browser. It will automatically sync to cloud when done. ### `sync` Sync the existing local profile to cloud: ```bash amux playwright-auth sync ``` Report the output — confirm success or surface any errors. ### `status` Check the current profile state: ```bash # Profile location and age ls -lh ~/.amux/playwright-auth/profile/ 2>/dev/null && \ echo "Last modified: $(stat -f '%Sm' -t '%Y-%m-%d %H:%M' ~/.amux/playwright-auth/profile 2>/dev/null || stat -c '%y' ~/.amux/playwright-auth/profile 2>/dev/null)" || \ echo "No profile found. Run: amux playwright-auth capture" ``` Always report clearly: - Whether a profile exists and how old it is - Whether the last sync succeeded - Next steps if something needs attention ## Gotchas - `capture` opens a **headed** (visible) browser — it cannot run in a headless/SSH session. - The profile directory at `~/.amux/playwright-auth/profile/` is locked while a browser is using it — don't run capture while another Playwright instance is open. - Auth cookies expire — if automated tasks start getting 401s, the profile needs a fresh capture. - `sync` requires `gcloud` CLI and IAP tunnel access to the cloud VM; it will fail if the VM is down.
Pick up an open issue from the amux issue tracker, mark it doing, work it, and mark it done.
Use when the user says "add to board", "create a task", or wants to track a todo on the amux kanban board
Use when you need to interact with the amux system — manage board tasks, check sessions, send emails, automate browsers, or work with CRM contacts
Use when the user asks to interact with a web page, take a screenshot of a site, click or type in Chrome, scrape content, or debug a web UI. Connects to real Chrome tabs with existing logins.
Scaffold a closed orchestrator loop — creates the mission note, state/constraints notes, and a scheduler entry from the v2 template.
Use when you need to test the amux dashboard UI, investigate a visual bug, or verify a frontend change works correctly
Use when the user wants to record a video of a browser task, create a screen recording, or produce an MP4 demo
Use when the user asks what a session did, wants to review session history, or needs to find errors in a session log