Best for
- Use when asked to "qa", "QA", "test this site", "find bugs", "test and fix", or "fix what's broken".
GCWing/BitFun/src/crates/assembly/core/builtin_skills/gstack-qa/SKILL.md
Systematically QA test a web application and fix bugs found. Runs QA testing, then iteratively fixes bugs in source code, committing each fix atomically and re-verifying. Use when asked to "qa", "QA", "test this site", "find bugs", "test and fix", or "fix what's broken". Proactively suggest when the user says a feature is ready for testing or asks "does this work?". Three tiers: Quick (critical/high only), Standard (+ medium), Exhaustive (+ cosmetic). Produces before/after health scores, fix evi
Decision brief
You are a QA engineer AND a bug-fix engineer. Test web applications like a real user — click everything, fill every form, check every state. When you find bugs, fix them in source code with atomic commits, then re-verify. Produce a structured report with before/after evidence.
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/GCWing/BitFun --skill "src/crates/assembly/core/builtin_skills/gstack-qa"Inspect the Agent Skill "qa" from https://github.com/GCWing/BitFun/blob/474b5e91a76cfa6ed97afa3a9a93a35675d245c2/src/crates/assembly/core/builtin_skills/gstack-qa/SKILL.md at commit 474b5e91a76cfa6ed97afa3a9a93a35675d245c2. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
Parse the user's request for these parameters:
1. Find the agent-browser CLI (see Setup above) 2. Create output directories 3. Create a new report file in the output directory 4. Start timer for duration tracking
1. Find the agent-browser CLI (see Setup above) 2. Create output directories 3. Create a new report file in the output directory 4. Start timer for duration tracking
If authentication needs credentials: Never put a password in command arguments. Replace qa-{project}-{target-host} with a profile name unique to the current project and target host. Ask the user to run this in their own interactive terminal and confirm when the profile is saved:
Get a map of the application:
Permission review
The documentation asks the agent to run terminal commands or scripts.
git status --porcelainThe documentation asks the agent to create, modify, or delete local files.
Create minimal config fileThe documentation asks the agent to create, modify, or delete local files.
Create directory structure (test/, spec/, etc.)The documentation asks the agent to run terminal commands or scripts.
How to run tests (the verified command from B5)The documentation includes network, browsing, or remote request actions.
API endpoints → test them directly with `agent-browser eval "await fetch('/api/...')"`The documentation includes network, browsing, or remote request actions.
agent-browser open http://localhost:3000 2>/dev/null && echo "Found app on :3000" || \The documentation asks the agent to read local files, directories, or repositories.
*Regression mode:** After writing the report, load the baseline file. Compare:The documentation asks the agent to read local files, directories, or repositories.
**Show screenshots to the user.** After every `agent-browser screenshot` command, use the Read tool on the output file(s) so the user can see them inline. Read every viewport capture. This is critical — without it, screenshots are invisibleEvidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 90/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 1,472 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
You are a QA engineer AND a bug-fix engineer. Test web applications like a real user — click everything, fill every form, check every state. When you find bugs, fix them in source code with atomic commits, then re-verify. Produce a structured report with before/after evidence.
When this skill is invoked by BitFun Team Mode, this skill supplies the QA methodology. Use existing Task sub-agents for independent testing tracks, then keep triage and fix ownership explicit in the main Team session.
ComputerUse only for native desktop UI, and Explore for diff-aware test-scope mapping.Parse the user's request for these parameters:
| Parameter | Default | Override example |
|---|---|---|
| Target URL | (auto-detect or required) | https://myapp.com, http://localhost:3000 |
| Tier | Standard | --quick, --exhaustive |
| Mode | full | --regression .bitfun/team/qa-reports/baseline.json |
| Output dir | .bitfun/team/qa-reports/ | Output to /tmp/qa |
| Scope | Full app (or diff-scoped) | Focus on the billing page |
| Auth | None | Sign in to [email protected], Import cookies from cookies.json |
Tiers determine which issues get fixed:
If no URL is given and you're on a feature branch: Automatically enter diff-aware mode (see Modes below). This is the most common case — the user just shipped code on a branch and wants to verify it works.
agent-browser preflight (once per skill invocation): Before the first browser command, run agent-browser --version (require 0.32.3 or newer) and load agent-browser skills get core. Reuse that guidance for the rest of this invocation. If either step fails, stop the browser phase and ask the user to install or upgrade with the pinned command from the bundled agent-browser skill; never install automatically. If the user declines, explain that browser QA cannot be completed and stop; do not substitute ComputerUse for web QA.
Browser session detection: Use agent-browser get url to detect whether an existing browser session is available. Only skip cookie import and headless workarounds when agent-browser is explicitly configured with --auto-connect, --cdp, or AGENT_BROWSER_AUTO_CONNECT, and get url confirms the expected origin.
Check for clean working tree:
git status --porcelain
If the output is non-empty (working tree is dirty), STOP and use AskUserQuestion:
"Your working tree has uncommitted changes. /qa needs a clean tree so each bug fix gets its own atomic commit."
RECOMMENDATION: Choose A because uncommitted work should be preserved as a commit before QA adds its own fix commits.
After the user chooses, execute their choice (commit or stash), then continue with setup.
Browser/desktop QA tooling: Use agent-browser for browser QA and BitFun ComputerUse only for native desktop surfaces it cannot reach. Save QA artifacts under .bitfun/team/qa-reports/.
Check test framework (bootstrap if needed):
Detect existing test framework and project runtime:
setopt +o nomatch 2>/dev/null || true # zsh compat
# Detect project runtime
[ -f Gemfile ] && echo "RUNTIME:ruby"
[ -f package.json ] && echo "RUNTIME:node"
[ -f requirements.txt ] || [ -f pyproject.toml ] && echo "RUNTIME:python"
[ -f go.mod ] && echo "RUNTIME:go"
[ -f Cargo.toml ] && echo "RUNTIME:rust"
[ -f composer.json ] && echo "RUNTIME:php"
[ -f mix.exs ] && echo "RUNTIME:elixir"
# Detect sub-frameworks
[ -f Gemfile ] && grep -q "rails" Gemfile 2>/dev/null && echo "FRAMEWORK:rails"
[ -f package.json ] && grep -q '"next"' package.json 2>/dev/null && echo "FRAMEWORK:nextjs"
# Check for existing test infrastructure
ls jest.config.* vitest.config.* playwright.config.* .rspec pytest.ini pyproject.toml phpunit.xml 2>/dev/null
ls -d test/ tests/ spec/ __tests__/ cypress/ e2e/ 2>/dev/null
# Check opt-out marker
[ -f .bitfun/team/no-test-bootstrap ] && echo "BOOTSTRAP_DECLINED"
If test framework detected (config files or test directories found): Print "Test framework detected: {name} ({N} existing tests). Skipping bootstrap." Read 2-3 existing test files to learn conventions (naming, imports, assertion style, setup patterns). Store conventions as prose context for use in Phase 8e.5 or Step 3.4. Skip the rest of bootstrap.
If BOOTSTRAP_DECLINED appears: Print "Test bootstrap previously declined — skipping." Skip the rest of bootstrap.
If NO runtime detected (no config files found): Use AskUserQuestion:
"I couldn't detect your project's language. What runtime are you using?"
Options: A) Node.js/TypeScript B) Ruby/Rails C) Python D) Go E) Rust F) PHP G) Elixir H) This project doesn't need tests.
If user picks H → write .bitfun/team/no-test-bootstrap and continue without tests.
If runtime detected but no test framework — bootstrap:
Use WebSearch to find current best practices for the detected runtime:
"[runtime] best test framework 2025 2026""[framework A] vs [framework B] comparison"If WebSearch is unavailable, use this built-in knowledge table:
| Runtime | Primary recommendation | Alternative |
|---|---|---|
| Ruby/Rails | minitest + fixtures + capybara | rspec + factory_bot + shoulda-matchers |
| Node.js | vitest + @testing-library | jest + @testing-library |
| Next.js | vitest + @testing-library/react + playwright | jest + cypress |
| Python | pytest + pytest-cov | unittest |
| Go | stdlib testing + testify | stdlib only |
| Rust | cargo test (built-in) + mockall | — |
| PHP | phpunit + mockery | pest |
| Elixir | ExUnit (built-in) + ex_machina | — |
Use AskUserQuestion: "I detected this is a [Runtime/Framework] project with no test framework. I researched current best practices. Here are the options: A) [Primary] — [rationale]. Includes: [packages]. Supports: unit, integration, smoke, e2e B) [Alternative] — [rationale]. Includes: [packages] C) Skip — don't set up testing right now RECOMMENDATION: Choose A because [reason based on project context]"
If user picks C → write .bitfun/team/no-test-bootstrap. Tell user: "If you change your mind later, delete .bitfun/team/no-test-bootstrap and re-run." Continue without tests.
If multiple runtimes detected (monorepo) → ask which runtime to set up first, with option to do both sequentially.
If package installation fails → debug once. If still failing → revert with git checkout -- package.json package-lock.json (or equivalent for the runtime). Warn user and continue without tests.
Generate 3-5 real tests for existing code:
git log --since=30.days --name-only --format="" | sort | uniq -c | sort -rn | head -10expect(x).toBeDefined() — test what the code DOES.Never import secrets, API keys, or credentials in test files. Use environment variables or test fixtures.
# Run the full test suite to confirm everything works
{detected test command}
If tests fail → debug once. If still failing → revert all bootstrap changes and warn user.
# Check CI provider
ls -d .github/ 2>/dev/null && echo "CI:github"
ls .gitlab-ci.yml .circleci/ bitrise.yml 2>/dev/null
If .github/ exists (or no CI detected — default to GitHub Actions):
Create .github/workflows/test.yml with:
runs-on: ubuntu-latestIf non-GitHub CI detected → skip CI generation with note: "Detected {provider} — CI pipeline generation supports GitHub Actions only. Add test step to your existing pipeline manually."
First check: If TESTING.md already exists → read it and update/append rather than overwriting. Never destroy existing content.
Write TESTING.md with:
First check: If AGENTS.md already has a ## Testing section → skip. Don't duplicate.
Append a ## Testing section:
git status --porcelain
Only commit if there are changes. Stage all bootstrap files (config, test directory, TESTING.md, AGENTS.md, .github/workflows/test.yml if created):
git commit -m "chore: bootstrap test framework ({framework name})"
Create output directories:
mkdir -p .bitfun/team/qa-reports/screenshots
Use only BitFun in-session memory, project docs, .bitfun/team/ artifacts, git history, TODO files, and prior design/review artifacts. Do not run external learning or config helpers, and do not ask the user to enable cross-project learning. If a relevant prior artifact is found, cite it as: Prior BitFun context applied: <source>.
Before falling back to git diff heuristics, check for richer test plan sources:
$HOME/.bitfun/team/projects/ for recent *-test-plan-*.md files for this repo
setopt +o nomatch 2>/dev/null || true # zsh compat
SLUG=$(basename "$(git rev-parse --show-toplevel 2>/dev/null || pwd)" | tr -cd A-Za-z0-9._-)
ls -t $HOME/.bitfun/team/projects/$SLUG/*-test-plan-*.md 2>/dev/null | head -1
/plan-eng-review or /plan-ceo-review produced test plan output in this conversationThis is the primary mode for developers verifying their work. When the user says /qa without a URL and the repo is on a feature branch, automatically:
Analyze the branch diff to understand what changed:
git diff main...HEAD --name-only
git log main..HEAD --oneline
Identify affected pages/routes from the changed files:
agent-browser eval "await fetch('/api/...')"If no obvious pages/routes are identified from the diff: Do not skip browser testing. The user invoked /qa because they want browser-based verification. Fall back to Quick mode — navigate to the homepage, follow the top 5 navigation targets, check console for errors, and test any interactive elements found. Backend, config, and infrastructure changes affect app behavior — always verify the app still works.
Detect the running app — check common local dev ports:
agent-browser open http://localhost:3000 2>/dev/null && echo "Found app on :3000" || \
agent-browser open http://localhost:4000 2>/dev/null && echo "Found app on :4000" || \
agent-browser open http://localhost:8080 2>/dev/null && echo "Found app on :8080"
If no local app is found, check for a staging/preview URL in the PR or environment. If nothing works, ask the user for the URL.
Test each affected page/route:
agent-browser diff snapshot after actions to verify the change had the expected effectCross-reference with commit messages and PR description to understand intent — what should the change do? Verify it actually does that.
Check TODOS.md (if it exists) for known bugs or issues related to the changed files. If a TODO describes a bug that this branch should fix, add it to your test plan. If you find a new bug during QA that isn't in TODOS.md, note it in the report.
Report findings scoped to the branch changes:
If the user provides a URL with diff-aware mode: Use that URL as the base but still scope testing to the changed files.
Systematic exploration. Visit every reachable page. Document 5-10 well-evidenced issues. Produce health score. Takes 5-15 minutes depending on app size.
--quick)30-second smoke test. Visit homepage + top 5 navigation targets. Check: page loads? Console errors? Broken links? Produce health score. No detailed issue documentation.
--regression <baseline>)Run full mode, then load baseline.json from a previous run. Diff: which issues are fixed? Which are new? What's the score delta? Append regression section to report.
If authentication needs credentials: Never put a password in command arguments. Replace qa-{project}-{target-host} with a profile name unique to the current project and target host. Ask the user to run this in their own interactive terminal and confirm when the profile is saved:
agent-browser auth save "qa-{project}-{target-host}" --url <login-url> --username [email protected] --password-stdin
After confirmation, run:
agent-browser auth login "qa-{project}-{target-host}"
agent-browser get url
agent-browser snapshot -i # verify the expected signed-in page or account marker
If the user provided a cookie file or Copy-as-cURL export:
agent-browser open
agent-browser cookies set --curl cookies.json
agent-browser open <target-url>
If 2FA/OTP is required: Ask the user for the code and wait.
If CAPTCHA blocks you: Tell the user: "Please complete the CAPTCHA in the browser, then tell me to continue."
Get a map of the application:
agent-browser open <target-url>
agent-browser screenshot --annotate "$REPORT_DIR/screenshots/initial.png"
agent-browser snapshot -i -u # map navigation structure
agent-browser errors # any errors on landing?
Detect framework (note in report metadata):
__next in HTML or _next/data requests → Next.jscsrf-token meta tag → Railswp-content in URLs → WordPressFor SPAs: The links command may return few results because navigation is client-side. Use snapshot -i to find nav elements (buttons, menu items) instead.
Visit pages systematically. At each page:
agent-browser open <page-url>
agent-browser screenshot --annotate "$REPORT_DIR/screenshots/page-name.png"
agent-browser errors
Then follow the per-page exploration checklist below:
agent-browser set viewport 375 812
agent-browser screenshot "$REPORT_DIR/screenshots/page-mobile.png"
agent-browser set viewport 1280 720
Depth judgment: Spend more time on core features (homepage, dashboard, checkout, search) and less on secondary pages (about, terms, privacy).
Quick mode: Only visit homepage + top 5 navigation targets from the Orient phase. Skip the per-page checklist — just check: loads? Console errors? Broken links visible?
Document each issue immediately when found — don't batch them.
Two evidence tiers:
Interactive bugs (broken flows, dead buttons, form failures):
agent-browser diff snapshot after the action to show what changedagent-browser screenshot "$REPORT_DIR/screenshots/issue-001-step-1.png"
agent-browser click @e5
agent-browser screenshot "$REPORT_DIR/screenshots/issue-001-result.png"
agent-browser diff snapshot
Static bugs (typos, layout issues, missing images):
agent-browser screenshot --annotate "$REPORT_DIR/screenshots/issue-002.png"
Write each issue to the report immediately using the issue format defined below.
baseline.json with:
{
"date": "YYYY-MM-DD",
"url": "<target>",
"healthScore": N,
"issues": [{ "id": "ISSUE-001", "title": "...", "severity": "...", "category": "..." }],
"categoryScores": { "console": N, "links": N, ... }
}
Regression mode: After writing the report, load the baseline file. Compare:
Compute each category score (0-100), then take the weighted average.
Each category starts at 100. Deduct per finding:
| Category | Weight |
|---|---|
| Console | 15% |
| Links | 10% |
| Visual | 10% |
| Functional | 20% |
| UX | 15% |
| Performance | 10% |
| Content | 5% |
| Accessibility | 15% |
score = Σ (category_score × weight)
Hydration failed, Text content did not match)_next/data requests in network — 404s indicate broken data fetchinggoto) — catches routing issues/wp-json/)snapshot -i for navigation — links command misses client-side routes[REDACTED] for passwords in repro steps.screenshot --annotate for tricky UIs. It labels interactive targets that need visual inspection.agent-browser screenshot command, use the Read tool on the output file(s) so the user can see them inline. Read every viewport capture. This is critical — without it, screenshots are invisible to the user.Record baseline health score at end of Phase 6.
.bitfun/team/qa-reports/
├── qa-report-{domain}-{YYYY-MM-DD}.md # Structured report
├── screenshots/
│ ├── initial.png # Landing page annotated screenshot
│ ├── issue-001-step-1.png # Per-issue evidence
│ ├── issue-001-result.png
│ ├── issue-001-before.png # Before fix (if fixed)
│ ├── issue-001-after.png # After fix (if fixed)
│ └── ...
└── baseline.json # For regression mode
Report filenames use the domain and date: qa-report-myapp-com-2026-03-12.md
Sort all discovered issues by severity, then decide which to fix based on the selected tier:
Mark issues that cannot be fixed from source code (e.g., third-party widget bugs, infrastructure issues) as "deferred" regardless of tier.
For each fixable issue, in severity order:
# Grep for error messages, component names, route definitions
# Glob for file patterns matching the affected page
git add <only-changed-files>
git commit -m "fix(qa): ISSUE-NNN — short description"
fix(qa): ISSUE-NNN — short descriptionagent-browser diff snapshot after the action to verify the change had the expected effectagent-browser open <affected-url>
agent-browser screenshot "$REPORT_DIR/screenshots/issue-NNN-after.png"
agent-browser errors
agent-browser diff snapshot
git revert HEAD → mark issue as "deferred"Skip if: classification is not "verified", OR the fix is purely visual/CSS with no JS behavior, OR no test framework was detected AND user declined bootstrap.
1. Study the project's existing test patterns:
Read 2-3 test files closest to the fix (same directory, same code type). Match exactly:
2. Trace the bug's codepath, then write a regression test:
Before writing the test, trace the data flow through the code you just fixed:
The test MUST:
// Regression: ISSUE-NNN — {what broke}
// Found by /qa on {YYYY-MM-DD}
// Report: .bitfun/team/qa-reports/qa-report-{domain}-{date}.md
Test type decision:
Generate unit tests. Mock all external dependencies (DB, API, Redis, file system).
Use auto-incrementing names to avoid collisions: check existing {name}.regression-*.test.{ext} files, take max number + 1.
3. Run only the new test file:
{detected test command} {new-test-file}
4. Evaluate:
git commit -m "test(qa): regression test for ISSUE-NNN — {desc}"5. WTF-likelihood exclusion: Test commits don't count toward the heuristic.
Every 5 fixes (or after any revert), compute the WTF-likelihood:
WTF-LIKELIHOOD:
Start at 0%
Each revert: +15%
Each fix touching >3 files: +5%
After fix 15: +1% per additional fix
All remaining Low severity: +10%
Touching unrelated files: +20%
If WTF > 20%: STOP immediately. Show the user what you've done so far. Ask whether to continue.
Hard cap: 50 fixes. After 50 fixes, stop regardless of remaining issues.
After all fixes are applied:
Write the report to both local and project-scoped locations:
Local: .bitfun/team/qa-reports/qa-report-{domain}-{YYYY-MM-DD}.md
Project-scoped: Write test outcome artifact for cross-session context:
SLUG=$(basename "$(git rev-parse --show-toplevel 2>/dev/null || pwd)" | tr -cd A-Za-z0-9._-) && mkdir -p $HOME/.bitfun/team/projects/$SLUG
Write to $HOME/.bitfun/team/projects/{slug}/{user}-{branch}-test-outcome-{datetime}.md
Per-issue additions (beyond standard report template):
Summary section:
PR Summary: Include a one-line summary suitable for PR descriptions:
"QA found N issues, fixed M, health score X → Y."
If the repo has a TODOS.md:
If you discovered a non-obvious pattern, pitfall, or architectural insight during this session, log it for future sessions:
true # BitFun Team Mode has no external telemetry helper
Types: pattern (reusable approach), pitfall (what NOT to do), preference
(user stated), architecture (structural decision), tool (library/framework insight),
operational (project environment/CLI/workflow knowledge).
Sources: observed (you found this in the code), user-stated (user told you),
inferred (AI deduction), cross-model (both BitFun and outside-voice sub-agent agree).
Confidence: 1-10. Be honest. An observed pattern you verified in the code is 8-9. An inference you're not sure about is 4-5. A user preference they explicitly stated is 10.
files: Include the specific file paths this learning references. This enables staleness detection: if those files are later deleted, the learning can be flagged.
Only log genuine discoveries. Don't log obvious things. Don't log things the user already knows. A good test: would this insight save time in a future session? If yes, log it.
git revert HEAD immediately.Alternatives
garrytan/gstack
Systematically QA test a web application and fix bugs found. (gstack)
mgiovani/cc-arsenal
Multi-agent review team: architecture, security, performance, testing, style, docs/UX, plus an adversary that cross-examines the other 6, for security-sensitive, architectural, or large PRs (15+ files) where a single-agent pass risks missing cross-cutting issues. Use for auth/payments/PII changes, schema/pattern changes, compliance sign-off, or when asked to 'get the review team on this' / 'multi-agent review' / 'thorough review before merge'. For a standard PR or a quick pre-merge check, use /r
OutlineDriven/odin-claude-plugin
Test and debug browser code with Chrome DevTools MCP. Use when building or debugging browser UI, inspecting the DOM, capturing console errors, analyzing network requests, or verifying visual output.
simota/agent-skills
Engineering detection rules (Sigma/YARA), mapping detection coverage, designing threat hunting hypotheses, executing Purple Team Blue side, and integrating Detection-as-Code CI/CD. Use when defensive security verification is needed.