gap-analysis

gap-analysis is a skill for Claude Code from testdouble/han. It costs 91 tokens per session (7,471 once invoked), scanned A, original, MIT.

A comparison skill that examines the difference between a current artifact and a desired one, then records each gap in a plain-language report.

In plain words
What is it for?
Use it to compare documents, plans, implementations, or other project artifacts during audits and reconciliation.
Why use it?
It makes missing, conflicting, or incomplete parts easier to identify and discuss.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the han-research plugin — 3 skills, 1 agent shipped together

Good fit Use it to compare documents, plans, implementations, or other project artifacts during audits and reconciliation.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add testdouble/han
Claude Code
/plugin install han-research

Made for: Claude Code.

Or install han-research, the plugin that ships this one along with the rest of its 3 skills, 1 agent.

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-analysis

README.md
[![agentmods](https://agentmods.dev/badge/skills/testdouble/han/gap-analysis/github.svg)](https://agentmods.dev/skills/testdouble/han/gap-analysis)
Your own site
<a href="https://agentmods.dev/skills/testdouble/han/gap-analysis"><img src="https://agentmods.dev/badge/skills/testdouble/han/gap-analysis/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for gap-analysis

Your own site · 80×15
<a href="https://agentmods.dev/skills/testdouble/han/gap-analysis"><img src="https://agentmods.dev/badge/skills/testdouble/han/gap-analysis.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 91 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,471 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00091 $0.07471
Opus 5.5 $0.00036 $0.02988
Sonnet 5.5 $0.00018 $0.01494
Haiku 4.5 $0.00009 $0.00747

Measured 1mo ago against content hash 9801f3030a24, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

gap-analysis scanned grade A with 0 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 1mo 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

han-research/skills/gap-analysis/SKILL.md · 422 lines

How it starts

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

Project Context

  • CLAUDE.md: !find . -maxdepth 1 -name "CLAUDE.md" -type f
  • project-discovery.md: !find . -maxdepth 3 -name "project-discovery.md" -type f
  • personal config directory: !bash "${CLAUDE_PLUGIN_ROOT}/scripts/han-config-dir.sh" 2>/dev/null || echo "$HOME/.claude"
  • project .han/config.md: !cat .han/config.md 2>/dev/null || echo ""

As your first action, use the Read tool on .han/config.md inside the personal config directory path above. A read that returns no file is no personal configuration: continue silently. When that file or the project .han/config.md probe supplies content, apply it per config-rule.md, which governs precedence between the two files, relative-path resolution, and what to do with a file that reads but cannot be used.

Operating Principles

  • The han-core:gap-analyzer agent owns the primary analysis. This skill does not classify gaps itself. It calls han-core:gap-analyzer once, reads the analyzer's full output file, and synthesizes a stakeholder-readable report from it.
  • Plain language is the default surface. Sections 1 and 2 of the report never contain file paths, line numbers, function or class names, library mechanics, or language primitives. Technical fidelity is quarantined to Section 3 and only appears when the user has explicitly requested technical details.
  • The swarm runs by default. A minimum viable swarm ships at every size: han-core:adversarial-validator and han-core:junior-developer always, plus han-core:evidence-based-investigator when the current state is concrete enough to verify against. The user may opt out with no swarm to fall back to a lightweight gap-analyzer-only pass.
  • Evidence rule applies to every gap. Apply the evidence rule from ../../references/evidence-rule.md when characterizing the evidence that establishes each gap. Name the trust class of every citation pair (codebase, web, provided); apply the corroboration gate to web-source claims that establish a gap; and label gaps where the desired-state evidence is absent ("the spec is silent on X") as a distinct state, not as a weak gap. The han-core:evidence-based-investigator dispatched in the swarm carries codebase findings; the gap analyzer carries the spec-side citations.
  • Artifact-level analysis caveats are surfaced once, not per gap. Some validator observations apply uniformly to the whole comparison rather than to any one gap — most commonly a provenance concern about the desired-state artifact as a whole (for example, "the desired state is a provided, uncommitted, same-session source," which the evidence rule's provided trust class genuinely warrants flagging). Surface such an observation a single time as an artifact-level analysis caveat. Do not repeat it as a per-gap verdict on every gap that rests on that artifact, and do not let it raise or lower any gap's confidence — it bears on the whole report equally, so per-gap weighting would double-count one fact. Provenance concerns specific to a single gap's evidence still belong to that gap's verdict.
  • han-core:junior-developer runs the actor-perspective sweep. Gap analysis lives at the feature and behavioral level from a user's or actor's perspective — human end users (and sub-roles like customer, admin, auditor, support agent), API callers, AI agents, integration partners, batch processes, internal services. The han-core:junior-developer's job in the swarm is to check that each gap holds for every actor type the desired state addresses or implies, and to surface gaps the analyzer missed because it only considered one actor type.
  • han-core:plan-synthesizer coordinates Section 4 synthesis at medium and large only. When the swarm reaches four or more agents, the synthesizer consolidates the swarm's confirmations, contradictions, augmentations, and per-gap confidence values for the skill to render. At small swarm size (two or three agents), the skill consolidates deterministically without the synthesizer.
  • Optional sections must not be load-bearing. A report with only Sections 1 and 2 must stand on its own. Sections 3 and 4 are additive — never required for Sections 1 and 2 to make sense.
  • Purpose-conditioned prioritization is a labeled skill judgment, never the analyzer's. The han-core:gap-analyzer produces a neutral, unprioritized gap list and must stay that way. When the user states why they are running the comparison (e.g., "before a redesign pass," "to scope the next sprint"), the skill may add one explicitly-labeled "Where to start" pointer view that names the few gaps most blocking that stated purpose. This is the skill's own synthesis judgment — the same kind it already makes when it clusters gaps into themes and derives confidence — layered on top of the neutral list, never replacing it, and omitted entirely when no purpose was given.
  • Gap IDs are stable for the life of the report. Map GAP-NNN from the han-core:gap-analyzer output to G-NNN in the report, preserving order. Cross-references in Sections 3 and 4 use the same G-NNN IDs.
  • The report template lives at gap-analysis-report-template.md. It was designed by the han-core:information-architect agent. The skill renders the template by filling placeholders and removing the optional sections that were not requested or generated.
  • The report is written to the shared readability standard. The skill sources the standard by invoking han-communication:readability-guidance and applies it as it writes the report, holding the default audience frame: a capable reader who did not do this work and lacks the author's context. The stable gap IDs (G-NNN) are citation identifiers and survive any rewrite or self-check unchanged.

Read the full file on GitHub · 422 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago First seen · 422 lines · 91 tokens per session scan A 9801f3030a24

Subscribe to this mod's changes

gap-analysis is a skill published in the GitHub repository testdouble/han (316 stars, last pushed 3d ago), licensed MIT. It adds 91 tokens to every session and 7,471 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

gemini

Cross-model second opinion from Google Gemini — a different AI reviewing the same changes, with deep Google ecosystem knowledge. Three modes: review (pass/fail gate for Google Ads campaigns, SEO metadata, or code), challenge (adversarial stress-test that tries to break your changes), and consult (open Q&A with Gemini…

nowork-studio/notfair-plugin · 184 tokens

security-architecture-review

Reviews a design or change for security before it ships — authentication and authorization, data handling, secrets, dependencies, and the secure-development practices around it. Use this to review an architecture or pull request for security, set secure coding standards, choose or tune SAST and DAST tooling, assess a…

cbrock84/headcount · 78 tokens

audit

Project health audit and health check — architecture, performance, tests, dependencies, code quality. Use when assessing overall project health, before releases, or after refactors.

oliver-kriska/claude-elixir-phoenix · 35 tokens

boundaries

Analyze Phoenix context boundaries and module coupling via mix xref. Use when checking cross-context calls, validating dependencies, before splitting modules, or reviewing architecture.

oliver-kriska/claude-elixir-phoenix · 33 tokens

triage

Triage review findings interactively — approve, skip, or prioritize each issue. Use after /phx:review to filter findings before fixing.

oliver-kriska/claude-elixir-phoenix · 32 tokens

pr-threads-address

Address PR review feedback by systematically working through every unresolved PR review thread on the current branch's PR - analyze each comment, make the requested code changes (with tests where useful), commit, and optionally reply and resolve.

posit-dev/skills · 48 tokens