- Home
- Skills
- Code Quality & Review
- Test Gap Hunter
Works with the AI Agents you already use
Test Gap Hunter
Identify untested code and high-risk gaps via static analysis of source symbols and test references.
$2.99
Test Gap Hunter
Example session with this skill installed
Analyze the gap between src/auth and tests/auth in this TypeScript repo. Rank the top gaps by risk and git churn.
- Read your context and instructions
- Compiled the test gap hunter
I have analyzed the src/auth module and compared it against tests/auth. The analysis identified 4 public exports with no test references and ranked them based on a high churn rate in the git history.
Test Gap Analysis: src/auth
| Symbol | Location | Risk Score | Churn (30d) | Status |
|---|---|---|---|---|
validateMfaToken | src/auth/mfa.ts | 8.4 | 12 commits | Critical Gap |
refreshSession | src/auth/session.ts | 6.2 | 8 commits | Missing Test |
parseJwtMetadata | src/auth/utils.ts | 4.1 | 2 commits | Untested |
auditLogFailedLogin | src/auth/logger.ts | 2.5 | 1 commit | Untested |
Detailed Findings
High Risk: validateMfaToken in mfa.ts has a high cyclomatic complexity (12) and has been modified frequently this month, yet no references were found in tests/auth/mfa.test.ts.
Orphaned Symbols: refreshSession is a public export used by the frontend but is completely absent from the current test suite.
Coverage Estimate: Based on static mapping, approximately 65% of the public API in the auth module is covered by reference-based tests.
Next steps
- Generate a test scaffold for
validateMfaTokento cover edge cases in the MFA logic. - Verify if
refreshSessionis covered by an integration test in a different directory. - Add a unit test for
parseJwtMetadatato ensure claims are handled correctly.
Connects securely to your tools. The creator never sees your data.
About this skill
Codebases often lack clear visibility into test coverage without the overhead of instrumenting code or running slow CI pipelines. This skill identifies untested code by mapping source files to test files using naming conventions, imports, and symbol references.
What it does
- Source mapping maps functions and classes to corresponding test files across Python, JavaScript, TypeScript, Go, Java, and Ruby.
- Symbol tracking identifies public symbols and exported functions that have zero references in the test suite.
- Risk ranking prioritizes gaps by evaluating cyclomatic complexity and git change frequency.
- Orphan detection lists modules that completely lack a corresponding test file or folder.
How it works
- Source Scan analyzes the
srcdirectory to catalog public APIs and complex logic blocks. - Test Analysis scans the
testsdirectory to trace references back to the source code. - Gap Identification flags symbols found in source but missing from the test trace.
- Prioritization applies risk weights based on git churn and complexity to rank the top 20 most critical gaps.
Frameworks & tools
This skill utilizes AST parsing for Python and heuristic pattern matching for JavaScript, TypeScript, Go, Java, and Ruby. It integrates with git to extract churn data for risk scoring.
Why this beats prompting it yourself
Generic prompts often miss cross-file references or fail to account for co-located test patterns. This skill uses specific logic to bridge source symbols and test files, ensuring high-risk logic is caught even when naming conventions vary.
Use cases
- Legacy code audits to map out testing debt in inherited repositories.
- Test planning for new features by identifying which public exports are currently exposed.
- PR reviews to verify that new complex functions have corresponding test references.
Known limitations
This is a static analysis tool; a symbol being referenced in a test does not guarantee a functional assertion exists. Accuracy for non-Python languages relies on heuristics.
Static analysis only; cannot verify if assertions are meaningful. Non-Python language support relies on naming heuristics rather than full AST resolution.
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
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 1 month ago