skills/qa/SKILL.md
Browser-based QA verification. Launches a real browser, navigates the app, clicks buttons, fills forms, and tests user flows. Works as a standalone skill or as a phase end condition in campaigns. Requires Playwright (optional dependency, graceful skip if not installed).
npx skillsauth add special-place-administrator/citadel_codex qaInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
qa tests your app the way a user would: by actually using it. It launches a browser, navigates to pages, clicks buttons, fills forms, and verifies that interactions work. Screenshots catch visual bugs. QA catches interaction bugs.
qa requires Playwright. It's an optional dependency.
If Playwright is installed: full browser QA works. If Playwright is NOT installed: the skill offers to install it, or falls back to live-preview (screenshot-only verification).
Detection:
npx playwright --version 2>/dev/null
Installation (if user agrees):
npm install -D playwright
npx playwright install chromium
Only installs Chromium (smallest download, ~150MB). Not Firefox or WebKit unless the user asks for cross-browser testing.
Setup integration: During project setup, if the project is a web app (has React, Next.js, Vue, Svelte, or HTML files), offer to install Playwright: "I see this is a web project. Want to enable browser QA testing? This installs Playwright (~150MB) for interaction testing. (y/n)"
If they say no, qa falls back to live-preview. No pressure.
Before testing, understand what to test:
If no PRD or campaign exists, ask: "What should I test? Give me 1-3 user flows."
Before testing, the app needs to be running:
npm run dev or equivalent, in backgroundTrack whether the agent started the server. If so, kill it on completion.
For each flow identified in Step 1, write and run a Playwright script:
const { chromium } = require('playwright');
(async () => {
const browser = await chromium.launch({ headless: true });
const page = await browser.newPage();
// Navigate
await page.goto('http://localhost:3000');
// Verify page loaded
const title = await page.title();
// Test interactions
await page.click('button[data-testid="add-todo"]');
await page.fill('input[name="title"]', 'Test todo');
await page.click('button[type="submit"]');
// Verify result
const todoText = await page.textContent('.todo-item:last-child');
// Screenshot for evidence
await page.screenshot({ path: '.citadel/screenshots/qa-flow-1.png' });
await browser.close();
})();
For each test:
Write results to .citadel/qa-report-{date}.md:
# QA Report: {App Name or Feature}
> Date: {ISO date}
> Flows tested: {N}
> Passed: {N}
> Failed: {N}
> Screenshots: .citadel/screenshots/qa-*.png
## Results
### Flow 1: {description}
- Steps: {what was done}
- Expected: {what should happen}
- Actual: {what did happen}
- Result: PASS / FAIL
- Screenshot: {path}
- Notes: {any observations}
### Flow 2: ...
When running as a phase end condition:
The campaign file can specify QA conditions:
| 3 | qa_verify | qa passes for: add todo, complete todo, delete todo |
qa reads the condition, runs those specific flows, and reports pass/fail. The phase is complete only if all specified flows pass.
For apps with authentication:
Test credentials should come from .env.example or the campaign file.
NEVER read from .env (protected by the hook). Use test accounts only.
If Playwright isn't installed and the user declines installation:
development
GitHub issue and PR investigator. Pulls open issues/PRs, classifies them, searches the codebase for root cause or reviews contributed code, proposes fixes with file:line references, and optionally implements fixes. Handles both issues and pull requests.
development
Generate and verify tests — happy path, edge cases, error paths — using the project's own framework and patterns
development
Four-phase root cause analysis: observe, hypothesize, verify, fix. Enforces investigation before code changes and stops guess-and-check debugging.
testing
First-run experience for the harness. Detects the project stack, scaffolds the .citadel/ state directory, generates configuration, runs one real task as a demo, and prints a reference card of all available skills. Gets someone from install to first `do` command in 5 minutes.