Skip to content
Back to skills

Test Gap Detector

ASecurity

Identify which areas of a proposed change are weakly covered by tests and suggest the minimum high-value tests to add first.

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 9, 2026
ai-agentstypescriptgoapi

Works with

  • api

Security analysis

A100/100

Scanned October 9, 2026

npx -y skills add alisattorov06/ali-kiro --skill test-gap-detector --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Test Gap Detector?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Test Gap Detector
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/alisattorov06-test-gap-detector/badge)](https://www.skillsdirectory.com/skills/alisattorov06-test-gap-detector)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: test-gap-detector
description: Identify which areas of a proposed change are weakly covered by tests and suggest the minimum high-value tests to add first.
origin: FlowDeck
---

# Test Gap Detector

Activate this skill before implementing a feature or fix. Get back a ranked list of coverage gaps and the minimum viable tests to close them.

## Gap Categories

| Category | What It Means |
|----------|--------------|
| missing test file | Source file changed but no `*.test.*` counterpart exists |
| untested error path | A `catch`, `else`, or error branch has no test |
| untested branch | An `if/else` or `switch` arm has no test exercising it |
| no integration test | A service-to-service or API call has no integration test |
| no regression test | A previously-failed path has no regression test guarding it |

## Workflow

1. List all files to be changed
2. For each file, check if a test file exists (`*.test.ts`, `*.spec.ts`, `__tests__/`)
3. For files with tests, scan for untested branches:
   - Count `if`, `else`, `catch`, `switch` statements
   - Cross-reference with test file to see which paths are exercised
4. Check `~/.fd-plan/<slug>/.codebase/FAILURES.json` for prior failures on these paths — flag as regression gap if no regression test exists
5. For external calls (fetch, db.query, sendEmail), check for integration test coverage
6. Rank gaps by risk (auth > payment > data > logic > UI)
7. Produce minimum viable test set (top 3–5 tests)

## Output Format

```markdown
## Test Gap Report

### Gap Summary
| File | Gap Type | Risk | Suggested Test |
|------|----------|------|----------------|

### Minimum Viable Test Set (top 5)
1. **[test name]** — [file.test.ts]
   Tests: [what it validates]
   ```typescript
   it('[test name]', async () => {
     // test skeleton
   })
   ```

### Coverage Verdict: GOOD | GAPS FOUND | CRITICAL GAPS
```

## Guidance

- A test skeleton is always better than no test — write it even if incomplete
- Auth and payment paths with no regression test = CRITICAL GAP, block merge
- Do not add tests just to hit a coverage number — add tests for real risk paths

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.