Hallucinated Reference 幻覚的参照の実在確認

Hallucinated Reference 幻覚的参照の実在確認 is a skill for Claude Code from s977043/river-review. It costs 93 tokens per session (1,915 once invoked), scanned A, original, MIT.

A code review check that verifies newly added imports, function calls, methods, and library APIs actually exist. An API is a defined way for code to use another module or service.

In plain words
What is it for?
Use it when a change adds new code references. It searches the codebase to verify modules, functions, methods, and argument signatures where possible.
Why use it?
It helps catch made-up or incorrectly named references that can cause build or runtime failures, especially in AI-generated code. It also distinguishes a real symbol from a similarly named one with a different interface.

Skill for Claude Code

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

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

Good fit Use it when a change adds new code references. It searches the codebase to verify modules, functions, methods, and argument signatures where possible.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/s977043/river-review/hallucinated-reference
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 hallucinated-reference
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 139 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 Hallucinated Reference 幻覚的参照の実在確認

README.md
[![agentmods](https://agentmods.dev/badge/skills/s977043/river-review/hallucinated-reference/github.svg)](https://agentmods.dev/skills/s977043/river-review/hallucinated-reference)
Your own site
<a href="https://agentmods.dev/skills/s977043/river-review/hallucinated-reference"><img src="https://agentmods.dev/badge/skills/s977043/river-review/hallucinated-reference/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 Hallucinated Reference 幻覚的参照の実在確認

Your own site · 80×15
<a href="https://agentmods.dev/skills/s977043/river-review/hallucinated-reference"><img src="https://agentmods.dev/badge/skills/s977043/river-review/hallucinated-reference.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 93 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,915 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.00093 $0.01915
Opus 5.5 $0.00037 $0.00766
Sonnet 5.5 $0.00019 $0.00383
Haiku 4.5 $0.00009 $0.00192

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

Security

Grade A, and why

Hallucinated Reference 幻覚的参照の実在確認 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.

skills/midstream/hallucinated-reference/SKILL.md · 119 lines

How it starts

The opening of the file, as written. The whole thing — 119 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: 参照の実在確認はチェックリスト型評価が主だが、新規参照を含まない差分では実行を止めるゲートが必要

Goal / 目的

  • 差分で新規に導入された参照(import・関数呼び出し・メソッド・ライブラリ API)が実在することを確認し、AI 生成コードに混入する幻覚的参照が実行時エラーとして本番へ到達するのを防ぐ。
  • 「実在するが名前が似た別物」への置き換わり(例: format と formatDate の取り違え)も対象とする。

Non-goals / 扱わないこと

  • レビュー指摘(finding)の evidence 実在確認(それは independent-review-synthesis の hallucination guard の役割)。
  • リファクタで消えたシンボルへの残存参照の検出(それは cross-file-leakage の役割。本スキルは差分内で新規に導入された参照のみを見る)。
  • 先行実装・既存パターンへの準拠判定(existing-pattern-conformance および SIMPLIFY 観点 Reuse の役割)。
  • コードスタイル・命名の適切さの評価。

Pre-execution Gate / 実行前ゲート

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

  • 差分に新規の import / require / 関数呼び出し / メソッド呼び出しの追加が含まれている
  • inputContext に diff が含まれている
  • code_search(rg 等)が利用可能である

ゲート不成立時の出力: NO_REVIEW: hallucinated-reference — 実在確認の対象となる新規参照が検出されない

False-positive guards / 抑制条件

  • 同一 PR / 差分内で新規に定義されたシンボルへの参照は指摘しない(定義と利用が同時に追加されるのは正常)。
  • tsc / eslint no-undef 等の決定論的チェックが CI で有効なリポジトリでは、ビルドが確実に検出する未解決参照の severity を minor に落とす。実在するが挙動・シグネチャが異なる「意味的幻覚」はこの限りでない。
  • code_search で定義が見つからなくても、動的生成(メタプログラミング・codegen)や型定義なし外部パッケージの可能性を棄却できない場合は、findings ではなく questions として返す。
  • 標準ライブラリ・依存に含まれる著名ライブラリの公知 API は指摘しない。バージョン差異により存在が疑わしい場合のみ questions とする。

抑制時の出力: 該当する指摘を出力しない(黙る)。

Rule / ルール

  • 新規 import / require の解決先が、リポジトリ内のモジュールまたは package.json の依存に実在するか確認する。
  • 新規のメソッド・関数呼び出しについて、レシーバのクラス・モジュール・型にその定義が存在するかを code_search で確認する。
  • 依存ライブラリ API の呼び出しが、そのライブラリの公開 API として実在するか確認する。引数の数・名前がシグネチャと乖離している場合も指摘する。
  • 「実在するが別物」のパターン(類似名 API・別ライブラリの同名 API・非推奨で削除済みの API)を優先度高く確認する。
  • 指摘は最大 5 件。実行時エラーに直結するものを優先する。

Evidence / 根拠の取り方

  • 指摘は差分内の参照行(<file>:<line>)に紐づける。
  • code_search の結果(定義が見つかった位置、または検索パターンと 0 件である事実)を根拠として明示する。
  • 「存在しない」と「確認できなかった」を明確に区別する。後者は questions に落とす。

Output / 出力(短文版の推奨)

River Review のコメントは<file>:<line>: <message>形式です。コメントは日本語で返す。

  • Finding: 何が問題か(1文)
  • Impact: 何が困るか(短く)
  • Fix: 次の一手(最小の修正案)

例:

  • src/report.ts:24: utils/date に formatDateRange は未定義(rg で定義 0 件、export は formatDate のみ)。実行時に TypeError。Fix: formatDate を使うか formatDateRange を実装

Read the full file on GitHub · 119 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. 1mo ago First seen · 119 lines · 93 tokens per session scan A 0a6854ec0a02

Subscribe to this mod's changes

Hallucinated Reference 幻覚的参照の実在確認 is a skill published in the GitHub repository s977043/river-review (7 stars, last pushed today), licensed MIT. It adds 93 tokens to every session and 1,915 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

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

logic-fix-all

Autonomous repository-wide audit-and-fix pipeline: health → review → locate/explain → fix → diff-verify → iterate until clean. Starts with a mandatory consent prompt (token-intensive); after consent runs hands-free. Trigger when the user wants ALL logic issues found and fixed — "fix everything", "fix all logic…

hyhmrright/logic-lens · 211 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

logic-explain

Explain what a specific piece of code actually does for a given input by producing a step-by-step execution trace (interprocedural, with name resolution and type transitions). Trigger when the user is confused about behavior or asks why code produces X instead of Y — "walk me through this", "trace through X with input…

hyhmrright/logic-lens · 171 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