hallucination

hallucination is an agent for coding agents 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

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

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.

agentmods
npx agentmods add agents/andyzengmath/soliton/hallucination
Clone the repo
git clone --depth 1 https://github.com/andyzengmath/soliton

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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
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 $0.00020 $0.01250
Opus 5 $0.00010 $0.00625
Sonnet 5 $0.00004 $0.00250
Haiku 4.5 $0.00002 $0.00125

Measured 3d ago against content hash 9cb4b16faa0b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 3d 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. 3d 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 2mo ago), licensed MIT. It adds 20 tokens to every session and 1,250 once invoked, about $0.0001 per session on Opus 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

Other agents, from other repositories

test-engineer

QA engineer specialized in test strategy, test writing, and coverage analysis. Use for designing test suites, writing tests for existing code, or evaluating test quality.

addyosmani/agent-skills · 35 tokens

model-add-remove

模型本身是阿里云后端在管,本仓库要做的是让 CLI 能正确调用 + 文档/AI 入口准确反映可用模型清单。.

modelstudioai/cli · 0 tokens

frontend-design

React 前端技术设计专家。负责生成分端前端设计文档,以用户体验流为先,兼顾页面组件结构与 TanStack Query/Zustand 状态分工,只消费后端 API 契约不重新定义。.

timzaak/web-dev-skills · 54 tokens

loom-advisor

Read-only advisory agent for debugging and repeated failures. Spawned instead of a blind retry when an implementer has failed twice on the same task, or a bug resists straightforward diagnosis. Returns a root-cause diagnosis plus one concrete next step.

cosmix/loom · 53 tokens

audit-agent

Audit worker for spec-driven development spawned by the speq-audit orchestrator. Verifies specs/mission.md against the real spec library and returns the inconsistencies. Read-only — authors nothing.

marconae/speq-skill · 42 tokens

pr-ghostwriter

Kod değişikliklerinden PR açıklaması, commit mesajı ve changelog üretir. Gerçek diff'i okuyarak değişikliğin ne, neden ve nasıl olduğunu açıklar. Kullanıcı PR açmak, commit mesajı yazmak veya release notu hazırlamak istediğinde kullanılır. Jenerik açıklama üretmez — her zaman gerçek değişikliğe özgü yazar.

komunite/kalfa · 81 tokens