run-test-all
Runs ALL Vitest tests across /features, /tests, and /supabase directories. Executes tests via npx vitest run, collects results, and generates test.result.json (replaced on every run). Uses qa-specialist to analyze failures and provide actionable feedback. Triggers on: run test all, run all tests, test all, vitest all, run tests.
What this skill does
# Run Test All Skill
Run every Vitest test file in the project, collect results, and generate `test.result.json`.
---
## When to Use
Use `/run-test-all` when:
- You want to run **every test** in the project
- You want a **test.result.json** report of all pass/fail results
- You want to verify the full test suite after changes
Do NOT use when:
- You want to run only a specific phase → use `/run-test-phase`
- You want to generate tests (not run them) → use `/generate-test`
---
## How It Works
```
/run-test-all
|
v
+----------------------------------------------------------+
| STEP 1: Discover all test files |
| - tests/**/*.test.ts |
| - supabase/**/*.test.ts |
+----------------------------------------------------------+
|
v
+----------------------------------------------------------+
| STEP 2: Read test-plan.md for context |
| - Map test files to phases/features |
| - Understand expected behavior per test |
+----------------------------------------------------------+
|
v
+----------------------------------------------------------+
| STEP 3: Run vitest |
| - npx vitest run --reporter=json --outputFile=... |
| - Capture all results (pass, fail, skip, duration) |
+----------------------------------------------------------+
|
v
+----------------------------------------------------------+
| STEP 4: Parse results & generate test.result.json |
| - Replaces previous test.result.json entirely |
| - Structured by feature/phase with pass/fail counts |
+----------------------------------------------------------+
|
v
+----------------------------------------------------------+
| STEP 5: Analyze failures (if any) |
| - Spawn qa-specialist to analyze failing tests |
| - Provide actionable fix suggestions |
+----------------------------------------------------------+
|
v
+----------------------------------------------------------+
| STEP 6: Report results |
+----------------------------------------------------------+
```
---
## Step 1: Discover All Test Files
Find every test file in the project:
```
Glob: tests/**/*.test.ts
Glob: supabase/**/*.test.ts
```
**If no test files found:**
> No test files found. Run `/generate-test` first to generate test files from test-plan.md.
**STOP. Do NOT proceed.**
Report discovery:
```markdown
### Test Files Found
| Directory | Files |
|-----------|-------|
| tests/features/ | {count} |
| tests/rls/ | {count} |
| tests/constraints/ | {count} |
| supabase/ | {count} |
| **Total** | **{total}** |
```
---
## Step 2: Read test-plan.md for Context
```
Glob: **/test-plan.md OR **/test.plan.md
Read: [found path]
```
Extract the phase-to-feature mapping so results can be grouped by phase in test.result.json.
If test-plan.md does not exist, warn but proceed:
> test-plan.md not found. Results will be grouped by directory only, not by phase.
---
## Step 3: Run Vitest
### 3.1 Check Supabase local is running
```bash
npx supabase status
```
If Supabase is NOT running, warn:
> **Warning:** Supabase local does not appear to be running. Tests that connect to the database will fail.
> Start it with: `npx supabase start`
Ask the user:
```
AskUserQuestion:
question: "Supabase local doesn't seem to be running. Proceed anyway?"
header: "Supabase"
options:
- label: "Run tests anyway"
description: "Some tests may fail due to missing database connection"
- label: "Stop — I'll start Supabase first"
description: "I'll run npx supabase start and come back"
```
### 3.2 Execute vitest
Run ALL tests with JSON reporter:
```bash
npx vitest run --reporter=json --reporter=default --outputFile=docs/vitest-raw-output.json 2>&1
```
Capture:
- Exit code (0 = all pass, 1 = some failures)
- JSON output for structured parsing
- Console output for human-readable summary
### 3.3 If vitest is not installed
```
STOP. Tell user:
"Vitest is not installed. Run: npm install -D vitest"
```
---
## Step 4: Parse Results & Generate test.result.json
### 4.1 Read the raw vitest JSON output
```
Read: docs/vitest-raw-output.json
```
### 4.2 Parse and structure results
Build `test.result.json` with this structure:
```json
{
"generated": "2026-02-10T12:00:00.000Z",
"command": "run-test-all",
"scope": "all",
"duration_ms": 12345,
"summary": {
"total_suites": 10,
"passed_suites": 8,
"failed_suites": 2,
"total_tests": 85,
"passed": 78,
"failed": 5,
"skipped": 2,
"pass_rate": "91.8%"
},
"by_directory": {
"tests/features": {
"suites": 6,
"tests": 50,
"passed": 47,
"failed": 3,
"skipped": 0
},
"tests/rls+constraints": {
"suites": 3,
"tests": 25,
"passed": 23,
"failed": 2,
"skipped": 0
},
"supabase": {
"suites": 1,
"tests": 10,
"passed": 8,
"failed": 0,
"skipped": 2
}
},
"by_phase": {
"Phase 1: Auth": {
"suites": 2,
"tests": 20,
"passed": 18,
"failed": 2,
"features": ["auth"]
},
"Phase 2: Orders": {
"suites": 3,
"tests": 30,
"passed": 28,
"failed": 2,
"features": ["orders", "payments"]
}
},
"suites": [
{
"file": "tests/features/auth/auth.test.ts",
"status": "fail",
"duration_ms": 1234,
"tests": {
"total": 15,
"passed": 13,
"failed": 2,
"skipped": 0
},
"failures": [
{
"name": "Auth CRUD > should create user with valid data",
"error": "Expected null, received { code: '23502', message: '...' }",
"line": 45
},
{
"name": "Auth RLS > should deny other user access",
"error": "Expected 0, received 1",
"line": 78
}
]
},
{
"file": "tests/features/orders/orders.test.ts",
"status": "pass",
"duration_ms": 890,
"tests": {
"total": 20,
"passed": 20,
"failed": 0,
"skipped": 0
},
"failures": []
}
]
}
```
### 4.3 Write test.result.json
**ALWAYS replace the file entirely — never append.**
```
Write: docs/test.result.json
```
### 4.4 Clean up raw output
```bash
rm docs/vitest-raw-output.json
```
---
## Step 5: Analyze Failures (if any)
**If ALL tests passed → skip this step.**
If there are failures, spawn a qa-specialist agent to analyze:
```
Task:
subagent_type: qa-specialist
description: "Analyze test failures"
prompt: |
Analyze the following test failures and provide actionable fixes.
Read context:
- docs/test.result.json (test results with failure details)
- references/vitest-best-practices.md (testing rules)
- The failing test files (read each one)
- The source files being tested (read each one)
For each failure:
1. Read the failing test file and the line that failed
2. Read the source code being tested
3. Determine root cause:
- Is the test wrong? (assertion mismatch, wrong expectation)
- Is the source code wrong? (bug in implementation)
- Is the schema wrong? (missing column, wrong constraint)
- Is RLS wrong? (policy too permissive or too restrictive)
- Is test data wrong? (missing seed data, wrong setup)
4. Provide a specific fix recommendation
Return a structured analysis:
FAILURE ANALYSIS:
---
Test: {test name}
File: {file path}:{line}
Root Cause: {test_bug | source_bug | schema_issue | rls_issue | data_issue}
Explanation: {what went wrong}
Fix: {specific action to fix it}
---
[repeat for each failure]
SUMMARY:
- {Related in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.