Fix and test
This skill should be used when the user asks to 'fix the tests', 'make tests pass', 'tests are failing', 'fix and test', 'green the tests', or wants to iteratively fix failing tests until they pass.From its SKILL.md
npx -y skills add 45ck/prompt-language --skill fix-and-testAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
1.7 KB, as published. Nobody here has run it
Fix and Test
Run a fix-test loop: identify failing tests, fix them, re-run tests, repeat until green.
Use this when the codebase is already in a failing state and the goal is recovery.
Do not use this for greenfield feature delivery (use tdd) or structural cleanup of already-green code (use refactor).
What to do
- If the user provided an argument, use it as the test command (for example
npm test -- auth). Otherwise usenpm test. - Run the command and triage existing failures.
- Fix production code first; only edit tests when they are demonstrably wrong.
- Re-run the same command and iterate until green (max 5 passes).
- Once scoped tests are green, run full
npm testbefore declaring done.
Flow
flow:
retry max 5
run: npm test
if command_failed
prompt: Analyze the test failures above and fix the underlying code. Do not modify tests unless they are genuinely wrong.
end
end
done when:
tests_pass
Rules
- Focus on fixing the source code, not the tests, unless the tests themselves are incorrect.
- During active triage you may run a scoped test command, but finish with the full suite.
- If you cannot fix a test after 5 attempts, explain what you tried and why it's failing.
Examples
For ecosystem-specific command patterns, see examples/multi-ecosystem.md.