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.
npx skills add s977043/river-review --skill hallucinated-referencegit clone --depth 1 https://github.com/s977043/river-reviewWrote 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.
[](https://agentmods.dev/skills/s977043/river-review/hallucinated-reference)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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 を実装
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.
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.
- 1mo ago First seen · 119 lines · 93 tokens per session scan A 0a6854ec0a02
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.
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.
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…
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…
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…
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…
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…