QA
Diff-aware quality assurance. Analyzes git diffs, classifies file changes by category (style, component, API, data, config, test, docs, infra), and routes to the appropriate test/validation strategy. Smart QA — test what matters, skip what doesn't.
Customization
Before executing, check for user customizations at:
~/.claude/skills/PAI/USER/SKILLCUSTOMIZATIONS/QA/
If this directory exists, load and apply any PREFERENCES.md, configurations, or resources found there. These override default behavior. If the directory does not exist, proceed with skill defaults.
Voice Notification
When executing a workflow, do BOTH:
Send voice notification:
curl -s -X POST http://localhost:8888/notify \
-H "Content-Type: application/json" \
-d '{"message": "Running the WORKFLOWNAME workflow in the QA skill to ACTION"}' \
> /dev/null 2>&1 &
Output text notification:
Running the **WorkflowName** workflow in the **QA** skill to ACTION...
Workflow Routing
| Workflow |
Trigger |
File |
| Analyze |
"/qa", "what should I test", "check my changes", "diff analysis" |
Workflows/Analyze.md |
| QuickCheck |
"quick check", "smoke test", "quick qa", "sanity check" |
Workflows/QuickCheck.md |
Architecture
Two-stage process:
- Script (
Tools/DiffAnalyzer.ts) — deterministic diff parsing, file classification, route generation
- AI orchestration — interpret routes, execute checks, report results
Tool Reference
Path: ~/.claude/skills/QA/Tools/DiffAnalyzer.ts
Usage:
# Diff against main (default)
bun ~/.claude/skills/QA/Tools/DiffAnalyzer.ts
# Diff against specific branch
bun ~/.claude/skills/QA/Tools/DiffAnalyzer.ts --branch develop
# Staged changes only
bun ~/.claude/skills/QA/Tools/DiffAnalyzer.ts --staged
# Explicit file list
bun ~/.claude/skills/QA/Tools/DiffAnalyzer.ts --files "src/api.ts,src/styles.css"
Output: JSON with file classifications, diff stats, and QA routing recommendations.
File Categories
| Category |
Matches |
QA Strategy |
| style |
CSS, SCSS, Tailwind config |
Visual regression — screenshot before/after |
| component |
TSX, JSX, Vue, Svelte |
Component render check — verify UI |
| api |
Route handlers, controllers, middleware |
Endpoint validation — test request/response |
| data |
Migrations, schemas, seeds, Prisma |
Migration safety — check destructive ops |
| config |
JSON, YAML, TOML, env files |
Config validation — syntax and required fields |
| test |
.test., .spec., tests |
Test-only — run modified tests |
| docs |
Markdown, README, CHANGELOG |
Documentation review — link and accuracy check |
| infra |
Dockerfile, CI/CD, deploy configs |
Infrastructure review — verify deploy config |
Diff Size Routing
| Size |
Lines Changed |
Strategy |
| Small |
<50 |
Quick smoke test — focused verification |
| Medium |
50-199 |
Standard testing — run related tests |
| Large |
200+ |
Full suite — comprehensive check recommended |
Examples
Example 1: Before shipping a feature
User: "/qa"
→ Runs DiffAnalyzer.ts against main
→ "12 files changed: 3 component, 2 api, 1 style, 6 test"
→ Routes: visual check for style, endpoint validation for API, run component tests
→ Executes each route, reports results
Example 2: Quick sanity check
User: "quick check"
→ Runs DiffAnalyzer.ts --staged
→ "2 files changed: 1 config, 1 api (small diff)"
→ Quick smoke test: validate config syntax, curl API endpoint
Example 3: Explicit files
User: "qa these files: src/auth.ts, src/auth.test.ts"
→ Runs DiffAnalyzer.ts --files "src/auth.ts,src/auth.test.ts"
→ Routes: API validation for auth.ts, run auth.test.ts
Integration
- Ship skill: Run
/qa before /ship to verify changes
- Evals: QA routes map to Evals grader types (code_based for config, llm_rubric for docs)
- Browser: Visual regression checks use Browser skill for screenshots
1---2name: qa3description: Diff-aware QA routing — analyze what changed and route to the right test strategy. USE WHEN qa, what should I test, check my changes, run qa, review changes, diff analysis, what broke, smoke test, test routing.4---56# QA78Diff-aware quality assurance. Analyzes git diffs, classifies file changes by category (style, component, API, data, config, test, docs, infra), and routes to the appropriate test/validation strategy. Smart QA — test what matters, skip what doesn't.910## Customization1112**Before executing, check for user customizations at:**13`~/.claude/skills/PAI/USER/SKILLCUSTOMIZATIONS/QA/`1415If this directory exists, load and apply any PREFERENCES.md, configurations, or resources found there. These override default behavior. If the directory does not exist, proceed with skill defaults.1617## Voice Notification1819**When executing a workflow, do BOTH:**20211. **Send voice notification**:22 ```bash23 curl -s -X POST http://localhost:8888/notify \24 -H "Content-Type: application/json" \25 -d '{"message": "Running the WORKFLOWNAME workflow in the QA skill to ACTION"}' \26 > /dev/null 2>&1 &27 ```28292. **Output text notification**:30 ```31 Running the **WorkflowName** workflow in the **QA** skill to ACTION...32 ```3334## Workflow Routing3536| Workflow | Trigger | File |37|----------|---------|------|38| **Analyze** | "/qa", "what should I test", "check my changes", "diff analysis" | `Workflows/Analyze.md` |39| **QuickCheck** | "quick check", "smoke test", "quick qa", "sanity check" | `Workflows/QuickCheck.md` |4041## Architecture4243**Two-stage process:**441. **Script** (`Tools/DiffAnalyzer.ts`) — deterministic diff parsing, file classification, route generation452. **AI orchestration** — interpret routes, execute checks, report results4647## Tool Reference4849**Path:** `~/.claude/skills/QA/Tools/DiffAnalyzer.ts`5051**Usage:**52```bash53# Diff against main (default)54bun ~/.claude/skills/QA/Tools/DiffAnalyzer.ts5556# Diff against specific branch57bun ~/.claude/skills/QA/Tools/DiffAnalyzer.ts --branch develop5859# Staged changes only60bun ~/.claude/skills/QA/Tools/DiffAnalyzer.ts --staged6162# Explicit file list63bun ~/.claude/skills/QA/Tools/DiffAnalyzer.ts --files "src/api.ts,src/styles.css"64```6566**Output:** JSON with file classifications, diff stats, and QA routing recommendations.6768## File Categories6970| Category | Matches | QA Strategy |71|----------|---------|-------------|72| **style** | CSS, SCSS, Tailwind config | Visual regression — screenshot before/after |73| **component** | TSX, JSX, Vue, Svelte | Component render check — verify UI |74| **api** | Route handlers, controllers, middleware | Endpoint validation — test request/response |75| **data** | Migrations, schemas, seeds, Prisma | Migration safety — check destructive ops |76| **config** | JSON, YAML, TOML, env files | Config validation — syntax and required fields |77| **test** | *.test.*, *.spec.*, __tests__ | Test-only — run modified tests |78| **docs** | Markdown, README, CHANGELOG | Documentation review — link and accuracy check |79| **infra** | Dockerfile, CI/CD, deploy configs | Infrastructure review — verify deploy config |8081## Diff Size Routing8283| Size | Lines Changed | Strategy |84|------|--------------|----------|85| **Small** | <50 | Quick smoke test — focused verification |86| **Medium** | 50-199 | Standard testing — run related tests |87| **Large** | 200+ | Full suite — comprehensive check recommended |8889## Examples9091**Example 1: Before shipping a feature**92```93User: "/qa"94→ Runs DiffAnalyzer.ts against main95→ "12 files changed: 3 component, 2 api, 1 style, 6 test"96→ Routes: visual check for style, endpoint validation for API, run component tests97→ Executes each route, reports results98```99100**Example 2: Quick sanity check**101```102User: "quick check"103→ Runs DiffAnalyzer.ts --staged104→ "2 files changed: 1 config, 1 api (small diff)"105→ Quick smoke test: validate config syntax, curl API endpoint106```107108**Example 3: Explicit files**109```110User: "qa these files: src/auth.ts, src/auth.test.ts"111→ Runs DiffAnalyzer.ts --files "src/auth.ts,src/auth.test.ts"112→ Routes: API validation for auth.ts, run auth.test.ts113```114115## Integration116117- **Ship skill**: Run `/qa` before `/ship` to verify changes118- **Evals**: QA routes map to Evals grader types (code_based for config, llm_rubric for docs)119- **Browser**: Visual regression checks use Browser skill for screenshots