跳到主要内容
知仓学习社ZHICANG

fix-tests

Systematically fix all failing tests after business logic changes or refactoring

不碰外部(只输出文字)无严重或高危命中NeoLabHQ/context-engineering-kit

它会碰到什么

扫了多少1 个文本文件,4 KB
它会碰到什么不碰外部(只输出文字)
命中总数0 处
命中统计严重 0 · 高 0 · 中 0 · 低 0

这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。

技能内容

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

  1. Read sadd skill if available
  • If available, read the sadd skill to understand best practices for managing agents
  1. 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
  1. Run all tests
  • Execute full test suite to establish baseline
  1. Identify all failing test files
  • Parse test output to get list of failing test files
  • Group by file for parallel agent execution

Analysis

  1. 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

  1. Launch developer agents (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)
  1. Verify all fixes
  • After all agents complete, run full test suite again
  • Verify all tests pass
  1. 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

想直接用这个技能?

本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。

它属于哪个仓库

星标★ 1,702
本站分层T1
该仓技能数204
原文件路径plugins/tdd/skills/fix-tests/SKILL.md

同一个仓库里的其他技能

看这个仓库的全部 204 个技能

同名技能的其他版本

有 3 个不同仓库或目录里都有叫 fix-tests 的技能。它们内容并不相同,别混用: