tommymorgan:coverage-analysis

A command that compares scenarios in living specification files with tests in a project. A scenario is a written example of expected software behavior.

In plain words
What is it for?
Use it to inspect feature files, find matching tests, calculate coverage, and list scenarios without tests.
Why use it?
It shows which documented behaviors have tests and where coverage is missing, instead of requiring a manual search through the project.

Command

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 commands/tommymorgan/claude-plugins/coverage-analysis
Clone the repo
git clone --depth 1 https://github.com/tommymorgan/claude-plugins
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 575 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.00015 $0.00575
Opus 5 $0.00008 $0.00287
Sonnet 5 $0.00003 $0.00115
Haiku 4.5 $0.00002 $0.00057

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

Security

Grade A, and why

tommymorgan:coverage-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 2d 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.

tommymorgan/migration/commands/coverage-analysis.md · 94 lines

How it starts

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

Analyze Test Coverage of Living Specifications

Analyzes which scenarios in living .feature files have corresponding tests, identifying coverage gaps.

Usage

/tommymorgan:coverage-analysis [project-path]

What This Does

  1. Loads living specs from features/ directory
  2. Discovers test files in project (test_*.py, *.test.js, etc.)
  3. Matches scenarios to tests using fuzzy name matching
  4. Reports coverage percentage
  5. Lists untested scenarios

Process

cd $PROJECT_PATH

python3 tools/claude-plugins/tommymorgan/migration/commands/doc_generator.py coverage features/ .

Output

Test Coverage Analysis

Total scenarios: 15
Tested: 10
Coverage: 66.7%

Scenarios without tests:
  ✗ User resets password (authentication.feature)
  ✗ Admin manages permissions (user-management.feature)
  ✗ Export analytics to CSV (analytics.feature)
  ✗ Bulk import test cases (test-management.feature)
  ✗ API rate limiting (api.feature)

Scenarios with tests:
  ✓ User logs in successfully (test_auth.py::test_user_login)
  ✓ User logs out (test_auth.py::test_user_logout)
  ✓ JWT token generation (test_auth.py::test_jwt_generation)
  ...

Matching Algorithm

Fuzzy matching finds tests that likely correspond to scenarios:

  • Converts scenario names to test naming conventions
  • Searches test file content for scenario names
  • Reports matches with test file names
  • Flags scenarios with no matches

Example matches:

  • "User logs in successfully" → test_user_login_successfully()
  • "JWT token generation" → test_jwt_token_generation()
  • "API returns 404 for missing resource" → test_api_404_missing_resource()

Benefits

  • Identify gaps: See which scenarios lack test coverage
  • Track progress: Monitor coverage as features are implemented
  • Quality metric: Quantify test completeness
  • Guide testing: Prioritize writing tests for untested scenarios

When to Use

  • After implementing features (verify new scenarios are tested)
  • Before releases (ensure adequate coverage)
  • During code review (check test completeness)
  • Sprint retrospectives (discuss coverage trends)

Read the full file on GitHub · 94 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. 2d ago First seen · 94 lines · 15 tokens per session scan A 97b36f572747

Subscribe to this mod's changes

tommymorgan:coverage-analysis is a command published in the GitHub repository tommymorgan/claude-plugins (4 stars, last pushed 1mo ago), licensed MIT. It adds 15 tokens to every session and 575 once invoked, about $0.0001 per session on Opus 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-08-31.