# Test gap audit

> Test gap audit is an open-source agent skill for developer tools. Audits a codebase or change for missing, weak or stale test coverage without editing code. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/github/awesome-copilot/tree/main/skills/test-gap-audit
- **Repository:** https://github.com/github/awesome-copilot
- **GitHub stars:** 41,707
- **License:** MIT
- **Skill name:** test-gap-audit
- **Collection:** https://github.com/github/awesome-copilot
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-30

## About

Test Gap Audit reviews whether the behavior of a repository is actually protected by tests. Without a named scope it inventories the whole repo, ranks risky surfaces such as routes, services, workflows and contracts, and inspects the highest-risk ones; with a scope such as a feature, PR, branch, route or bug fix, it limits the review to that area and its directly connected code paths. The skill stays read-only unless the user explicitly asks for tests to be written.

The workflow has the agent map the repo's test runners, CI checks, naming and fixture conventions, then match source areas to the tests that exercise them. It looks for untested paths, assertions that prove little, mocks that hide the behavior under test, and missing negative, permission or regression cases. Findings are graded from P0 to P3 and each gap is tied to a file and line, with suggested test names and the smallest test level that would prove the behavior.

It bundles a Python script, coverage_map.py, that heuristically matches source files to tests by name, path and imports and ranks unmatched files by risk keywords. The script is treated as a lead to confirm by grepping, not as proof. The skill expects a repository to audit, shell and search access, and a Python interpreter for the script; it runs tests only when they are quick and follow repo conventions.

## When your agent uses it

> Run a read-only audit for missing, weak, stale, or mis-scoped test coverage. If the user does not name a scope, audit the full repository and identify important code paths, routes, features, services, workflows, and contracts that lack proper tests. If the user names a feature, PR, branch, route, workflow, service, bug fix, API, security-sensitive path, or risky code change, focus only on that specific scope. Use when the user asks what tests are missing, whether coverage is enough, what regression tests to add, or how to prove a change is safe. This is not a general bug audit and not a security review; it evaluates whether behavior is covered by tests.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Runs Python scripts](https://github.com/github/awesome-copilot/tree/HEAD/skills/test-gap-audit)
- [No network calls found in its scripts](https://github.com/github/awesome-copilot/tree/HEAD/skills/test-gap-audit)
- [License: MIT](https://github.com/github/awesome-copilot/tree/HEAD/skills/test-gap-audit)

## Features

- **Full-repository gap inventory:** Maps major surfaces such as routes, services, jobs and packages and lists those with no or weak tests.
- **Scoped audits:** Limits review to a named feature, PR, branch, route, API or bug fix and its direct dependencies.
- **Risk-ranked findings:** Grades each gap from P0 to P3 using data loss, security, billing and outage risk criteria.
- **Coverage matching script:** Bundled Python script matches source files to tests by name, path and imports, ranking unmatched files.
- **Behavior over percentages:** Judges whether tests prove important behavior rather than relying on line or branch coverage numbers.
- **Concrete test recommendations:** Proposes specific test names, levels and assertions, favoring lower-level tests over slow end-to-end ones.

## Good for

- Find which routes or services in this repo lack tests
- Check whether a pull request has enough regression tests
- Suggest tests that prove a bug fix stays fixed
- Review auth and permission tests around an API
- Decide whether current coverage is enough before a release

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/test-gap-audit` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/github/awesome-copilot.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/test-gap-audit &&
cp -R "$tmp/skills/test-gap-audit" ~/.claude/skills/test-gap-audit &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/test-gap-audit` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/test-gap-audit` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/github/awesome-copilot.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/test-gap-audit &&
cp -R "$tmp/skills/test-gap-audit" ~/.agents/skills/test-gap-audit &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/test-gap-audit` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/test-gap-audit` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/github/awesome-copilot.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/test-gap-audit &&
cp -R "$tmp/skills/test-gap-audit" ~/.cursor/skills/test-gap-audit &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/test-gap-audit` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/github/awesome-copilot.git --path skills/test-gap-audit
```

Or copy the folder to `~/.gemini/skills/test-gap-audit` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/test-gap-audit`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/github/awesome-copilot.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/test-gap-audit &&
cp -R "$tmp/skills/test-gap-audit" ~/.copilot/skills/test-gap-audit &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/test-gap-audit` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/github/awesome-copilot.git
```

Then copy `awesome-copilot/skills/test-gap-audit` into your agent's skills folder as `test-gap-audit`. Agents that support SKILL.md read one folder per skill.

## FAQ

### Does Test gap audit change any code?

No. It stays read-only unless the user explicitly asks it to add tests.

### What happens if I don't name a scope?

It audits the full repository, inventories major surfaces and deep-inspects the highest-risk ones, listing the rest as not yet inspected.

### Is Test gap audit a security review or a general bug audit?

Neither. The skill only evaluates whether behavior is covered by tests.

### What does the bundled script do?

coverage_map.py detects the test framework and naming convention, matches source files to tests, and returns unmatched files ranked by risk keywords.

### How do I install Test gap audit in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/test-gap-audit to use it in all your projects, or to .claude/skills/test-gap-audit in one project.

### Does Test gap audit run scripts?

Yes. It runs Python scripts. No network calls were found in its scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Test gap audit?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Test gap audit?

The closest alternatives to Test gap audit are Rea ci tests audit, Security audit, Quality playbook, Review and Code review expert.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Rea ci tests audit](https://ai-powered.com/skills/rea-ci-tests-audit): Rea ci tests audit is an open-source agent skill for developer tools.
- [Security audit](https://ai-powered.com/skills/security-audit): Security audit is an open-source agent skill for security.
- [Quality playbook](https://ai-powered.com/skills/quality-playbook): Quality playbook is an open-source agent skill for developer tools.
- [Review](https://ai-powered.com/skills/review-arjunrajlaboratory): Review is an open-source agent skill for developer tools.
- [Code review expert](https://ai-powered.com/skills/code-review-expert): Code review expert is an open-source agent skill for developer tools.
- [Project review](https://ai-powered.com/skills/project-review): Project review is an open-source agent skill for developer tools.
- [Repo recon](https://ai-powered.com/skills/repo-recon): Repo recon is an open-source agent skill for developer tools.
- [Find bugs](https://ai-powered.com/skills/find-bugs): Find bugs is an open-source agent skill for security.

---
Source: https://ai-powered.com/skills/test-gap-audit
