- Home
- Skills
- Testing & Debugging
- Test Gap Filler: Find Untested Code & Write Real Tests
Works with the AI Agents you already use
Test Gap Filler: Find Untested Code & Write Real Tests
Asking an agent to "write tests" usually gets you shallow happy-path tests, a new framework you did not want, or tests quietly rewritten until they pass.
Free
Test Gap Filler: Find Untested Code & Write Real Tests
Example session with this skill installed
Write unit tests for src/orders/ — coverage there is low. Follow our existing test style.
- Read your context and instructions
- Compiled the test gap filler
Summary
Detected
Vitest with colocated *.test.ts files, factories in test/factories and msw for HTTP mocks. Coverage for src/orders/ was
61%; I found 11 untested cases across 3 functions, wrote 14 tests and ran them.
Gap list (approved plan)
| Function | Missing cases |
|---|---|
parseOrder | empty payload, invalid date, negative quantity |
calcShipping | zero weight, max weight boundary, international zone |
syncInventory | API timeout, partial failure, retry after 429 |
Example test
it.each([
[{ qty: -1 }, "quantity must be positive"],
[{ date: "2026-13-01" }, "invalid date"],
])("parseOrder rejects %o", (input, msg) => {
expect(() => parseOrder(orderFactory(input))).toThrow(msg)
})
Results
✓ src/orders/parse.test.ts (6)
✓ src/orders/shipping.test.ts (5)
✗ src/orders/inventory.test.ts (3) — 1 expected fail
Coverage src/orders: 61% → 84%
Mutation check: flipping the weight limit in calcShipping makes 2 new tests fail ✅
🐞 Probable bug found
syncInventory sets stock to 0 for
all items when 1 of N API calls fails (src/orders/inventory.ts:57). Test marked it.fails with a comment; source not modified.
Run: npx vitest run src/orders
Next step: want me to fix the inventory bug and flip the test to passing?
Connects securely to your tools. The creator never sees your data.
About this skill
Asking an agent to "write tests" usually gets you shallow happy-path tests, a new framework you did not want, or tests quietly rewritten until they pass. This skill does it properly: find the real gaps, test them in your style, prove the tests work.
What it does
- Detects your setup: Jest, Vitest, pytest, go test, cargo and more, plus test location, naming, fixtures/factories, mocking style and assertion library, copied from your existing tests. Never introduces a new framework.
- Finds the gaps: uses your coverage tooling when available (uncovered lines), otherwise enumerates every branch, error path, boundary (empty, null, zero, max, unicode) and async failure.
- Shows the plan first: a short gap list (function → missing cases) before writing anything.
- Writes meaningful tests: one behavior per test, descriptive names, Arrange/Act/Assert, table-driven cases, mocks only at boundaries (network, clock, filesystem, randomness), fully deterministic.
- Runs until green, honestly: if a test fails because the code is wrong, it does not silently change your source. It marks the test expected-fail and reports a probable bug.
- Mutation sanity check: temporarily breaks the code for key tests to prove they actually fail, then reverts.
Output
Tests added per file, coverage before → after, cases per function, probable bugs found and the exact command to run them.
Best for
- Raising coverage on legacy modules
- Testing a feature branch before review
- Finding hidden bugs in edge cases
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Testing & Debugging.
- Focused on unit tests; end-to-end and UI tests are out of scope.
- Coverage numbers require coverage tooling already configured (e.g. c8/istanbul, pytest-cov); otherwise gaps are found by reading the code.
- Code with heavy hidden global state may need small refactors to be testable; it will suggest them rather than apply them.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
This skill has been used 19 times.
Trust & safety
Security scan
Security scan passed 11 days ago
- Free with an Agensi account
- Software
- Project test frameworkProject runtimevitest
Node.jsjest
- Optional
Git
For example Node.js with Vitest or Jest, or Python with pytest. Git scopes tests to the current diff.
Permissions
Read Files: reads source, existing tests and test config. Terminal: runs your test suite and coverage tooling. Write Files: creates or edits test files only; source code is never modified unless you ask. No network calls or external services.