fix-tests

Detects and batch-repairs systematic test anti-patterns across a test suite using production code context.

6|Updated Mar 27, 2026
One-click install
npx skills add https://github.com/greglas75/zuvo --skill fix-tests-greglas75
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fix-tests
Source: https://github.com/greglas75/zuvo/tree/main/skills/fix-tests
Command: npx skills add https://github.com/greglas75/zuvo --skill fix-tests-greglas75

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Test suites generated or grown over time accumulate the same quality anti-patterns across many files — loading-only assertions, tautological mocks, missing error-path tests, hardcoded credentials. Fixing them one file at a time is slow and inconsistent; this Skill triages the whole suite, then repairs one pattern at a time with real production context. ## Core Features & Use Cases - Triage scanning: Detects 20+ named anti-patterns (P-41 loading-only assertions, AP10 tautological mocks, P-64 hardcoded credentials, Q7 missing error tests, and more) and reports per-pattern file counts. - Context-aware batch fixing: For each affected test file, locates its production counterpart, reads the real state shapes, thunk signatures, and component JSX, then rewrites broken assertions against actual behavior. - Verification loop: Runs modified tests, fixes production bugs surfaced by strengthened assertions in-run, and performs a mandatory adversarial review before reporting. - Use Case: After generating a large Redux/NestJS test suite, run triage mode to find every test that only asserts state.loading, then batch-rewrite them to verify actual payload fields — with all tests re-run and passing at the end. ## Quick Start Ask the AI to run fix-tests in triage mode to scan the test suite for anti-patterns and automatically repair every pattern it finds.

Frequently Asked Questions about fix-tests

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix loading-only assertions across my whole test suite?

Run the triage mode to scan for pattern P-41, which finds tests that only check state.loading. The skill reads each slice's state interface and rewrites the assertions to verify actual payload fields, then re-runs the modified tests to confirm they pass.

How to detect and fix tautological mock tests automatically?

Pattern AP10 detects tests that only call a mock and assert it was called without exercising production code. The skill reads the real service method signatures and rewrites the test to invoke production code with verified arguments.

Can I fix only one specific test anti-pattern instead of all of them?

Yes, use --pattern [ID] to fix a single pattern across all matching files, optionally scoped to a directory with --pattern [ID] [path]. Use --dry-run to preview counts and affected files without modifying anything.

What happens when a strengthened test assertion reveals a real production bug?

The skill fixes the in-scope production bug in the same run following its test-bugfix protocol, using stacked commits: one for the strengthened test, one for the production fix. Out-of-scope bugs are escalated with file and line references rather than silently backlogged.

Which test frameworks and stacks does batch test repair support?

It targets Jest-style test suites in TypeScript and JavaScript, with dedicated patterns for Redux slices, React Testing Library, NestJS controllers and services, and E2E tests. Stack-specific CodeSift tools extend support to Python, PHP, and Kotlin projects.