From claude-commands
Authenticates with WorldAI via Google OAuth in a real browser using Chrome Superpowers MCP. Provides step-by-step flow for login, verification, and evidence capture.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-commands:worldai-browser-loginThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill documents how to authenticate with WorldAI in a real browser using Chrome Superpowers MCP or Playwright MCP for browser-based testing.
This skill documents how to authenticate with WorldAI in a real browser using Chrome Superpowers MCP or Playwright MCP for browser-based testing.
| Account | Purpose | Campaigns |
|---|---|---|
<[email protected]> | Secondary test account | 44 campaigns |
[email protected] | Primary account (owner) | 146 campaigns |
| Environment | URL |
|---|---|
| Deployed Dev | https://mvp-site-app-s2-i6xf2p72ka-uc.a.run.app |
| Local | http://localhost:8081 |
# Navigate to deployed server
mcp__chrome-superpower__use_browser(
action="navigate",
payload="https://mvp-site-app-s2-i6xf2p72ka-uc.a.run.app"
)
# Click the Google sign-in button
mcp__chrome-superpower__use_browser(
action="click",
selector="//button[contains(text(), 'Sign in with Google')]"
)
The Firebase OAuth popup will open. The MCP browser cannot track the popup window, but:
# Extract page content to verify login
mcp__chrome-superpower__use_browser(
action="extract",
payload="text",
selector="body"
)
Success indicators:
[email protected])# Navigate directly to a campaign
mcp__chrome-superpower__use_browser(
action="navigate",
payload="http://localhost:8081/game/CAMPAIGN_ID"
)
# Capture screenshot as evidence
mcp__chrome-superpower__use_browser(
action="screenshot",
payload="evidence-name.png"
)
Screenshots are saved to Chrome Superpowers temp directory:
/var/folders/j0/.../chrome-session-*/XXX-action-timestamp/screenshot.png
# Create evidence directory
mkdir -p /tmp/worldai-browser-evidence/
# Copy screenshot
cp /path/to/chrome-session/*/screenshot.png /tmp/worldai-browser-evidence/
Primary Method: Claude Code Native Vision
Claude Code can directly read and analyze image files as a multimodal LLM:
# Use the Read tool on PNG files - Claude sees the image directly
Read(file_path="/tmp/worldai-browser-evidence/screenshot.png")
# Claude will describe what it sees: user email, campaign list, UI state
Secondary Method: Tesseract OCR (Cross-validation)
python3 - <<'PY'
from PIL import Image
import pytesseract
image_path = "/tmp/worldai-browser-evidence/screenshot.png"
img = Image.open(image_path)
text = pytesseract.image_to_string(img)
# Verify login success - check for @gmail.com to detect any logged-in user
if "@gmail.com" in text:
print("SUCCESS: User is logged in")
# Also check for expected page content
if "My Campaigns" in text:
print("SUCCESS: Campaigns page visible")
print("\n=== Full OCR Output ===")
print(text)
PY
# 1. Navigate
mcp__chrome-superpower__use_browser(action="navigate", payload="https://mvp-site-app-s2-i6xf2p72ka-uc.a.run.app")
# 2. Click Sign In
mcp__chrome-superpower__use_browser(action="click", selector="//button[contains(text(), 'Sign in with Google')]")
# 3. Wait for OAuth popup (manual intervention if needed)
# 4. Take screenshot
mcp__chrome-superpower__use_browser(action="screenshot", payload="login-test.png")
# 5. Extract and verify
mcp__chrome-superpower__use_browser(action="extract", payload="text", selector="body")
If Chrome Superpowers is unavailable, use Playwright MCP:
# Navigate
mcp__playwright-mcp__browser_navigate(url="https://mvp-site-app-s2-i6xf2p72ka-uc.a.run.app")
# Get snapshot
mcp__playwright-mcp__browser_snapshot()
# Click login button
mcp__playwright-mcp__browser_click(element="Sign in with Google button", ref="button-ref")
# Take screenshot
mcp__playwright-mcp__browser_take_screenshot()
Firebase OAuth sessions may not persist across page navigations in MCP browsers.
Solution: Navigate to the target page directly after authentication completes, or use the same tab for all operations.
The MCP browser cannot interact with popup windows.
Solution: Use a browser profile that's already logged into Google, or manually complete the OAuth flow when the popup appears.
The API endpoint requires Firebase authentication.
Solution: Ensure you've completed the OAuth flow and the session is active. Check the header for your email address.
npx claudepluginhub jleechanorg/claude-commands --plugin claude-commandsAutomates headless E2E tests with Playwright MCP: navigation, element interaction, form handling, and cross-browser testing. Use when running CI/CD test automation or Playwright-based browser tests.
Automates browser testing for web apps using Playwright MCP: navigate pages, click/fill elements, take screenshots, verify UI/console logs, debug frontend issues, validate responsive design.
Runs Playwright MCP server for Claude Code browser automation via accessibility tree tools. Enables navigation, clicks, forms, screenshots, content extraction for blocked sites or local UI testing.