Test Presence for Changed Code

Test Presence for Changed Code is a skill for Claude Code from s977043/river-review. It costs 19 tokens per session (1,268 once invoked), scanned A, original, MIT.

A check that looks for tests covering changed source code. It only runs when the available change information shows a behavior-affecting code or test change.

In plain words
What is it for?
It is for reviewing functions, methods, and endpoints in changed source files, with priority for areas such as sign-in, payments, and data storage. It can suggest up to three focused test cases.
Why use it?
It helps catch new or changed code paths that have no corresponding test, while avoiding requests for more tests when tests were already changed or the change is not relevant.

Skill for Claude Code

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

Part of the river-review plugin — 138 skills, 18 commands, 5 agents, 3 hooks shipped together

Good fit It is for reviewing functions, methods, and endpoints in changed source files, with priority for areas such as sign-in, payments, and data storage. It can suggest up to three focused test cases.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/s977043/river-review/test-existence
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.

Any agent
npx skills add s977043/river-review --skill test-existence
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 138 skills, 18 commands, 5 agents, 3 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 Test Presence for Changed Code

README.md
[![agentmods](https://agentmods.dev/badge/skills/s977043/river-review/test-existence/github.svg)](https://agentmods.dev/skills/s977043/river-review/test-existence)
Your own site
<a href="https://agentmods.dev/skills/s977043/river-review/test-existence"><img src="https://agentmods.dev/badge/skills/s977043/river-review/test-existence/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 Test Presence for Changed Code

Your own site · 80×15
<a href="https://agentmods.dev/skills/s977043/river-review/test-existence"><img src="https://agentmods.dev/badge/skills/s977043/river-review/test-existence.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 19 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,268 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.00019 $0.01268
Opus 5 $0.00010 $0.00634
Sonnet 5 $0.00004 $0.00254
Haiku 4.5 $0.00002 $0.00127

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

Security

Grade A, and why

Test Presence for Changed Code 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 8d 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/test-existence/SKILL.md · 93 lines

How it starts

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

既定 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: テスト存在チェックはチェックリスト型評価が主だが、実行パスへ影響するコード変更が差分にない場合は実行を止める必要がある。

Goal / 目的

  • 差分で挙動が増えたのにテストが追従していないケースを拾い、最小のテスト観点を提案する。

Non-goals / 扱わないこと

  • テストフレームワークの宗教論争(Jest/Vitest など)。
  • 網羅的なテストケース列挙(提案は最大3点までに絞る)。
  • テスト差分がすでにある場合の追加要求(原則として黙る)。

Pre-execution Gate / 実行前ゲート

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

  • 差分にソースコード(src/**/*, lib/**/*)またはテストファイル(*.test.*, *.spec.*)の変更が含まれている
  • 実行パスへ影響する変更が差分に含まれている(挙動変更のシグナルが存在する)
  • inputContextにdiffが含まれている

ゲート不成立時の出力: NO_REVIEW: test-existence — テスト存在チェックの対象となるコード変更が検出されない

False-positive guards / 抑制条件

  • 差分にテストファイル(*.test.* / *.spec.*)が含まれている場合。

Rule / ルール

  • 変更されたコード(関数/メソッド/エンドポイント)に対して対応するテストが存在するか確認する。
  • クリティカルパス(認証、課金、データ保存など)にテストが無い場合は優先して補う。
  • テストファイルが存在しない/未更新なら、最小の正常系・異常系を提案する。

Heuristics / 判定の手がかり

  • 変更ファイルに対する *.test.* / *.spec.* が無い、または差分がゼロ。
  • 変更された公開 API/handler に対応するリクエスト/レスポンス検証が無い。
  • 例外パス(throw/reject/return error)が追加されたのに失敗系テストが無い。

Good / Bad Examples

  • Good: 新規ハンドラに対して 200/4xx/5xx を分けたテストを追加。
  • Bad: 大きなリファクタに対してテスト差分がゼロ。
  • Good: coverage_report を確認し、変更ファイルのブランチカバレッジを補強。

Actions / 改善案

  • 変更された関数/エンドポイントごとに「正常系 + 代表的な異常系(認可/バリデーション/例外)」のテストを追加する。
  • 例外/エラー戻りのメッセージやステータスを検証する。
  • coverage_report を参照し、変更ファイルのステートメント/ブランチカバレッジが上がる具体的なテストケースを提案する。

Output / 出力

  • Finding: / Evidence: / Impact: / Fix: / Severity: / Confidence: を含む短いメッセージにする。
  • Fix は 1〜3 件のテスト観点に絞る(例: 新分岐、例外、境界)。

評価指標(Evaluation)

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

人間に返す条件(Human Handoff)

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

Read the full file on GitHub · 93 lines

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. 8d ago First seen · 93 lines · 19 tokens per session scan A ea3f1e944b35

Subscribe to this mod's changes

Test Presence for Changed Code is a skill published in the GitHub repository s977043/river-review (3 stars, last pushed yesterday), licensed MIT. It adds 19 tokens to every session and 1,268 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

brooks-sweep

Full-sweep mode: runs a unified analysis across all quality dimensions — code decay, architecture, tech debt, and test quality — then applies fixes directly to the codebase. Safe changes are auto-applied; risky changes are confirmed before execution. Drawing on twelve classic engineering books. Triggers when: user…

hyhmrright/brooks-lint · 178 tokens

brooks-test

Test quality review drawing on twelve classic engineering books — with primary focus on xUnit Test Patterns, The Art of Unit Testing, How Google Tests Software, and Working Effectively with Legacy Code — that diagnoses structural problems in an existing test suite: brittleness, mock abuse, coverage illusions, slow…

hyhmrright/brooks-lint · 161 tokens

pre-pr-audit

Pre-PR confidence audit with 5-dimension scoring. Use when: final check before commit/push/PR, evaluating PR readiness, assessing test quality + risk + coverage holistically. Triggers: pre-pr, readiness check, confidence audit, final verification, ready to PR, how confident. Not for: code review (use…

sd0xdev/sd0x-harness · 95 tokens

spike-consumer-adversarial

OI-3 spike harness — heavy consumer, ADVERSARIAL arm. Worst-case early-exit test: the mid-workflow Skill call has no continuation guardrail and the guidance skill ends with a final-sounding anchor. Use only when explicitly invoked by the spike harness with a TRIALID and data path.

testdouble/han · 0 tokens

code-standards

Apply a disciplined engineering workflow to any code change. Use whenever implementing a feature, fixing a bug, or refactoring — before writing code, not after. Walks orient → baseline → smallest change → test → verify → self-review, and enforces language-agnostic hard gates (don't mass-reformat, keep the linter and…

tamdogood/builder-essential-skills · 94 tokens

loop-test

A local experiment for designing repeating checks with Claude Code’s loop command. It covers both fixed intervals and checks that schedule themselves again after each run.

restarter/lets-workflow · 112 tokens