- Home
- Skills
- Testing & Debugging
- Test Gap Map — Find Changed Code With No Test
More screenshots
Works with the AI Agents you already use
Test Gap Map — Find Changed Code With No Test
Reads a diff and maps every source file to the test file that should move with it, naming the changed code that no test in the repository covers by name.
Free
Test Gap Map — Find Changed Code With No Test
Example session with this skill installed
git diff main...HEAD > change.diff
python3 scripts/test_gap.py change.diff --repo . --fail-on high
diff --git a/src/billing/refund.ts b/src/billing/refund.ts
--- a/src/billing/refund.ts
+++ b/src/billing/refund.ts
@@ -1,3 +1,27 @@
- audit('refund', invoice.id);
- if (amount > invoice.captured) throw new Error('over refund');
- Read your context and instructions
- Compiled the test gap map
test-gap-map 12 changed files repo .
score 7/100 grade F findings 7
high 4 medium 3 low 0
SOURCE → TEST
src/auth/session.ts src/auth/session.test.ts test changed
src/search/rank.ts - no test
src/search/index.ts tests/search/index.test.ts test untouched
src/billing/refund.ts - no test
src/utils/legacy.ts - no test
src/api/routes.test.ts - deleted
HIGH G1 src/utils/legacy.ts
New source file with no test file found.
HIGH G2 src/billing/refund.ts
No test file found for this source (24 changed lines).
HIGH G4 src/api/routes.test.ts
Test file deleted.
Scope: test-file mapping from the diff and repo. Not line coverage.
Connects securely to your tools. The creator never sees your data.
About this skill
A green suite is not the same as "this diff was tested". The changed file may have no test at all, its test may live under a name nobody maps, or a deleted test may have removed the only check on a branch. Coverage tools run the suite; they do not answer which changed file has no test moving with it.
This maps the diff against the checkout and reports:
- New source files with no test file found
- Modified source files with no matching test in the repository
- Test files that exist but did not change with the source
- Test files deleted in the diff
- Tests changed with no matching source, an orphan or a shared test
- Changed and mapped tests with no assertion-looking call
- A source-to-test table so the reviewer can see the mapping, not just a score
It recognises common Python naming such as test_foo.py and foo_test.py, and JavaScript/TypeScript patterns such as foo.test.ts, foo.spec.tsx and tests directories. It skips dependencies, build output and virtualenvs.
The shipped demo has 12 changed files and 7 findings: four high, three medium. A new utility has no test, a ranking file has no test, a billing file has no test, and a routes test was deleted. Three more files have tests that did not move. Score 7/100, exit 1. The clean diff changes three sources and all three tests, and scores 100.
Good to know: this is test-file mapping, not line or branch coverage. A matching test name does not prove the changed branch ran, and a missing name does not prove the code is untested. The assertion check is a simple scan for common calls, so a custom assertion helper can be flagged. It only sees the checkout and diff you give it. It makes no claim about mutation score or test quality.
Filename mapping only, not line coverage. Skips docs and config. Simple assertion detection may flag custom helpers. Requires Python 3.10+.
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 any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free forever
No account required to browse
Trust & safety
Security scan
Security scan passed 1 day ago
- Free with an Agensi account
Requires