Coverage and Failure Path Gaps

Coverage and Failure Path Gaps is a skill for Claude Code from s977043/river-review. It costs 24 tokens per session (1,277 once invoked), scanned A, original, MIT.

A test-coverage review that finds changed code paths—especially critical, boundary, and failure paths—with no corresponding tests.

In plain words
What is it for?
Use it to review tests for changed code, including authentication, billing, data storage, new branches, error handling, and reported drops in statement, branch, or line coverage.
Why use it?
Tests that cover only the happy path may miss exceptions, timeouts, retries, fallbacks, or invalid input. The review highlights those gaps so they can be tested before the change is trusted.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the river-review plugin — 140 skills, 15 commands, 5 agents, 2 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 skills/s977043/river-review/coverage-gap
Any agent
npx skills add s977043/river-review --skill coverage-gap
Clone the repo
git clone --depth 1 https://github.com/s977043/river-review

Made for: Claude Code.

Or install river-review, the plugin that ships this one along with the rest of its 140 skills, 15 commands, 5 agents, 2 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 Coverage and Failure Path Gaps

README.md
[![agentmods](https://agentmods.dev/badge/skills/s977043/river-review/coverage-gap.svg)](https://agentmods.dev/skills/s977043/river-review/coverage-gap)
Your own site
<a href="https://agentmods.dev/skills/s977043/river-review/coverage-gap"><img src="https://agentmods.dev/badge/skills/s977043/river-review/coverage-gap.svg" alt="Measured on agentmods" height="20"></a>
Per session 24 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,277 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.1 $0.00024 $0.01277
Opus 5 $0.00012 $0.00639
Sonnet 5 $0.00005 $0.00255
Haiku 4.5 $0.00002 $0.00128

Measured 5d ago against content hash fd222ea1204d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

Coverage and Failure Path Gaps 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 5d 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.

skills/downstream/coverage-gap/SKILL.md · 88 lines

What it actually says

既定 CI レビューでは発火しない / Not triggered on the default CI review path

このスキルは repo 全体の既存テスト木(変更されていないファイルを含む)を要するため、既定 runner の供給コンテキスト(RUNNER_SUPPLIED_CONTEXTS = ['diff', 'prDescription', 'fullFile']scripts/validate-skills.mjs)では発火しない。RIVER_AVAILABLE_CONTEXTS を拡張して tests(repo-wide test tree)を供給する構成でのみ有効になる(GRANDFATHERED_UNSUPPLIED_CONTEXT に登録済み、#1606)。

Pattern declaration

Primary pattern: Reviewer Secondary patterns: Inversion Why: カバレッジギャップ検出はチェックリスト型評価が主だが、テスト対象コードが差分に含まれない場合は実行を止める必要がある。

Rule / ルール

  • 主要フローと失敗フローの両方にテストがあることを確認する。
  • 例外系・タイムアウト・リトライなどのエラーハンドリングをテストする。
  • 変更によって追加/変更された分岐・境界値・フォールバックをカバーする。

Heuristics / 判定の手がかり

  • 新しい条件分岐・ガードが追加されたのに対応するテストがない。
  • 例外処理やエラーリターンに対するアサーションが見当たらない。
  • 大きな refactor でテストの網羅対象が変わっているのに、テスト差分が少ない。
  • クリティカルパス(認証/課金/データ保存など)にテストが不足。
  • coverage_report でステートメント/ブランチ/ラインの低下が確認できるのに差分テストが増えていない。

Good / Bad Examples

  • Good: 成功・失敗・境界を分けた describe / it を追加し、エラーメッセージも検証。
  • Bad: happy path のみのテストで、例外時や空入力時の検証がない。
  • Good: coverage_report を確認し、差分ファイルのステートメント/ブランチカバレッジを改善。

Actions / 改善案

  • 新規/変更分岐ごとに正常系・異常系テストを追加する(例外メッセージも含めて検証)。
  • タイムアウト/リトライ/フォールバックをモックし、意図した失敗動作を確認する。
  • クリティカルパスのカバレッジを coverage_report ベースで確認し、不足を埋めるテストを提案する。
  • 差分ファイルの各分岐・ガードに対して「期待される成功/失敗シナリオ + 入力例」を列挙し、テストケースとして提示する。

Non-goals / 扱わないこと

  • 既存テストの全面的な書き換えやリファクタリング。
  • 実行環境や外部サービスの障害注入(カオス試験)の設計。
  • プロダクション監視の網羅性評価。

Pre-execution Gate / 実行前ゲート

このスキルは以下の条件がすべて満たされない限りNO_REVIEWを返す。

  • 差分にソースコード(src/**/*, lib/**/*)またはテストファイル(*.test.*, *.spec.*)の変更が含まれている
  • 実行パスへ影響する変更が差分に含まれている(コメントやドキュメントのみの変更ではない)
  • inputContextにdiffが含まれている

ゲート不成立時の出力: NO_REVIEW: coverage-gap — カバレッジギャップ検出の対象となるコード変更が検出されない

False-positive guards / 抑制条件

  • 既存テストが同等の失敗経路を十分にカバーしている。
  • テスト対象が外部 API の仕様変更のみで、社内コードに実行分岐が増えていない。

評価指標(Evaluation)

  • 合格基準: 指摘が差分に紐づき、根拠と次アクションが説明されている。
  • 不合格基準: 差分と無関係な指摘、根拠のない断定、抑制条件の無視。

人間に返す条件(Human Handoff)

  • 仕様や意図が不明確で解釈が分かれる場合は質問として返す。
  • 影響範囲が広い設計判断やトレードオフは人間レビューへ返す。
Files

What ships with it

2 files 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. 5d ago First seen · 88 lines · 24 tokens per session scan A fd222ea1204d

Subscribe to this mod's changes

Coverage and Failure Path Gaps is a skill published in the GitHub repository s977043/river-review (3 stars, last pushed today), licensed MIT. It adds 24 tokens to every session and 1,277 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.

Related

Other skills, from other repositories

logic-review

Find logic bugs in a single file or function via semi-formal execution tracing (Premises → Trace → Divergence → Trigger → Remedy). Trigger when a user shares code and suspects something is wrong without naming a concrete failure — phrases like "review this", "does this look right", "check this function", "audit this…

hyhmrright/logic-lens · 161 tokens

run-iteration-eval

Run the Logic-Lens content-eval pipeline for one iteration and produce a scored summary.json — use to measure a skill change. Wraps scripts/run-content-evals.sh (runner, costs tokens) and scripts/grade-iteration.py (grader, free, re-runnable). ALWAYS sync the plugin cache first. Use when the user wants to "run the…

hyhmrright/logic-lens · 108 tokens

sync-skill-cache

Sync the Logic-Lens working-copy skills/ into the installed plugin cache so content-evals test the EDITED skill, not the last published one. ALWAYS run this after editing any skills//SKILL.md or guide/shared file and BEFORE running content-evals — otherwise the eval silently grades stale content and every token is…

hyhmrright/logic-lens · 103 tokens

bump-version

Bump the Logic-Lens version across all six metadata locations at once (package.json, the four plugin manifests, and the README badge), then validate. Use when cutting a release or when npm run validate reports a version mismatch.

hyhmrright/logic-lens · 52 tokens

iterate-skill

Run the Logic-Lens skill-improvement loop end to end — baseline → diagnose failures → edit → sync cache → re-eval → verify net gain → iterate until clean. Use whenever the goal is to RAISE a skill's eval score or fix a failing eval mode: "improve logic-review", "the format compliance is failing, fix it", "iterate on…

hyhmrright/logic-lens · 183 tokens

logic-locate

Locate the root cause of a CONFIRMED failure via backward-then-forward semi-formal tracing. Trigger when the user provides a stack trace, failing assertion, error message, or specific wrong-value observation — "find the bug", "this test is failing", "track down this crash", "why is this test failing", "KeyError at…

hyhmrright/logic-lens · 177 tokens