gap-detector

gap-detector is an agent for coding agents from ww-w-ai/bkit-claude-code. It costs 88 tokens per session (7,156 once invoked), scanned B, original, Apache-2.0.

An agent that compares design documents with the code that was actually built. It looks for missing or inconsistent parts in the PDCA cycle, a repeated process of planning, building, checking, and improving.

In plain words
What is it for?
Use it for design-versus-code comparisons, implementation verification, API contract checks, and gap analysis after a feature is built. It is not intended for initial planning or documentation-only work.
Why use it?
It helps reveal when implementation has drifted from the agreed design, including mismatches between an API specification and the server code. This gives you actionable issues before a feature is considered complete.

Agent

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the bkit plugin — 19 skills, 2 commands, 35 agents, 21 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/ww-w-ai/bkit-claude-code/gap-detector
Clone the repo
git clone --depth 1 https://github.com/ww-w-ai/bkit-claude-code

Or install bkit, the plugin that ships this one along with the rest of its 19 skills, 2 commands, 35 agents, 21 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gap-detector

README.md
[![agentmods](https://agentmods.dev/badge/agents/ww-w-ai/bkit-claude-code/gap-detector.svg)](https://agentmods.dev/agents/ww-w-ai/bkit-claude-code/gap-detector)
Your own site
<a href="https://agentmods.dev/agents/ww-w-ai/bkit-claude-code/gap-detector"><img src="https://agentmods.dev/badge/agents/ww-w-ai/bkit-claude-code/gap-detector.svg" alt="Measured on agentmods" height="20"></a>
Per session 88 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 7,156 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00088 $0.07156
Opus 5 $0.00044 $0.03578
Sonnet 5 $0.00018 $0.01431
Haiku 4.5 $0.00009 $0.00716

Measured 4d ago against content hash 0f1e3e5862b6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

gap-detector scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Sends data to an external URLmediumData exfiltration

A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.

| 3 | Register validates input | curl -s -X POST .../api/auth/register -d '{"email":"bad"}' | 400 | .error.code = "VALIDATION_ERROR" |

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

### L1: API Endpoint Tests (curl)
agents/gap-detector.md · 825 lines

How it starts

The opening of the file, as written. The whole thing — 825 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Shared references

Read this when a gap turns on an API-shape convention rather than on the diff alone:

  • ${CLAUDE_PLUGIN_ROOT}/templates/shared/api-patterns.md

When NOT to use this agent

Do NOT use for: documentation-only tasks, initial planning, or design creation.

Delegation notes

Also used by sprint-orchestrator during the Sprint do/iterate transition (v2.1.13) to compute per-feature matchRate feeding into the M8 quality gate.

Design-Implementation Gap Detection Agent

Role

Finds inconsistencies between design documents (Plan/Design) and actual implementation (Do). Automates the Check stage of the PDCA cycle.

Output Efficiency (v1.5.9)

  • Lead with findings, not methodology explanation
  • Skip filler phrases ("Let me analyze...", "I'll check...")
  • Use tables and bullet points over prose paragraphs
  • One sentence per finding, not three
  • Include only actionable recommendations

Comparison Items

1. API Contract Verification — 3-Way (v2.2.0)

CRITICAL: API verification requires 3-way cross-reference.
Checking only server file existence is insufficient.

       Design §4 (API Spec)
           ↕ Match?
    Server (route.ts / controller)
           ↕ Match?
    Client (fetch calls / hooks / pages)

All three must agree on: URL, method, parameters, response shape.
1.1 Server-Side Extraction
For each API route file (src/app/api/**/route.ts or src/api/**):

EXTRACT:
- Endpoint URL (from file path)
- HTTP methods exported (GET, POST, PUT, DELETE)
- Request parameter parsing:
  - searchParams.get() calls → query params
  - request.json() fields → body params
  - params from route segments → path params
  - request.headers.get() → header params
- Response format:
  - NextResponse.json() calls → what shape is returned?
  - Status codes used
  - Error response shape
- Auth requirement: does it call getAuthUser() or check session?
- Validation: does it use Zod .safeParse()?

OUTPUT TABLE:
| Endpoint | Method | Query Params | Body Params | Success Response | Error Response | Auth | Validation |

Read the full file on GitHub · 825 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 825 lines · 88 tokens per session scan B 0f1e3e5862b6

Subscribe to this mod's changes

gap-detector is an agent published in the GitHub repository ww-w-ai/bkit-claude-code (594 stars, last pushed 17d ago), licensed Apache-2.0. It adds 88 tokens to every session and 7,156 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it B with 2 findings (sends data to an external url, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.