defprod-fix-test-failures

Implements fixes for failed and flaky tests from a test check report.

Updated Apr 4, 2026
One-click install
npx skills add https://github.com/defprod1/defprod-skills --skill defprod-fix-test-failures-defprod1
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: defprod-fix-test-failures
Source: https://github.com/defprod1/defprod-skills/tree/main/skills/defprod-fix-test-failures
Command: npx skills add https://github.com/defprod1/defprod-skills --skill defprod-fix-test-failures-defprod1

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? After running an area's test suite, teams face a report full of failed and flaky tests that each need diagnosis and manual fixing. This Skill reads the test check report and systematically implements the recommended fix for each failure, applying test code fixes for test faults and production code fixes for production faults. ## Core Features & Use Cases - Report-driven fixing: Parses the test check report generated by the test runner skill and processes every classified test fault and production fault. - Layer-correct fixes: Fixes test faults in test code (selectors, timing, assertions, setup) and production faults in production code, validated against user story acceptance criteria via the DefProd MCP server. - Verification loop: Runs each fixed test individually, re-runs the full area suite to catch regressions, and performs a final compilation check before reporting results. - Use Case: After /defprod-run-area-tests flags 8 failures in the BILLING area, invoke this Skill to fix each one, re-run the suite, and append a "Fixes Applied" section to the report. ## Quick Start Ask the agent to fix the test failures for the BILLING area using the existing test check report.

Frequently Asked Questions about defprod-fix-test-failures

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

FAQPage Schema
How do I fix failing e2e tests automatically?

Run the area test suite first to generate a test check report, then invoke this Skill with the area key. It reads the report, applies the recommended fix for each failure, and verifies each fix by re-running the individual test.

How to fix flaky tests caused by timing issues?

Replace arbitrary waits with framework-provided waiting mechanisms such as auto-waiting locators or explicit conditions. The Skill classifies these as test faults and updates the test code without touching production code.

Should I fix a failing test by changing the test or the production code?

It depends on the fault classification: test faults are fixed in test code only, while production faults are fixed in production code. When the test and the user story disagree, the acceptance criteria in the user story are the source of truth.

What happens if no test check report exists?

The Skill looks for the report in the configured e2e directory and notifies you if none is found, suggesting you run the area test suite first. It cannot proceed without a report to parse.

Does it verify fixes don't break other tests?

Yes. After fixing each item individually, it re-runs the entire area test suite to catch regressions or interactions between fixes, and runs a final compilation check if production code was changed.