hallucination-detector

hallucination-detector is a skill for Claude Code from marcusgoll/Spec-Flow. It costs 83 tokens per session (7,588 once invoked), scanned A, original, MIT.

A technical decision checker that compares proposed technologies, APIs, schemas, packages, and services with the project's documented technology choices.

In plain words
What is it for?
It helps validate architecture suggestions, database entities, external APIs, packages, and version-specific capabilities against project documentation.
Why use it?
It helps prevent recommendations that conflict with the existing framework, database, cloud provider, or available interfaces.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit It helps validate architecture suggestions, database entities, external APIs, packages, and version-specific capabilities against project documentation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/marcusgoll/spec-flow/hallucination-detector
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 marcusgoll/Spec-Flow --skill hallucination-detector
Clone the repo
git clone --depth 1 https://github.com/marcusgoll/Spec-Flow

Made for: Claude Code.

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

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/marcusgoll/spec-flow/hallucination-detector"><img src="https://agentmods.dev/badge/skills/marcusgoll/spec-flow/hallucination-detector.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 83 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 7,588 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.00083 $0.07588
Opus 5 $0.00042 $0.03794
Sonnet 5 $0.00017 $0.01518
Haiku 4.5 $0.00008 $0.00759

Measured 8d ago against content hash 5d40ed974c10, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

hallucination-detector 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 8d 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.

.claude/skills/hallucination-detector/SKILL.md · 1,184 lines

How it starts

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

Hallucinated technical decisions destroy projects:

  • Suggesting React when project uses Vue (wrong framework)
  • Creating duplicate User entity when one already exists (duplicate schema)
  • Recommending fake npm packages that don't exist (non-existent dependencies)
  • Proposing PostgreSQL functions not available in project's version (incompatible APIs)
  • Suggesting AWS services when project uses Google Cloud (wrong cloud provider)
  • Inventing API endpoints that don't exist in external service (fake APIs)

This skill acts as a reality checker that:

  1. Loads project's tech stack from docs/project/tech-stack.md (single source of truth)
  2. Validates all technical suggestions against documented choices
  3. Verifies entities, APIs, packages exist in codebase or documentation
  4. Requires evidence/citations for all technical claims
  5. Blocks suggestions that violate documented architecture
  6. Corrects hallucinations with actual project technology

The result: Zero hallucinated tech decisions, implementation matches architecture, code that actually works.

<quick_start> <trigger_pattern> Auto-trigger when detecting these suggestion patterns:

Technology suggestions:

  • "Use [framework/library]" → Validate against tech-stack.md
  • "Install [npm package]" → Verify package exists, check compatibility
  • "Import from [module]" → Verify module exists in dependencies

API/Service suggestions:

  • "Call [API endpoint]" → Verify endpoint exists in API docs
  • "Use [external service]" → Confirm service in tech-stack.md
  • "Query [database function]" → Check function exists in DB version

Schema suggestions:

  • "Create [Entity] model" → Check if entity already exists
  • "Add [column] to [table]" → Verify table exists, column doesn't
  • "Define [interface]" → Check for existing similar types

Pattern suggestions:

  • "Follow [architecture pattern]" → Validate against system-architecture.md
  • "Use [design pattern]" → Check if pattern aligns with project conventions </trigger_pattern>

<basic_workflow> Step 1: Detect technical suggestion

  • AI: "Let's use Redux for state management"
  • Detected: Framework suggestion (Redux)

Step 2: Load tech stack from docs/project/tech-stack.md

# State Management
- **Library**: Zustand
- **Rationale**: Simpler than Redux, less boilerplate

Step 3: Validate suggestion against tech stack

  • Suggested: Redux
  • Documented: Zustand
  • Mismatch detected: HALLUCINATION

Step 4: Block hallucinated suggestion

🚨 HALLUCINATION DETECTED

Suggested: Redux for state management
Reality: Project uses Zustand (documented in tech-stack.md)

Reason for Zustand (from tech-stack.md):
- Simpler than Redux
- Less boilerplate
- Already integrated in project

Corrected suggestion:
Use Zustand for state management (as documented)

Evidence: docs/project/tech-stack.md, line 23

Step 5: Provide correct suggestion

  • AI: "I'll use Zustand for state management (project's documented choice)" </basic_workflow>

<immediate_value> Without hallucination-detector:

AI: "Let's use Redux for state management and Axios for HTTP"
Developer: *Implements Redux + Axios*
Code review: "Why Redux? We use Zustand. Why Axios? We use fetch wrapper."
Result: Wasted 3 hours, need to refactor entire implementation

With hallucination-detector:

AI: "Let's use Redux for state management"
Detector: "🚨 HALLUCINATION: Project uses Zustand, not Redux (tech-stack.md)"
AI: "Corrected: I'll use Zustand for state management"
Developer: *Implements with Zustand correctly*
Result: Correct implementation on first try, zero refactoring

</immediate_value> </quick_start>

Read the full file on GitHub · 1,184 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. 8d ago First seen · 1,184 lines · 83 tokens per session scan A 5d40ed974c10

Subscribe to this mod's changes

hallucination-detector is a skill published in the GitHub repository marcusgoll/Spec-Flow (93 stars, last pushed yesterday), licensed MIT. It adds 83 tokens to every session and 7,588 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

android-ui-journey-testing

XML-specified Android UI journey testing, interactive step execution, assertion verification, and JSON outcome reporting.

sickn33/agentic-awesome-skills · 27 tokens

agent-self-scheduling

Schedule AI agent runs with cron, loops, or external clocks while avoiding unsafe tight autonomous timers.

sickn33/agentic-awesome-skills · 24 tokens

clawd-animation-lite

A lightweight generator for short, 1–3 second pixel animations featuring Clawd, the Claude Code mascot, shown as a small coral-orange crab. It creates a complete HTML file that can be opened in a browser.

YiShu5/claude-skills · 190 tokens

clawd-animation

A generator for self-contained HTML pixel animations featuring Clawd, the pixel-style crab mascot of Claude Code. It turns a natural-language scene into a short looping browser animation with a background, character actions, props, and effects.

YiShu5/claude-skills · 208 tokens

HTMLHero.skill

A workflow for building a working, previewable first-page hero section—a prominent opening area of a website—from a prompt, brand direction, and visual requirements. It can work with HTML or React projects and treats the hero as the visual template for later pages.

YiShu5/claude-skills · 107 tokens

self-improving-agent

Low-noise self-improvement skill. Captures learnings, errors, and corrections into a local .learnings/ cache layer. Never auto-promotes to long-term memory files (SOUL.md, MEMORY.md, AGENTS.md, TOOLS.md). Promotion requires explicit user approval after repeated validation.

YiShu5/claude-skills · 68 tokens