# Test Gap Hunter

> Identify untested code and high-risk gaps via static analysis of source symbols and test references.

Test Gap Hunter is a paid AI agent skill on Agensi by aingram702, in Code Quality & Review. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $2.99 (one-time purchase)
- Creator: [aingram702](https://www.agensi.io/creators/aingram702)
- Category: [Code Quality & Review](https://www.agensi.io/skills/code-quality-review)
- Version: 1.0
- Last updated: 2026-10-12
- Security: scan passed (2026-10-12); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/test-gap-hunter
- Tags: testing, code-review, api, typescript, python, static-analysis

## 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
1. **Source Scan** analyzes the `src` directory to catalog public APIs and complex logic blocks.
2. **Test Analysis** scans the `tests` directory to trace references back to the source code.
3. **Gap Identification** flags symbols found in source but missing from the test trace.
4. **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 this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Test Gap Hunter skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### How does this skill differ from standard code coverage tools?

This skill uses static analysis to map source code symbols to test references without requiring you to run slow, instrumented coverage pipelines. It solves the 'blind spot' problem by identifying high-complexity code that lacks any corresponding test presence.

### Which programming languages and frameworks are supported?

The skill supports Python, JavaScript, TypeScript, Go, Java, and Ruby. While it uses deep AST parsing for Python, it employs sophisticated heuristic pattern matching for other languages to identify relationships between source and test files.

### Can it prioritize which gaps I should fix first?

Yes, the skill integrates with Git to analyze change frequency (churn). It combines this data with cyclomatic complexity scores to rank gaps, ensuring you prioritize testing code that is both complex and frequently modified.

### Will this skill tell me if my existing tests are actually effective?

Since it uses static analysis (symbol tracking), a test might reference a function without actually asserting its behavior. The skill identifies if a link exists, but it does not evaluate the quality or logic of the assertions within those tests.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
