Test backfill

From OnlyTerp/windsurf-unlocked · View interactive version

Test backfill is an AI agent skill from the GitHub repository OnlyTerp/windsurf-unlocked. Fill test coverage gaps to hit the project's target (AGENTS.md says ≥80% on src/). Reads existing tests to match style, prioritizes public-API and error paths, runs the suite after every batch.

How to use this skill

Skill file

Test Backfill

Raise coverage without shipping bad tests.

Process

  1. Read existing tests. Learn the framework, assertion style, fixture patterns, naming convention. Never introduce a second style.
  2. Run coverage. Capture the report. Identify the gaps.
  3. Prioritize, in order:
  1. Write tests in batches of 5–10. Run the suite after each batch.
  2. If a batch fails, stop and investigate before writing more.
  3. Every new function gets at least one failure-path test.
  4. Hand off coverage numbers at the end: "coverage now X%, was Y%, Δ = +Z pp".

Quality Bar

A good test:

A bad test:

Anti-Patterns to Kill

Never

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.