with one click
test-browser
Run browser tests on pages affected by current PR or branch
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Run browser tests on pages affected by current PR or branch
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
Run comprehensive agent-native architecture review with scored principles
Use this agent when reviewing code to ensure features are agent-native - that any action a user can take, an agent can also take, and anything a user can see, an agent can see. This enforces the principle that agents should have parity with users in capability and context. <example>Context: The user added a new feature to their application.\nuser: "I just implemented a new email filtering feature"\nassistant: "I'll use the agent-native-reviewer to verify this feature is accessible to agents"\n<commentary>New features need agent-native review to ensure agents can also filter emails, not just humans through UI.</commentary></example><example>Context: The user created a new UI workflow.\nuser: "I added a multi-step wizard for creating reports"\nassistant: "Let me check if this workflow is agent-native using the agent-native-reviewer"\n<commentary>UI workflows often miss agent accessibility - the reviewer checks for API/tool equivalents.</commentary></example>
Use this agent when you need to create or update README files following the Ankane-style template for Ruby gems. This includes writing concise documentation with imperative voice, keeping sentences under 15 words, organizing sections in the standard order (Installation, Quick Start, Usage, etc.), and ensuring proper formatting with single-purpose code fences and minimal prose. Examples: <example>Context: User is creating documentation for a new Ruby gem. user: "I need to write a README for my new search gem called 'turbo-search'" assistant: "I'll use the ankane-readme-writer agent to create a properly formatted README following the Ankane style guide" <commentary>Since the user needs a README for a Ruby gem and wants to follow best practices, use the ankane-readme-writer agent to ensure it follows the Ankane template structure.</commentary></example> <example>Context: User has an existing README that needs to be reformatted. user: "Can you update my gem's README to follow the Ankane style?" assistant: "Let...
Use this agent when you need to analyze code changes from an architectural perspective, evaluate system design decisions, or ensure that modifications align with established architectural patterns. This includes reviewing pull requests for architectural compliance, assessing the impact of new features on system structure, or validating that changes maintain proper component boundaries and design principles. <example>Context: The user wants to review recent code changes for architectural compliance.\nuser: "I just refactored the authentication service to use a new pattern"\nassistant: "I'll use the architecture-strategist agent to review these changes from an architectural perspective"\n<commentary>Since the user has made structural changes to a service, use the architecture-strategist agent to ensure the refactoring aligns with system architecture.</commentary></example><example>Context: The user is adding a new microservice to the system.\nuser: "I've added a new notification service that integrates with...
Use this agent when you need to research and gather external best practices, documentation, and examples for any technology, framework, or development practice. This includes finding official documentation, community standards, well-regarded examples from open source projects, and domain-specific conventions. The agent excels at synthesizing information from multiple sources to provide comprehensive guidance on how to implement features or solve problems according to industry standards. <example>Context: User wants to know the best way to structure GitHub issues for their Rails project. user: "I need to create some GitHub issues for our project. Can you research best practices for writing good issues?" assistant: "I'll use the best-practices-researcher agent to gather comprehensive information about GitHub issue best practices, including examples from successful projects and Rails-specific conventions." <commentary>Since the user is asking for research on best practices, use the best-practices-researcher a...
This skill should be used before implementing features, building components, or making changes. It guides exploring user intent, approaches, and design decisions before planning. Triggers on "let's brainstorm", "help me think through", "what should we build", "explore approaches", ambiguous feature requests, or when the user's request has multiple valid interpretations that need clarification.
| name | test-browser |
| description | Run browser tests on pages affected by current PR or branch |
[PR number, branch name, or 'current' for current branch]
<command_purpose>Run end-to-end browser tests on pages affected by a PR or branch changes using agent-browser CLI.</command_purpose>
DO NOT use Chrome MCP tools (mcp__claude-in-chrome__*).
This command uses the agent-browser CLI exclusively. The agent-browser CLI is a Bash-based tool from Vercel that runs headless Chromium. It is NOT the same as Chrome browser automation via MCP.
If you find yourself calling mcp__claude-in-chrome__* tools, STOP. Use agent-browser Bash commands instead.
QA Engineer specializing in browser-based end-to-end testing
This command tests affected pages in a real browser, catching issues that unit tests miss:
Check installation:
command -v agent-browser >/dev/null 2>&1 && echo "Installed" || echo "NOT INSTALLED"
Install if needed:
npm install -g agent-browser
agent-browser install # Downloads Chromium (~160MB)
See the agent-browser skill for detailed usage.
Before starting ANY browser testing, verify agent-browser is installed:
command -v agent-browser >/dev/null 2>&1 && echo "Ready" || (echo "Installing..." && npm install -g agent-browser && agent-browser install)
If installation fails, inform the user and stop.
<ask_browser_mode>
Before starting tests, ask user if they want to watch the browser:
Use AskUserQuestion with:
Store the choice and use --headed flag when user selects "Headed".
</ask_browser_mode>
<test_target> $ARGUMENTS </test_target>
<determine_scope>
If PR number provided:
gh pr view [number] --json files -q '.files[].path'
If 'current' or empty:
git diff --name-only main...HEAD
If branch name provided:
git diff --name-only main...[branch]
</determine_scope>
<file_to_route_mapping>
Map changed files to testable routes:
| File Pattern | Route(s) |
|---|---|
app/views/users/* | /users, /users/:id, /users/new |
app/controllers/settings_controller.rb | /settings |
app/javascript/controllers/*_controller.js | Pages using that Stimulus controller |
app/components/*_component.rb | Pages rendering that component |
app/views/layouts/* | All pages (test homepage at minimum) |
app/assets/stylesheets/* | Visual regression on key pages |
app/helpers/*_helper.rb | Pages using that helper |
src/app/* (Next.js) | Corresponding routes |
src/components/* | Pages using those components |
Build a list of URLs to test based on the mapping.
</file_to_route_mapping>
<check_server>
Before testing, verify the local server is accessible:
agent-browser open http://localhost:3000
agent-browser snapshot -i
If server is not running, inform user:
**Server not running**
Please start your development server:
- Rails: `bin/dev` or `rails server`
- Node/Next.js: `npm run dev`
Then run `/test-browser` again.
</check_server>
<test_pages>
For each affected route, use agent-browser CLI commands (NOT Chrome MCP):
Step 1: Navigate and capture snapshot
agent-browser open "http://localhost:3000/[route]"
agent-browser snapshot -i
Step 2: For headed mode (visual debugging)
agent-browser --headed open "http://localhost:3000/[route]"
agent-browser --headed snapshot -i
Step 3: Verify key elements
agent-browser snapshot -i to get interactive elements with refsStep 4: Test critical interactions
agent-browser click @e1 # Use ref from snapshot
agent-browser snapshot -i
Step 5: Take screenshots
agent-browser screenshot page-name.png
agent-browser screenshot --full page-name-full.png # Full page
</test_pages>
<human_verification>
Pause for human input when testing touches:
| Flow Type | What to Ask |
|---|---|
| OAuth | "Please sign in with [provider] and confirm it works" |
| "Check your inbox for the test email and confirm receipt" | |
| Payments | "Complete a test purchase in sandbox mode" |
| SMS | "Verify you received the SMS code" |
| External APIs | "Confirm the [service] integration is working" |
Use AskUserQuestion:
**Human Verification Needed**
This test touches the [flow type]. Please:
1. [Action to take]
2. [What to verify]
Did it work correctly?
1. Yes - continue testing
2. No - describe the issue
</human_verification>
<failure_handling>
When a test fails:
Document the failure:
agent-browser screenshot error.pngAsk user how to proceed:
**Test Failed: [route]**
Issue: [description]
Console errors: [if any]
How to proceed?
1. Fix now - I'll help debug and fix
2. Create todo - Add to todos/ for later
3. Skip - Continue testing other pages
If "Fix now":
If "Create todo":
{id}-pending-p1-browser-test-{description}.mdIf "Skip":
</failure_handling>
<test_summary>
After all tests complete, present summary:
## Browser Test Results
**Test Scope:** PR #[number] / [branch name]
**Server:** http://localhost:3000
### Pages Tested: [count]
| Route | Status | Notes |
|-------|--------|-------|
| `/users` | Pass | |
| `/settings` | Pass | |
| `/dashboard` | Fail | Console error: [msg] |
| `/checkout` | Skip | Requires payment credentials |
### Console Errors: [count]
- [List any errors found]
### Human Verifications: [count]
- OAuth flow: Confirmed
- Email delivery: Confirmed
### Failures: [count]
- `/dashboard` - [issue description]
### Created Todos: [count]
- `005-pending-p1-browser-test-dashboard-error.md`
### Result: [PASS / FAIL / PARTIAL]
</test_summary>
# Test current branch changes
/test-browser
# Test specific PR
/test-browser 847
# Test specific branch
/test-browser feature/new-dashboard
ALWAYS use these Bash commands. NEVER use mcp__claude-in-chrome__ tools.*
# Navigation
agent-browser open <url> # Navigate to URL
agent-browser back # Go back
agent-browser close # Close browser
# Snapshots (get element refs)
agent-browser snapshot -i # Interactive elements with refs (@e1, @e2, etc.)
agent-browser snapshot -i --json # JSON output
# Interactions (use refs from snapshot)
agent-browser click @e1 # Click element
agent-browser fill @e1 "text" # Fill input
agent-browser type @e1 "text" # Type without clearing
agent-browser press Enter # Press key
# Screenshots
agent-browser screenshot out.png # Viewport screenshot
agent-browser screenshot --full out.png # Full page screenshot
# Headed mode (visible browser)
agent-browser --headed open <url> # Open with visible browser
agent-browser --headed click @e1 # Click in visible browser
# Wait
agent-browser wait @e1 # Wait for element
agent-browser wait 2000 # Wait milliseconds