AGENT SKILL

qa-web

QA test skill for web applications using agent-browser. Tests forms, navigation, responsive layouts, state persistence via cookies/localStorage, and visual regression. The web counterpart to agent-device — together they cover native + web testing. Invoke when user says "test the web app", "test localhost", "QA the website", "test the form", "verify responsive layout", "run web tests", "test browser", or any task requiring automated web application testing.

License 许可
MIT
最近更新
2026-07-29
Stars
★ 1
Forks
0

01 前言 Front Matter

name
qa-web
description
QA test skill for web applications using agent-browser. Tests forms, navigation, responsive layouts, state persistence via cookies/localStorage, and visual regression. The web counterpart to agent-device — together they cover native + web testing. Invoke when user says "test the web app", "test localhost", "QA the website", "test the form", "verify responsive layout", "run web tests", "test browser", or any task requiring automated web application testing.
allowed-tools
Bash(agent-browser:*) Bash(node:*) Bash(curl:*) Read

02 资源文件 3

03 SKILL.md 正文

qa-web

Web application QA testing using agent-browser. The web counterpart to agent-device — together they provide full coverage for apps with both native and web versions.

When to Use

Scenario Tool
Test native iOS/Android app agent-device + CDP
Test web app / localhost agent-browser (this skill)
Test React Native Web agent-browser (this skill)
Test responsive layouts agent-browser (this skill)
Test forms and navigation agent-browser (this skill)

Core Workflow

Every web test follows the same pattern as native tests:

  1. Navigate: agent-browser open <url>
  2. Snapshot: agent-browser snapshot -i (get element refs)
  3. Interact: Use refs to click, fill, select
  4. Re-snapshot: After navigation/DOM changes, get fresh refs
  5. Assert: Verify URL, text, element state
agent-browser open http://localhost:3000/login
agent-browser snapshot -i
# Output: @e1 [input type="email"], @e2 [input type="password"], @e3 [button] "Sign In"

agent-browser fill @e1 "user@example.com"
agent-browser fill @e2 "password123"
agent-browser click @e3
agent-browser wait --load networkidle
agent-browser snapshot -i  # Check result

Configuration

Set web-specific values in qa.config.sh:

export WEB_BASE_URL="http://localhost:3000"   # Your web app URL
export WEB_SESSION="qa"                        # Browser session name
export WEB_VIEWPORT_WIDTH=1280                 # Default viewport
export WEB_VIEWPORT_HEIGHT=720

Usage

Run example web test

bash .pi/skills/qa-automation/qa-web/run.sh

Run with headed browser (see what's happening)

export WEB_HEADED=true
bash .pi/skills/qa-automation/qa-web/flows/example-web-test.sh

Helper Library — web-helpers.sh

Source this in your web test scripts for consistent patterns:

source .pi/skills/qa-automation/qa-web/lib/web-helpers.sh

Available Functions

Function Purpose
web_open "url" Navigate to URL
web_snapshot Get interactive element refs
web_click "ref_or_selector" Click element
web_fill "ref" "text" Fill input field
web_select "ref" "value" Select dropdown option
web_wait "selector_or_ms" Wait for element/time
web_screenshot "name" Screenshot with naming convention
web_get_text "ref" Get element text
web_get_url Get current URL
web_get_title Get page title
web_is_visible "ref" Check element visibility
web_assert_url "pattern" Assert URL matches pattern
web_assert_title "text" Assert page title
web_assert_text "text" Assert text visible on page
web_scroll "direction" [px] Scroll page
web_save_state "file" Save cookies/storage
web_load_state "file" Restore saved state

Test Patterns

Form Testing

source web-helpers.sh

web_open "$WEB_BASE_URL/signup"
web_snapshot

web_fill @e1 "Jane Doe"
web_fill @e2 "jane@example.com"
web_fill @e3 "password123"
web_select @e4 "California"
web_click @e5  # Submit
web_wait --load networkidle

web_assert_url "**/dashboard"
web_assert_text "Welcome, Jane"
web_screenshot "signup-success"

Navigation Testing

web_open "$WEB_BASE_URL"
web_snapshot

# Click nav links
web_click @e3  # "About" link
web_assert_url "**/about"
web_screenshot "about-page"

# Go back
agent-browser back
web_assert_url "**/"

Responsive Testing

# Desktop
agent-browser set viewport 1440 900
web_open "$WEB_BASE_URL"
web_screenshot "desktop-home"

# Tablet
agent-browser set viewport 768 1024
web_screenshot "tablet-home"

# Mobile
agent-browser set viewport 375 812
web_screenshot "mobile-home"

State Persistence (Cookies/Storage)

# Login and save state
web_open "$WEB_BASE_URL/login"
web_fill @e1 "user@example.com"
web_fill @e2 "password"
web_click @e3
web_wait --load networkidle
web_save_state "/tmp/qa-auth-state.json"

# Reuse in future tests
web_load_state "/tmp/qa-auth-state.json"
web_open "$WEB_BASE_URL/dashboard"
web_assert_text "Welcome"  # Still logged in

Accessibility Testing

web_open "$WEB_BASE_URL"
agent-browser snapshot  # Full a11y tree
agent-browser screenshot --full /tmp/qa-full-page.png

File Structure

qa-web/
├── SKILL.md                    # This file
├── lib/
│   └── web-helpers.sh          # Web test helper functions
├── flows/
│   └── example-web-test.sh     # Example test
└── run.sh                      # Runner

Integration with Native Tests

For apps with both native and web versions, use both tools in the same test run:

# Test native app
bash .pi/skills/qa-automation/qa-scroll/run.sh

# Test web app
bash .pi/skills/qa-automation/qa-web/run.sh

# Both results in /tmp/qa-tests/

Troubleshooting

Problem Solution
"agent-browser: command not found" Install: npm install -g agent-browser
Browser launches but page is blank Check URL and dev server: curl $WEB_BASE_URL
Refs invalidated after click Always re-snapshot after navigation/DOM changes
Can't access localhost agent-browser runs locally — it CAN access localhost (unlike web_remote)
Headed mode not showing Set export WEB_HEADED=true before running

04 同仓库更多 Skills

runecraftai
runecraftai/arcanum

using-agent-skills

Discovers and invokes the right @runecraft/spells skill for the current task. Use when starting a session, when a request is ambiguous about which workflow to apply, or when you need to pick among the 13-skill Arcanum catalog. EN triggers: /skill, which skill, pick a skill, what skill should I use, skill discovery, meta skill. PT triggers: qual skill, qual habilidade, descobrir skill, qual fluxo usar. Do NOT use for: actual implementation work (route to the specific skill instead), unrelated standalone tasks outside the Arcanum catalog, or runtime-specific configuration (e.g., opencode.json / Claude Code plugin paths).

★ 1
runecraftai
runecraftai/arcanum

typescript-patterns

TypeScript best practices and patterns for type-safe, maintainable code. Covers discriminated unions, generics, const assertions, type narrowing, and common anti-patterns. Extends (does not override) project tsconfig. EN triggers: /typescript, TypeScript patterns, TS best practices, type safety, discriminated unions, generics, type narrowing. PT triggers: /typescript, padrões TypeScript, boas práticas TS, segurança de tipos, unions discriminadas, genéricos. Do NOT use for: JavaScript-only projects, runtime performance, or replacing project tsconfig rules.

★ 1
runecraftai
runecraftai/arcanum

test-driven-development

Drives development with tests — fail first, then make them pass, then refactor. Use when implementing any logic, fixing any bug, or changing any behavior. EN triggers: /test, write tests first, TDD, prove it, 80/15/5 pyramid, Beyonce Rule. PT triggers: /teste, testes primeiro, provar com teste, pirâmide 80/15/5. Do NOT use for: production incident triage (use /debug), or cosmetic-only changes with no behavioral surface.

★ 1
runecraftai
runecraftai/arcanum

spec-driven

Feature planning and implementation with 4 adaptive phases — Specify, Design, Tasks, Execute. Auto-sizes depth by complexity. Creates atomic tasks with verification criteria, atomic git commits, and requirement traceability. Features an independent Verifier (author != verifier, evidence-or-zero), persistent decision log (STATE.md), and test-coverage-matrix-driven tests, plus a self-improving lessons layer that turns verification failures into reusable project-local guidance. Stack-agnostic. Use when planning features (requirements, design, task breakdown), implementing with verification and atomic commits, or validating/verifying an implementation against a spec. Triggers (PT/EN): "specify feature", "vamos especificar", "discutir feature", "discutir este caso", "design", "design da feature", "tarefas", "quebrar em tarefas", "implementar", "build", "validar", "verify work", "UAT", "validar implementação", "record decision", "pause work", "pausar trabalho", "resume work", "retomar trabalho". Do NOT use for architecture decomposition analysis (use architecture skills) or technical design docs (treat as Complex scope: discuss gray areas + architecture-focused design).

★ 1
runecraftai
runecraftai/arcanum

skill-forge

Designs, authors, validates, and optimizes new Agent Skills from scratch. Use when creating a new skill, packaging a workflow as a skill, improving a skill's triggering accuracy, or evaluating whether a skill improves output quality. Covers the full lifecycle: DISCOVER, DESIGN, AUTHOR, VALIDATE, OPTIMIZE, DELIVER. Produces skills that follow the open SKILL.md format (YAML frontmatter + Markdown body, progressive disclosure, validation loops). EN triggers: /forge, create a skill, write a skill, build a skill, new skill, author a skill, package this as a skill, validate a skill, improve skill triggering, optimize skill description, evaluate skill quality. PT triggers: /forge, criar uma skill, escrever uma skill, construir uma skill, nova skill, empacotar como skill, validar skill, melhorar disparo, otimizar descrição de skill. Do NOT use for: discovering which existing skill to apply (use a dispatch/meta skill), planning feature implementation, or designing software architecture.

★ 1
runecraftai
runecraftai/arcanum

shipping-and-launch

Prepares production launches with a pre-launch checklist, staged rollout, monitoring, and a rollback strategy — plus feature flag lifecycle (off → internal → beta → GA). Use when deploying a feature to production for the first time, releasing a significant change, or planning a rollout. EN triggers: /ship, pre-launch checklist, staged rollout, feature flag, rollback plan, monitoring. PT triggers: /shippar, checklist pré-lançamento, rollout gradual, feature flag, plano de rollback. Do NOT use for: pre-production development work, or one-off internal tools with no user exposure.

★ 1