
fix-tests
Systematically fix all failing tests after business logic changes or refactoring
- Installs
- 1.2K
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/neolabhq/context-engineering-kit --skill fix-tests- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads fix-tests automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Fix Tests
User Arguments
User can provide to focus on specific tests or modules:
$ARGUMENTS
If nothing is provided, focus on all tests.
Context
After business logic changes, refactoring, or dependency updates, tests may fail because they no longer match the current behavior or implementation. This command orchestrates automated fixing of all failing tests using specialized agents.
Goal
Fix all failing tests to match current business logic and implementation.
Important Constraints
- Focus on fixing tests - avoid changing business logic unless absolutely necessary
- Preserve test intent - ensure tests still validate the expected behavior
- "Analyse complexity of changes" -
- if there 2 or more changed files, or one file with complex logic, then Do not write tests yourself - only orchestrate agents!
- if there is only one changed file, and it's a simple change, then you can write tests yourself.
Workflow Steps
Preparation
-
Read sadd skill if available
- If available, read the sadd skill to understand best practices for managing agents
-
Discover test infrastructure
- Read @README.md and package.json (or equivalent project config)
- Identify commands to run tests and coverage reports
- Understand project structure and testing conventions
-
Run all tests
- Execute full test suite to establish baseline
-
Identify all failing test files
- Parse test output to get list of failing test files
- Group by file for parallel agent execution
Analysis
- Verify single test execution
- Choose any test file
- Launch haiku agent with instructions to find proper command to run this only test file
- Ask him to iterate until you can reliably run individual tests
- After he complete try running a specific test file if it exists
- This ensures agents can run tests in isolation
Test Fixing
-
Launch
developeragents (parallel)- Launch one agent per failing test file
- Provide each agent with clear instructions:
- Context: Why this test needs fixing (business logic changed)
- Target: Which specific file to fix
- Guidance: Read TDD skill (if available) for best practices how to write tests.
- Resources: Read README and relevant documentation
- Command: How to run this specific test file
- Goal: Iterate until test passes
- Constraint: Fix test, not business logic (unless clearly broken)
-
Verify all fixes
- After all agents complete, run full test suite again
- Verify all tests pass
-
Iterate if needed
- If any tests still fail: Return to step 5
- Launch new agents only for remaining failures
- Continue until 100% pass rate
Success Criteria
- All tests pass ✅
- Test coverage maintained
- Test intent preserved
- Business logic unchanged (unless bugs found)
Agent Instructions Template
When launching agents, use this template:
The business logic has changed and test file {FILE_PATH} is now failing.
Your task:
1. Read the test file and understand what it's testing
2. Read TDD skill (if available) for best practices on writing tests.
3. Read @README.md for project context
4. Run the test: {TEST_COMMAND}
5. Analyze the failure - is it:
- Test expectations outdated? → Fix test assertions
- Test setup broken? → Fix test setup/mocks
- Business logic bug? → Fix logic (rare case)
6. Fix the test and verify it passes
7. Iterate until test passes
FAQ
What does the fix-tests skill do?
Systematically fix all failing tests after business logic changes or refactoring
How do I install fix-tests?
Run npx skills add https://github.com/neolabhq/context-engineering-kit --skill fix-tests in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/fix-tests/ (personal) or .claude/skills/fix-tests/ (project).
Which AI agents can use fix-tests?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is fix-tests safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains fix-tests?
It is published by neolabhq in neolabhq/context-engineering-kit. It has 1,211 recorded installs.
More from neolabhq/context-engineering-kit
prompt-engineering
neolabhq/context-engineering-kit
Use this skill when you writing commands, hooks, skills for Agent, or prompts for sub agents or any other LLM interaction, including optimizing prompts, improving LLM outputs, or designing production prompt templates.
thought-based-reasoning
neolabhq/context-engineering-kit
Use when tackling complex reasoning tasks requiring step-by-step logic, multi-step arithmetic, commonsense reasoning, symbolic manipulation, or problems where simple prompting fails - provides comprehensive guide to Chain-of-Thought and related prompting techniques (Zero-shot CoT, Self-Consistency, Tree of Thoughts, Least-to-Most, ReAct, PAL, Reflexion) with templates, decision matrices, and research-backed patterns
context-engineering
neolabhq/context-engineering-kit
Understand the components, mechanics, and constraints of context in agent systems. Use when writing, editing, or optimizing commands, skills, or sub-agents prompts.
reflect
neolabhq/context-engineering-kit
Reflect on previus response and output, based on Self-refinement framework for iterative improvement with complexity triage and verification
write-concisely
neolabhq/context-engineering-kit
Apply writing rules to any documentation that humans will read. Makes your writing clearer, stronger, and more professional.
kaizen
neolabhq/context-engineering-kit
Use when Code implementation and refactoring, architecturing or designing systems, process and workflow improvements, error handling and validation. Provide tehniquest to avoid over-engineering and apply iterative improvements.
Popular testing & qa skills
tdd
mattpocock/skills
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
grilling
mattpocock/skills
Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.
migrate-to-shoehorn
mattpocock/skills
Migrate test files from as type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace as in tests, or needs partial test data.
run-train
lllllllama/rigorpilot-skills
Rigor Train skill for deep learning research repositories. Use when a documented or selected training command should be run conservatively for startup verification, short-run verification, full kickoff, or resume, with command, config, seed, log, checkpoint, status, and metric evidence written to standardized trainoutputs/. Do not use for environment setup, exploratory sweeps, speculative idea implementation, or end-to-end orchestration.
test-driven-development
obra/superpowers
Use when implementing any feature or bugfix, before writing implementation code
finishing-a-development-branch
obra/superpowers
Use when implementation is complete, all tests pass, and you need to decide how to integrate the work