From cortexloop
Analyzes test coverage gaps, test design quality, regression risks, and assertion quality. Helps write better tests and identify missing behaviors.
How this skill is triggered — by the user, by Claude, or both
Slash command
/cortexloop:test-strategyThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Depth skill for **pass 3 (`tests`)**. Pair with `cortexloop-expert-core` and `edge-case-and-state-analysis`.
Depth skill for pass 3 (tests). Pair with cortexloop-expert-core and edge-case-and-state-analysis.
Go deep on verification. Name missing behaviors, design better tests, spot weak assertions and flaky patterns. Production logic bugs → defer review; exploit paths → defer security.
Not maximum coverage percentage — confidence that important behavior will not silently regress. Every finding should name a concrete test someone could write tomorrow.
| Level | Use when | Red flags |
|---|---|---|
| Unit | Pure logic, single module | Mocking entire world; testing implementation details |
| Integration | DB, FS, queue, HTTP client with real or test double | None — gap if boundary untested |
| E2E | Critical user journeys | One E2E replacing 20 unit tests for pure logic |
Find wrong level: brittle E2E for math; unit test that mocks the thing you're trying to verify.
Error handling quality (swallowed errors) → defer
errorHandling. Frame here as "no test proves recovery/failure surface."
Prioritize gaps linked to upstream handoff Critical/High items.
Use edge-case-and-state-analysis for scenario design.
expect(true).toBe(true), snapshot of entire DOM without intenttoContain when exact value matters)waitForReport a missing-test finding only when:
Do not report "coverage should be 80%" without naming behaviors.
| Severity | Test gap examples |
|---|---|
| Critical | No test for payment/data-loss path; security-critical flow untested (defer exploit to pass 2, frame as test gap) |
| High | Core workflow branch untested; upstream Critical fix without regression test |
| Medium | Important edge case; weak assertion on common path |
| Low | Nice-to-have scenario; duplicate coverage at lower level |
| Info | Test style / naming improvement |
### High — No regression test for concurrent order cancel
- **Location:** tests/orders.test.ts (gap) — production: src/orders/cancel.ts:44
- **Category:** tests
- **Problem:** cancel() race fixed in CL-012 but no test simulates in-flight payment + cancel
- **Evidence:** grep shows cancel tests only cover happy path; handoff 01 flagged race at cancel.ts:44
- **Confidence:** high
- **Recommendation:** Add integration test: start payment stub (delay), call cancel, assert neither double-charge nor orphaned pending
- **Recommended Test:** setup pending order + slow payment mock → cancel → assert single terminal state
- **Failure It Would Catch:** reintroduced lost-update on concurrent cancel/pay
- **Auto-fixable:** no
__tests__, .spec., .test.)| Signal | Defer pass |
|---|---|
| Production code is wrong (proven without test angle) | review |
| Exploit / missing auth | security |
| catch {} swallows errors | errorHandling |
| Benchmark missing | performance |
| Test helper overly complex | simplicity |
| Unused test utility / dep | cleanup |
npx claudepluginhub whitequeen306/code-cortex-loop --plugin cortexloopSurveys test suites across five phases: unit, integration, E2E (browser), fuzz coverage gaps, and test quality. Produces findings and proposes tickets for remediation.
Uncovers edge cases, test coverage gaps, and bugs via phased analysis of code and tests. Guides gap identification, iterative test writing, and bug documentation.
Reviews test suites for coverage completeness, quality, and best practices. Checks happy/sad paths, edge cases, assertions, isolation, AAA patterns, and compliance with RSpec, Minitest, Jest, Playwright.