Cross-File Leakage リファクタ後の caller 側残骸検出

Cross-File Leakage リファクタ後の caller 側残骸検出 is a skill for Claude Code from s977043/river-review. It costs 79 tokens per session (1,757 once invoked), scanned A, original, MIT.

A code review check for structural changes such as renamed functions, changed arguments, moved files, or split modules. It searches the rest of the project for callers that still use the old structure.

In plain words
What is it for?
Use it after renaming symbols, changing function signatures, reorganizing files, or splitting modules.
Why use it?
It helps prevent a refactor from leaving behind references that compile incorrectly, fail at runtime, or preserve outdated usage.

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 Use it after renaming symbols, changing function signatures, reorganizing files, or splitting modules.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/s977043/river-review/cross-file-leakage
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 cross-file-leakage
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 Cross-File Leakage リファクタ後の caller 側残骸検出

README.md
[![agentmods](https://agentmods.dev/badge/skills/s977043/river-review/cross-file-leakage/github.svg)](https://agentmods.dev/skills/s977043/river-review/cross-file-leakage)
Your own site
<a href="https://agentmods.dev/skills/s977043/river-review/cross-file-leakage"><img src="https://agentmods.dev/badge/skills/s977043/river-review/cross-file-leakage/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 Cross-File Leakage リファクタ後の caller 側残骸検出

Your own site · 80×15
<a href="https://agentmods.dev/skills/s977043/river-review/cross-file-leakage"><img src="https://agentmods.dev/badge/skills/s977043/river-review/cross-file-leakage.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 79 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,757 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.00079 $0.01757
Opus 5 $0.00039 $0.00879
Sonnet 5 $0.00016 $0.00351
Haiku 4.5 $0.00008 $0.00176

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

Security

Grade A, and why

Cross-File Leakage リファクタ後の caller 側残骸検出 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 7d 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/midstream/cross-file-leakage/SKILL.md · 129 lines

How it starts

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

Pattern declaration

Primary pattern: Reviewer Secondary patterns: Inversion Why: 構造変更に対する caller 走査は grep による決定論的突合が主だが、構造変更を含まない変更では実行を止めるゲートが必要

Goal / 目的

  • スキル/モジュールを構造変更したとき、当該ファイルは更新したが caller 側 N 箇所が古い構造を参照したまま 残るパターンを検出する。
  • 「変更元は直したが、参照元を直し忘れた」ドリフトを、変更の波及範囲を grep で追って可視化する。

Non-goals / 扱わないこと

  • 構造変更そのものの良し悪しの判断。
  • 静的型エラーの検出(型システムが捕捉できる drift はコンパイラ/tsc の役割)。
  • 当該ファイル内の整合性(それは self-contradiction の領域)。

Pre-execution Gate / 実行前ゲート

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

  • 差分に構造変更(記号の再採番、シンボル名変更、シグネチャ変更、セクション番号の振り直し、ファイル分割・移動)が含まれている
  • inputContext に diff が含まれている

ゲート不成立時の出力: NO_REVIEW: cross-file-leakage — 構造変更が検出されない

False-positive guards / 抑制条件

  • 旧構造への参照を grep しても caller 側に残骸が見つからない場合は指摘しない。
  • 残骸が意図的(旧 API の互換 shim、移行期間中の dual-reference)で差分内に明記がある場合は抑制。
  • 参照が文字列として同一でも別シンボル/別スコープを指す場合は抑制。

Rule / ルール

検出ロジック

  1. 構造変更の特定: 差分から「何がどう変わったか」を抽出する(旧シンボル→新シンボル、§2.1→新採番、foo(a)foo(a, b)、ファイル A→分割後)。
  2. caller の列挙: 旧構造の識別子(旧シンボル名・旧参照形式・旧パス)を repo 全体に grep し、参照している全箇所を列挙する。
  3. 残骸の判定: 列挙した参照のうち、今回の差分で更新されていないものを残骸として特定する。
  4. 波及の報告: 残骸を <file>:<line> と検索語で示し、更新漏れの caller を網羅的に挙げる。

制約

  • 検出は最大 5 件(同一原因の残骸はまとめて1件とし、影響ファイルを列挙)。
  • 各指摘には「構造変更」「旧構造の検索語」「未更新の caller 位置」を必ず含める。
  • caller の列挙は grep で再現可能にし、「N 箇所」と件数を明示する。

Evidence / 根拠の取り方

  • 残骸は必ず <file>:<line> と grep 検索語を示し、推測で件数を述べない。
  • 「構造がどう変わったか」を旧→新で具体的に示し、なぜ caller が壊れる/古いかを説明する。

Output / 出力フォーマット

すべて日本語。

(cross-file-leakage):1: [要約] 最も影響の大きい未更新 caller は〈1文〉

<file>:<line>: [caller 残骸1] <タイトル>
  構造変更: <旧構造> → <新構造>(変更元: <file>:<line>)
  検索語: `<grep pattern>`
  未更新の caller: <N>箇所 — <file:line>, <file:line>, ...
  影響: <古い参照が引き起こす不整合/破壊>
  Fix: <caller 側 N 箇所を新構造に更新する>

<file>:<line>: [caller 残骸2] ...

Good / Bad Examples

Good

review-output/SKILL.md:1: [caller 残骸] §再採番後に caller 9ファイルが旧セクション番号を参照
  構造変更: review-output SKILL.md を §1-§6 構成に再採番(review-output/SKILL.md:1)
  検索語: `§(2\.1|4\.4|3-R)`
  未更新の caller: 9箇所 — a/SKILL.md:12, b/SKILL.md:30, scripts/build.py:88, ...
  影響: caller が存在しない旧セクション番号を指し、参照が解決不能
  Fix: caller 9ファイルの §2.1/§4.4/§3-R を新採番に更新

Read the full file on GitHub · 129 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. 7d ago First seen · 129 lines · 79 tokens per session scan A bcb807b500ed

Subscribe to this mod's changes

Cross-File Leakage リファクタ後の caller 側残骸検出 is a skill published in the GitHub repository s977043/river-review (3 stars, last pushed today), licensed MIT. It adds 79 tokens to every session and 1,757 once invoked, about $0.0004 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-09-03.

Related

Other skills, from other repositories

review-all

Multi-agent code review for diffs (project-agnostic). Covers standards, bugs, security, DRY, smells, perf, tests, API contracts, a11y/i18n. Verifies each finding to eliminate false positives. Use for /review-all, pre-PR/pre-commit review, or auditing uncommitted/staged changes.

ncoevoet/claude-review-all · 74 tokens

logic-health

Sweep a directory, module, or full codebase for logic correctness and produce a scored health dashboard with systemic patterns. Trigger when the user requests a health view — "audit the whole codebase", "health check", "health overview", "logic health overview", "audit src/", "audit auth and payments modules", "where…

hyhmrright/logic-lens · 180 tokens

omnicheck-github

Use when checking if PR review findings have been applied — verifies both OmniForge-generated and human reviewer comments against the current diff, posts nudge replies on unaddressed threads.

nexiouscaliver/OmniForge · 40 tokens

omnicreate-gitlab

Use when creating a GitLab merge request (OmniForge). Auto-populates title and description from commits, supports draft MRs, labels, assignees, reviewers, and issue linking.

nexiouscaliver/OmniForge · 45 tokens

omnicreate-github

Use when creating a GitHub pull request (OmniForge). Auto-populates title and description from commits, supports draft PRs, labels, assignees, reviewers, and issue linking.

nexiouscaliver/OmniForge · 44 tokens

omnifix-github

Use when fixing review findings on a GitHub PR, resolving inline review threads, applying code review suggestions, or when asked to fix issues from an OmniForge report.

nexiouscaliver/OmniForge · 37 tokens