- Home
- Skills
- Code Quality & Review
- Test Gap Hunter
Works with the AI tools you already use
Test Gap Hunter
Identify untested code and high-risk gaps via static analysis of source symbols and test references.
$9.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.
How to use
Skills on Agensi run inside your AI agent. Copy the prompt, paste it into your agent, and it connects to Agensi and installs this skill for you. If a payment is needed, your agent shows it to you first.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
30-day refund
Not a fit? Get your money back
Trust & safety
Security scanned
Verified clean today
- Passed all security checks, Safe to install