You are in AUTONOMOUS MODE. Do NOT ask questions. Analyze the project's test coverage
across all testing dimensions, identify gaps, and produce an actionable health report.
INPUT:
$ARGUMENTS
If arguments are provided, focus analysis on those specific areas or modules.
If no arguments are provided, analyze the ENTIRE project.
============================================================
PHASE 1: PROJECT DISCOVERY
Step 1.1 -- Tech Stack Detection
Auto-detect the project's technology stack by scanning for configuration files:
| File/Pattern |
Stack |
| pubspec.yaml with flutter SDK |
Flutter / Dart |
| package.json + tsconfig.json |
TypeScript / Node.js |
| package.json (no TS) |
JavaScript / Node.js |
| requirements.txt or pyproject.toml |
Python |
| go.mod |
Go |
| Cargo.toml |
Rust |
| Gemfile |
Ruby |
| pom.xml or build.gradle |
Java / Kotlin |
| *.csproj or *.sln |
C# / .NET |
Detect the application type:
- BACKEND_ONLY: API/service with no frontend
- FRONTEND_ONLY: Frontend app with external API
- FULLSTACK: Both backend and frontend
- MOBILE: Mobile app (Flutter, React Native, SwiftUI)
- LIBRARY: Reusable package or SDK
Record: language, framework, application type, entry points, source directories.
Step 1.2 -- Test Infrastructure Inventory
Scan the project for ALL existing test-related files and configuration:
DIRECTORIES to check:
- test/, tests/, tests/, spec/, e2e/, cypress/, integration_test/
- playwright/, .storybook/, k6/, locust/, artillery/, load-test/
- contract/, pact/, snapshots/, snapshots/
CONFIG FILES to check:
- jest.config., vitest.config., pytest.ini, pyproject.toml [tool.pytest]
- playwright.config., cypress.config., .mocharc.*
- .nycrc, .coveragerc, codecov.yml, lcov.info, coverage/
- backstop.json, .percy.yml, chromatic.config.*
- pact-config.*, dredd.yml, .spectral.yaml
- lighthouserc.*, .axe.json, pa11y.json
TEST SCRIPTS in package.json (or equivalent):
- test, test:unit, test:integration, test:e2e, test:load, test:visual, test:a11y
- coverage, lint, typecheck
Build a complete inventory table:
| Category |
Framework |
Config File |
Test Directory |
Test Count |
Last Modified |
Step 1.3 -- Source Code Analysis
Count source files and estimate testable surface area:
- Total source files (exclude node_modules, vendor, build, dist)
- Total functions/methods exported or public
- Total API endpoints (routes, controllers)
- Total UI components or screens
- Total data models or entities
============================================================
PHASE 2: TEST COVERAGE ANALYSIS
Step 2.1 -- Run Existing Coverage Tools
If coverage tools are configured, run them:
| Stack |
Command |
| Node.js (Vitest) |
npx vitest run --coverage --reporter=json |
| Node.js (Jest) |
npx jest --coverage --json |
| Python |
pytest --cov=. --cov-report=json |
| Go |
go test -coverprofile=coverage.out ./... |
| Flutter |
flutter test --coverage |
| Ruby |
bundle exec rspec --format json |
Parse the coverage output to extract:
- Line coverage percentage
- Branch coverage percentage
- Function coverage percentage
- Files with 0% coverage
- Files with < 50% coverage
Step 2.2 -- Categorize Existing Tests
Read every test file and classify each test into a category:
| Category |
Indicators |
| Unit |
Tests a single function/method in isolation, uses mocks/stubs |
| Integration |
Tests multiple components together, may use real DB or services |
| E2E |
Tests full user flows, uses browser/simulator, hits real endpoints |
| Load/Performance |
Uses k6, Locust, Artillery, or measures response times |
| Visual Regression |
Captures screenshots, compares images, uses Percy/Chromatic |
| Contract |
Validates API schemas, uses Pact/OpenAPI/Dredd |
| Accessibility |
Uses axe-core, pa11y, Lighthouse, checks WCAG compliance |
| Snapshot |
Jest/Vitest snapshot tests |
| Smoke |
Basic health checks, minimal coverage |
Build the categorized test count:
| Category |
Test Files |
Test Cases |
Coverage Area |
Step 2.3 -- Gap Identification
For each testing category, assess whether coverage exists and rate it:
UNIT TESTS:
- Are business logic functions covered?
- Are utility/helper functions covered?
- Are edge cases tested (null, empty, boundary values)?
- Are error paths tested?
INTEGRATION TESTS:
- Are API endpoints tested end-to-end?
- Are database operations tested (CRUD, transactions)?
- Are external service integrations tested (with mocks)?
- Are authentication/authorization flows tested?
E2E TESTS:
- Are critical user flows covered?
- Are form submissions tested?
- Are navigation flows tested?
- Are error states tested?
LOAD TESTS:
- Are performance baselines established?
- Are critical endpoints load-tested?
- Are spike/stress scenarios defined?
VISUAL REGRESSION TESTS:
- Are critical pages captured at multiple breakpoints?
- Is there a baseline for comparison?
- Are dynamic content areas handled?
CONTRACT TESTS:
- Are API schemas validated?
- Is backward compatibility verified?
- Are consumer-driven contracts in place?
ACCESSIBILITY TESTS:
- Are WCAG 2.1 AA standards checked?
- Is keyboard navigation tested?
- Are all routes/pages scanned?
- Is Lighthouse CI configured?
============================================================
PHASE 3: SCORING AND HEALTH REPORT
Step 3.1 -- Score Each Category
Rate each testing category on a 0-10 scale:
| Score |
Meaning |
| 0 |
No tests exist |
| 1-2 |
Minimal: fewer than 5 tests, only happy paths |
| 3-4 |
Basic: some coverage but major gaps in edge cases or error paths |
| 5-6 |
Moderate: reasonable coverage, some categories of tests missing |
| 7-8 |
Good: comprehensive coverage with minor gaps |
| 9-10 |
Excellent: thorough coverage including edge cases, errors, boundaries |
Calculate an overall health score as a weighted average:
- Unit tests: 30% weight
- Integration tests: 25% weight
- E2E tests: 20% weight
- Load tests: 5% weight
- Visual regression: 5% weight
- Contract tests: 5% weight
- Accessibility: 10% weight
Step 3.2 -- Priority Ranking
Rank gaps by impact. Consider:
- What breaks production most often? (usually integration + unit gaps)
- What blocks releases? (usually E2E + contract gaps)
- What causes user complaints? (usually a11y + visual gaps)
- What causes incidents? (usually load + integration gaps)
============================================================
PHASE 4: REMEDIATION ROUTING
For each identified gap, recommend which sub-skill to run:
| Gap |
Skill to Run |
Priority |
| No unit tests or < 50% coverage |
/unit-test |
CRITICAL |
| No integration tests |
/integration-test |
CRITICAL |
| No E2E tests |
/e2e |
HIGH |
| No load tests for API projects |
/load-test |
MEDIUM |
| No visual regression (frontend) |
/visual-regression |
MEDIUM |
| No contract tests (API projects) |
/contract-test |
MEDIUM |
| No a11y tests (frontend) |
/accessibility-test |
HIGH |
============================================================
SELF-HEALING VALIDATION (max 3 iterations)
After generating and running tests, validate:
- All generated test files compile/parse without syntax errors.
- Run the generated tests — capture pass/fail results.
- If tests fail due to test code bugs (not application bugs), fix the test code.
- Re-run to confirm tests pass or legitimately fail on application issues.
- Repeat up to 3 iterations.
IF STILL FAILING after 3 iterations:
- Separate test failures into: test bugs vs application bugs
- Fix test bugs, document application bugs
============================================================
OUTPUT
Print the full health report:
Test Coverage Health Report
Project Summary
- Project: [name from package.json, pubspec.yaml, etc.]
- Stack: [language + framework]
- Type: [BACKEND_ONLY / FRONTEND_ONLY / FULLSTACK / MOBILE / LIBRARY]
- Source files: [count]
- Testable surface: [endpoints, components, functions count]
Coverage Scores
| Category |
Score (0-10) |
Tests |
Status |
| Unit Tests |
N |
N tests |
[MISSING / WEAK / MODERATE / STRONG / EXCELLENT] |
| Integration Tests |
N |
N tests |
[status] |
| E2E Tests |
N |
N tests |
[status] |
| Load Tests |
N |
N tests |
[status] |
| Visual Regression |
N |
N tests |
[status] |
| Contract Tests |
N |
N tests |
[status] |
| Accessibility |
N |
N tests |
[status] |
| Overall Health |
N/10 |
N total |
[verdict] |
Line Coverage (if available)
- Overall: X%
- Files with 0% coverage: [list top 10]
Critical Gaps (prioritized)
- [Gap] -- [why it matters] -- Run:
/[skill]
- [Gap] -- [why it matters] -- Run:
/[skill]
- ...
Existing Test Quality Notes
- [observations about test quality, naming, organization, flakiness]
Recommended Test Plan
Run these skills in order to achieve comprehensive coverage:
/[skill] -- [what it will add]
/[skill] -- [what it will add]
- ...
Estimated improvement: current N/10 -> projected N/10 after remediation.
NEXT STEPS:
- "Critical unit test gaps? Run
/unit-test to generate missing unit tests."
- "No integration tests? Run
/integration-test to cover API and database operations."
- "Frontend with no visual regression? Run
/visual-regression to set up baseline screenshots."
- "API without contract tests? Run
/contract-test to validate schemas."
- "Accessibility gaps? Run
/accessibility-test to check WCAG 2.1 AA compliance."
- "Need load testing? Run
/load-test to establish performance baselines."
- "Want full E2E coverage? Run
/e2e for comprehensive end-to-end testing."
DO NOT:
- Do NOT generate or run tests in this skill. This is analysis and routing only.
- Do NOT modify any source code or test files.
- Do NOT install any packages or frameworks.
- Do NOT skip any testing category in the analysis, even if it seems irrelevant.
- Do NOT inflate scores. A category with zero tests gets a zero score.
- Do NOT recommend skills that are irrelevant to the project type (e.g., no visual regression for a CLI tool, no load tests for a static library).
============================================================
SELF-EVOLUTION TELEMETRY
After producing output, record execution metadata for the /evolve pipeline.
Check if a project memory directory exists:
- Look for the project path in
~/.claude/projects/
- If found, append to
skill-telemetry.md in that memory directory
Entry format:
### /test-suite — {{YYYY-MM-DD}}
- Outcome: {{SUCCESS | PARTIAL | FAILED}}
- Self-healed: {{yes — what was healed | no}}
- Iterations used: {{N}} / {{N max}}
- Bottleneck: {{phase that struggled or "none"}}
- Suggestion: {{one-line improvement idea for /evolve, or "none"}}
Only log if the memory directory exists. Skip silently if not found.
Keep entries concise — /evolve will parse these for skill improvement signals.
1---2name: test-suite3description: Analyze and score test coverage across all testing dimensions -- unit, integration, E2E, load, visual regression, contract, and accessibility. Auto-detects tech stack and test infrastructure, runs existing coverage tools, identifies gaps by category, scores each on a 0-10 scale with weighted overall health, and produces a prioritized remediation plan routing to the right testing sub-skill. Use when you need a test health overview, want to find coverage gaps, need to prioritize which tests to write next, or want to assess test quality before a release.4version: "2.0.0"5category: test6platforms:7 - CLAUDE_CODE8metadata:9 source: https://skillmd.com/skills/tinh2/test-suite10---1112You are in AUTONOMOUS MODE. Do NOT ask questions. Analyze the project's test coverage13across all testing dimensions, identify gaps, and produce an actionable health report.1415INPUT:16$ARGUMENTS1718If arguments are provided, focus analysis on those specific areas or modules.19If no arguments are provided, analyze the ENTIRE project.2021============================================================22PHASE 1: PROJECT DISCOVERY23============================================================2425Step 1.1 -- Tech Stack Detection2627Auto-detect the project's technology stack by scanning for configuration files:2829| File/Pattern | Stack |30|---|---|31| pubspec.yaml with flutter SDK | Flutter / Dart |32| package.json + tsconfig.json | TypeScript / Node.js |33| package.json (no TS) | JavaScript / Node.js |34| requirements.txt or pyproject.toml | Python |35| go.mod | Go |36| Cargo.toml | Rust |37| Gemfile | Ruby |38| pom.xml or build.gradle | Java / Kotlin |39| *.csproj or *.sln | C# / .NET |4041Detect the application type:42- BACKEND_ONLY: API/service with no frontend43- FRONTEND_ONLY: Frontend app with external API44- FULLSTACK: Both backend and frontend45- MOBILE: Mobile app (Flutter, React Native, SwiftUI)46- LIBRARY: Reusable package or SDK4748Record: language, framework, application type, entry points, source directories.4950Step 1.2 -- Test Infrastructure Inventory5152Scan the project for ALL existing test-related files and configuration:5354DIRECTORIES to check:55- test/, tests/, __tests__/, spec/, e2e/, cypress/, integration_test/56- playwright/, .storybook/, k6/, locust/, artillery/, load-test/57- contract/, pact/, snapshots/, __snapshots__/5859CONFIG FILES to check:60- jest.config.*, vitest.config.*, pytest.ini, pyproject.toml [tool.pytest]61- playwright.config.*, cypress.config.*, .mocharc.*62- .nycrc, .coveragerc, codecov.yml, lcov.info, coverage/63- backstop.json, .percy.yml, chromatic.config.*64- pact-config.*, dredd.yml, .spectral.yaml65- lighthouserc.*, .axe.json, pa11y.json6667TEST SCRIPTS in package.json (or equivalent):68- test, test:unit, test:integration, test:e2e, test:load, test:visual, test:a11y69- coverage, lint, typecheck7071Build a complete inventory table:7273| Category | Framework | Config File | Test Directory | Test Count | Last Modified |74|----------|-----------|-------------|----------------|------------|---------------|7576Step 1.3 -- Source Code Analysis7778Count source files and estimate testable surface area:7980- Total source files (exclude node_modules, vendor, build, dist)81- Total functions/methods exported or public82- Total API endpoints (routes, controllers)83- Total UI components or screens84- Total data models or entities8586============================================================87PHASE 2: TEST COVERAGE ANALYSIS88============================================================8990Step 2.1 -- Run Existing Coverage Tools9192If coverage tools are configured, run them:9394| Stack | Command |95|---|---|96| Node.js (Vitest) | npx vitest run --coverage --reporter=json |97| Node.js (Jest) | npx jest --coverage --json |98| Python | pytest --cov=. --cov-report=json |99| Go | go test -coverprofile=coverage.out ./... |100| Flutter | flutter test --coverage |101| Ruby | bundle exec rspec --format json |102103Parse the coverage output to extract:104- Line coverage percentage105- Branch coverage percentage106- Function coverage percentage107- Files with 0% coverage108- Files with < 50% coverage109110Step 2.2 -- Categorize Existing Tests111112Read every test file and classify each test into a category:113114| Category | Indicators |115|----------|-----------|116| Unit | Tests a single function/method in isolation, uses mocks/stubs |117| Integration | Tests multiple components together, may use real DB or services |118| E2E | Tests full user flows, uses browser/simulator, hits real endpoints |119| Load/Performance | Uses k6, Locust, Artillery, or measures response times |120| Visual Regression | Captures screenshots, compares images, uses Percy/Chromatic |121| Contract | Validates API schemas, uses Pact/OpenAPI/Dredd |122| Accessibility | Uses axe-core, pa11y, Lighthouse, checks WCAG compliance |123| Snapshot | Jest/Vitest snapshot tests |124| Smoke | Basic health checks, minimal coverage |125126Build the categorized test count:127128| Category | Test Files | Test Cases | Coverage Area |129|----------|-----------|------------|---------------|130131Step 2.3 -- Gap Identification132133For each testing category, assess whether coverage exists and rate it:134135UNIT TESTS:136- Are business logic functions covered?137- Are utility/helper functions covered?138- Are edge cases tested (null, empty, boundary values)?139- Are error paths tested?140141INTEGRATION TESTS:142- Are API endpoints tested end-to-end?143- Are database operations tested (CRUD, transactions)?144- Are external service integrations tested (with mocks)?145- Are authentication/authorization flows tested?146147E2E TESTS:148- Are critical user flows covered?149- Are form submissions tested?150- Are navigation flows tested?151- Are error states tested?152153LOAD TESTS:154- Are performance baselines established?155- Are critical endpoints load-tested?156- Are spike/stress scenarios defined?157158VISUAL REGRESSION TESTS:159- Are critical pages captured at multiple breakpoints?160- Is there a baseline for comparison?161- Are dynamic content areas handled?162163CONTRACT TESTS:164- Are API schemas validated?165- Is backward compatibility verified?166- Are consumer-driven contracts in place?167168ACCESSIBILITY TESTS:169- Are WCAG 2.1 AA standards checked?170- Is keyboard navigation tested?171- Are all routes/pages scanned?172- Is Lighthouse CI configured?173174============================================================175PHASE 3: SCORING AND HEALTH REPORT176============================================================177178Step 3.1 -- Score Each Category179180Rate each testing category on a 0-10 scale:181182| Score | Meaning |183|-------|---------|184| 0 | No tests exist |185| 1-2 | Minimal: fewer than 5 tests, only happy paths |186| 3-4 | Basic: some coverage but major gaps in edge cases or error paths |187| 5-6 | Moderate: reasonable coverage, some categories of tests missing |188| 7-8 | Good: comprehensive coverage with minor gaps |189| 9-10 | Excellent: thorough coverage including edge cases, errors, boundaries |190191Calculate an overall health score as a weighted average:192- Unit tests: 30% weight193- Integration tests: 25% weight194- E2E tests: 20% weight195- Load tests: 5% weight196- Visual regression: 5% weight197- Contract tests: 5% weight198- Accessibility: 10% weight199200Step 3.2 -- Priority Ranking201202Rank gaps by impact. Consider:203- What breaks production most often? (usually integration + unit gaps)204- What blocks releases? (usually E2E + contract gaps)205- What causes user complaints? (usually a11y + visual gaps)206- What causes incidents? (usually load + integration gaps)207208============================================================209PHASE 4: REMEDIATION ROUTING210============================================================211212For each identified gap, recommend which sub-skill to run:213214| Gap | Skill to Run | Priority |215|-----|-------------|----------|216| No unit tests or < 50% coverage | `/unit-test` | CRITICAL |217| No integration tests | `/integration-test` | CRITICAL |218| No E2E tests | `/e2e` | HIGH |219| No load tests for API projects | `/load-test` | MEDIUM |220| No visual regression (frontend) | `/visual-regression` | MEDIUM |221| No contract tests (API projects) | `/contract-test` | MEDIUM |222| No a11y tests (frontend) | `/accessibility-test` | HIGH |223224225============================================================226SELF-HEALING VALIDATION (max 3 iterations)227============================================================228229After generating and running tests, validate:2302311. All generated test files compile/parse without syntax errors.2322. Run the generated tests — capture pass/fail results.2333. If tests fail due to test code bugs (not application bugs), fix the test code.2344. Re-run to confirm tests pass or legitimately fail on application issues.2355. Repeat up to 3 iterations.236237IF STILL FAILING after 3 iterations:238- Separate test failures into: test bugs vs application bugs239- Fix test bugs, document application bugs240241============================================================242OUTPUT243============================================================244245Print the full health report:246247## Test Coverage Health Report248249### Project Summary250- **Project:** [name from package.json, pubspec.yaml, etc.]251- **Stack:** [language + framework]252- **Type:** [BACKEND_ONLY / FRONTEND_ONLY / FULLSTACK / MOBILE / LIBRARY]253- **Source files:** [count]254- **Testable surface:** [endpoints, components, functions count]255256### Coverage Scores257258| Category | Score (0-10) | Tests | Status |259|----------|-------------|-------|--------|260| Unit Tests | N | N tests | [MISSING / WEAK / MODERATE / STRONG / EXCELLENT] |261| Integration Tests | N | N tests | [status] |262| E2E Tests | N | N tests | [status] |263| Load Tests | N | N tests | [status] |264| Visual Regression | N | N tests | [status] |265| Contract Tests | N | N tests | [status] |266| Accessibility | N | N tests | [status] |267| **Overall Health** | **N/10** | **N total** | **[verdict]** |268269### Line Coverage (if available)270- Overall: X%271- Files with 0% coverage: [list top 10]272273### Critical Gaps (prioritized)2742751. **[Gap]** -- [why it matters] -- Run: `/[skill]`2762. **[Gap]** -- [why it matters] -- Run: `/[skill]`2773. ...278279### Existing Test Quality Notes280- [observations about test quality, naming, organization, flakiness]281282### Recommended Test Plan283284Run these skills in order to achieve comprehensive coverage:2851. `/[skill]` -- [what it will add]2862. `/[skill]` -- [what it will add]2873. ...288289Estimated improvement: current N/10 -> projected N/10 after remediation.290291NEXT STEPS:292293- "Critical unit test gaps? Run `/unit-test` to generate missing unit tests."294- "No integration tests? Run `/integration-test` to cover API and database operations."295- "Frontend with no visual regression? Run `/visual-regression` to set up baseline screenshots."296- "API without contract tests? Run `/contract-test` to validate schemas."297- "Accessibility gaps? Run `/accessibility-test` to check WCAG 2.1 AA compliance."298- "Need load testing? Run `/load-test` to establish performance baselines."299- "Want full E2E coverage? Run `/e2e` for comprehensive end-to-end testing."300301DO NOT:302303- Do NOT generate or run tests in this skill. This is analysis and routing only.304- Do NOT modify any source code or test files.305- Do NOT install any packages or frameworks.306- Do NOT skip any testing category in the analysis, even if it seems irrelevant.307- Do NOT inflate scores. A category with zero tests gets a zero score.308- Do NOT recommend skills that are irrelevant to the project type (e.g., no visual regression for a CLI tool, no load tests for a static library).309310311============================================================312SELF-EVOLUTION TELEMETRY313============================================================314315After producing output, record execution metadata for the /evolve pipeline.316317Check if a project memory directory exists:318- Look for the project path in `~/.claude/projects/`319- If found, append to `skill-telemetry.md` in that memory directory320321Entry format:322```323### /test-suite — {{YYYY-MM-DD}}324- Outcome: {{SUCCESS | PARTIAL | FAILED}}325- Self-healed: {{yes — what was healed | no}}326- Iterations used: {{N}} / {{N max}}327- Bottleneck: {{phase that struggled or "none"}}328- Suggestion: {{one-line improvement idea for /evolve, or "none"}}329```330331Only log if the memory directory exists. Skip silently if not found.332Keep entries concise — /evolve will parse these for skill improvement signals.