hallucination

hallucination is an agent for Claude Code from andyzengmath/soliton. It costs 20 tokens per session (1,250 once invoked), scanned A, original, MIT.

A code-review agent that checks new code for made-up or incorrect programming interfaces, such as APIs, imports, functions, and method signatures.

In plain words
What is it for?
Reviewing code changes, verifying external API calls and imports, checking local definitions, and finding likely AI-generated coding mistakes.
Why use it?
AI-generated code can look plausible while calling something that does not exist, uses the wrong arguments, or depends on outdated software.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the soliton plugin — 1 skill, 3 commands, 13 agents shipped together

Good fit Reviewing code changes, verifying external API calls and imports, checking local definitions, and finding likely AI-generated coding mistakes.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/andyzengmath/soliton/hallucination
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.

Clone the repo
git clone --depth 1 https://github.com/andyzengmath/soliton

Made for: Claude Code.

Or install soliton, the plugin that ships this one along with the rest of its 1 skill, 3 commands, 13 agents.

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 hallucination

README.md
[![agentmods](https://agentmods.dev/badge/agents/andyzengmath/soliton/hallucination/github.svg)](https://agentmods.dev/agents/andyzengmath/soliton/hallucination)
Your own site
<a href="https://agentmods.dev/agents/andyzengmath/soliton/hallucination"><img src="https://agentmods.dev/badge/agents/andyzengmath/soliton/hallucination/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 hallucination

Your own site · 80×15
<a href="https://agentmods.dev/agents/andyzengmath/soliton/hallucination"><img src="https://agentmods.dev/badge/agents/andyzengmath/soliton/hallucination.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,250 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00020 $0.01250
Opus 5.5 $0.00008 $0.00500
Sonnet 5.5 $0.00004 $0.00250
Haiku 4.5 $0.00002 $0.00125

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

Security

Grade A, and why

hallucination scanned grade A with 1 finding 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 3mo 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- `urllib2` — Python 2 only, use `urllib.request`
agents/hallucination.md · 132 lines

How it starts

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

AI Hallucination Detection Agent

You are a specialized hallucination detector for Soliton PR Review. You verify that all new API calls, imports, and function invocations actually exist and have the correct signatures. This catches the most common AI coding agent failure mode: generating plausible-looking code that calls non-existent functions.

Input

You receive:

  • diff — unified diff of all changes
  • files — list of changed files
  • focusArea — specific files and hints from the risk scorer

Review Process

1. Extract New Calls

Parse the diff for all NEW imports, function calls, and method invocations (lines starting with +):

  • Import statements: import X from 'Y', from X import Y, require('X'), use X
  • Function calls: functionName(args), module.methodName(args)
  • Method calls: object.method(args), chained calls
  • Type references: X extends Y, implements Z, X: TypeName
  • Decorator/annotation usage: @decorator, @annotationName

2. Verify Local Code

For each new call to a LOCAL function/class (not from external packages):

  1. Use Grep to search for the definition in the project source:
    Search for: "function functionName", "def functionName", "class ClassName", "const functionName ="
    
  2. If found: Read the definition and verify the call signature matches (parameter count, types)
  3. If NOT found: Flag as potential hallucination

3. Verify External Packages

For each new call to an EXTERNAL package:

Node.js:

  1. Use Glob to find node_modules/<package>/ directory
  2. Read the package's type definitions (.d.ts) or main entry point
  3. Search for the specific method/function being called
  4. Verify the signature matches

Python:

  1. Use Bash to run pip show <package> to verify the package is installed
  2. Use Glob to find the package directory in site-packages
  3. Use Grep to search for the function definition in the package source
  4. Read the function signature from the source file to verify it matches

Read the full file on GitHub · 132 lines

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. 3mo ago First seen · 132 lines · 20 tokens per session scan A 9cb4b16faa0b

Subscribe to this mod's changes

hallucination is an agent published in the GitHub repository andyzengmath/soliton (1 stars, last pushed 5mo ago), licensed MIT. It adds 20 tokens to every session and 1,250 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

hallucination compared with agents from other repositories

hallucination next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
hallucinationandyzengmath/solitonAgent15mo agoMITA20Claude Code
code-reviewerarch3rPro/ark-spaceAgent23mo agoMITA18Claude Code
parallel-revieweroliver-kriska/claude-elixir-phoenixAgent579yesterdayMITA38Claude Code
genshijin-reviewerInterfaceX-co-jp/genshijinAgent3372d agoMITA93Claude Code
data-engineertestdouble/hanAgent36219d agoMITA216Claude Code
plan-synthesizertestdouble/hanAgent36219d agoMITA159Claude Code
discussion-facilitatortestdouble/hanAgent36219d agoMITA160Claude Code