better-testing
/better-testing
Review and improve how tests protect critical software behavior. Use when assessing missing unit, integration, contract, or end-to-end coverage; flaky tests; weak assertions; happy-path-only tests; excessive mocking; implementation-coupled tests; low-value snapshots; slow suites; or code that is difficult to test because of design. Prioritize behavior and risk rather than arbitrary coverage percentages.
- Author
- NicolasYusim ↗
- Repository
- better-codebase ↗
- Licence
- MIT
- Last repository change
- 09.08.2026
Assessment and security
- Files in this package
- 2
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 09.08.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Review and improve how tests protect critical software behavior. Use when assessing missing unit, integration, contract, or end-to-end coverage; flaky tests; weak assertions; happy-path-only tests; excessive mocking; implementation-coupled tests; low-value snapshots; slow suites; or code that is difficult to test because of design. Prioritize behavior and risk rather than arbitrary coverage percentages.
Original author description
Review and improve how tests protect critical software behavior. Use when assessing missing unit, integration, contract, or end-to-end coverage; flaky tests; weak assertions; happy-path-only tests; excessive mocking; implementation-coupled tests; low-value snapshots; slow suites; or code that is difficult to test because of design. Prioritize behavior and risk rather than arbitrary coverage percentages.
How it works
- Own behavioral protection
- Review workflow
- Coverage interpretation
- Evidence requirements
- Implementation rules
- Standalone review output
- Guardrails
SKILL.md preview
--- name: better-testing description: >- Review and improve how tests protect critical software behavior. Use when assessing missing unit, integration, contract, or end-to-end coverage; flaky tests; weak assertions; happy-path-only tests; excessive mocking; implementation-coupled tests; low-value snapshots; slow suites; or code that is difficult to test because of design. Prioritize behavior and risk rather than arbitrary coverage percentages. --- # Protect critical behavior with trustworthy tests Build confidence that meaningful changes are safe. Optimize for defect detection, behavioral contracts, useful failures, and maintainable feedback—not test count or coverage theater. ## Own behavioral protection Own test strategy, test selection, assertions, fixtures, doubles, suite boundaries, determinism, failure diagnostics, and testability signals. Treat difficult testing as evidence that may point to an architecture or maintainability problem. Assign the root cause to the appropriate owner rather than prescribing test-only workarounds. ## Review workflow ### 1. Map critical behavior Identify public contracts, business rules, state transitions, data boundaries, permissions, error behavior, integration points, concurrency or transaction semantics, and high-cost failure paths. Map each critical behavior to the narrowest trustworthy test layer: - unit tests for deterministic policy and transformations; - integration tests for storage, frameworks, queues, files, and service adapters; - contract tests for consumer/provider or protocol compatibility; - end-to-end tests for a small set of indispensable user or system paths; - characterization tests for behavior that must be preserved during refactoring. Do not infer importance from existing test density. Untested code may be critical; heavily tested helpers may not be. ### 2. Inspect the suite as evidence Run the narrowest safe test commands available. Inspect failures, duration, retries, skips, quarantine, and environment requirements. Investigate: - critical behavior with no executable protection; - only happy-path coverage where failure modes have meaningful consequences; - assertions that prove a call happened but not the resulting behavior; - tests coupled to private methods, call order, internal data structures, or incidental rendering; - mocks that recreate the implementation and allow integrations to drift; - snapshots so broad that reviewers cannot see semantic changes; - non-deterministic time, randomness, shared state, ports, ordering, or external services; - tests that pass individually but fail in suites or depend on execution order; - slow setup repeated unnecessarily or end-to-end tests used for cheap policy checks; - vague names and failures that do not identify the broken contract; - duplicated fixtures that encode inconsistent domain rules; - skipped tests with no owner or removal condition. A flaky-test claim requires repeatable evidence, history, or an identified nondeterministic mechanism. ### 3. Evaluate gaps by risk A missing test is actionable when all are true: 1. the behavior or contract is important; 2. a realistic regression or failure mode exists; 3. the proposed test would detect it through public behavior; 4. the test can remain more stable than the implementation. Do not require tests for trivial delegation, generated code, framework internals, or every defensive branch without a credible failure cost. ### 4. Improve the test boundary Prefer: 1. Stronger assertions on observable results. 2. Focused edge and failure cases for critical rules. 3. Fakes at volatile effect boundaries and real integration below them. 4. Small contract tests shared by multiple implementations. 5. Deterministic control of time, randomness, and external effects. 6. A few end-to-end paths backed by broader lower-level tests. 7. Better production seams when test complexity reveals hidden coupling. Use mocks to isolate expensive or unsafe effects, not to mirror every internal call. ## Coverage interpretation Treat line and branch coverage as maps of executed code, not quality targets. A percentage can identify unvisited areas but cannot prove meaningful assertions, representative data, or critical behavior. Never recommend an arbitrary repository-wide threshold without a risk model and team context. ## Evidence requirements For each finding, cite the production behavior and relevant test locations. Show: - the contract or failure mode at risk; - what the current test proves and fails to prove; - the smallest test or seam change; - why it will catch a realistic regression; - expected test layer, confidence, and maintenance cost; - a command that verifies the result. ## Implementation rules When asked to implement: - add a failing reproduction or characterization test before changing protected behavior; - assert public results, state, effects, or contracts; - keep fixtures minimal and explicit; - avoid production-only hooks added solely for a brittle test; - remove obsolete tests only after equivalent behavioral protection exists; - run the focused test first, then the relevant suite; - report baseline failures separately from new failures. ## Standalone review output When invoked directly, return: 1. **Critical behavior map** — contracts, risks, and current test layers. 2. **Suite baseline** — exact commands, results, duration or flake evidence when relevant. 3. **Findings** — behavior at risk, current evidence, smallest test or seam change, confidence, and change risk. 4. **Tests not recommended** — tempting low-value coverage and why it was rejected. 5. **Verification** — commands run and gaps requiring environment or data. If critical behavior has proportionate, trustworthy protection in the inspected scope, state `No actionable testing findings.` ## Guardrails - Never equate coverage percentage with confidence. - Never mock the unit so thoroughly that the test restates its implementation. - Never default to snapshots for behavior requiring semantic assertions. - Never label a test flaky from one unexplained failure. - Never add an end-to-end test when a stable lower-level test proves the same contract. - Never preserve a poor production boundary solely by increasing test indirection. - Never refactor weakly protected critical behavior before capturing its current intended contract.
Files in this package (2)
- SKILL.md 6 KB
- agents/openai.yaml 1 KB
Versions
The database has no other skills named better-testing.
Database snapshot: 13.11.2026 · package version b779d29c3d8f (SHA-256 digest of the entire package)
Downloads in the last 30 days: 1 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 90dte-test-auditor
Audit a test suite for real value, not just presence — coverage gaps AND test quality (weak assertions, over-mocking, implementation-coupled/brittle tests, missing edge/error/integration paths), plus mutation testing where available to prove tests actually fail when code breaks.… - 100testing-implementation
Evaluates test implementation and coverage, identifying gaps, weak assertions, and untested paths. Use when auditing test quality, coverage, or testing strategy. - 95testing-anti-patterns
Reviews test code to identify and fix common testing anti-patterns including flaky tests, over-mocking, brittle assertions, test interdependency, and hidden test logic. Flags bad patterns, explains the specific defect, and provides corrected implementations. Use when reviewing… - 100python-testing
Python testing patterns with pytest including unit tests, integration tests, fixtures, mocking, and coverage. Use when writing Python tests. - 100testing-audit
Audit the test suite for coverage gaps, test quality, flaky tests, and strategy alignment. Use when assessing test health before a release, or when tests feel weak, slow, or flaky. - 100frontend-testing-strategy
Reference for building a reliable frontend test suite - choosing what to test at unit, component, integration and end-to-end levels; the test pyramid and its trade-offs; testing user-visible behavior with React Testing Library; Vitest and Playwright usage; API mocking at the…