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.5 $0.00033 $0.03035
Sonnet 5.5 $0.00017 $0.01518
Haiku 4.5 $0.00008 $0.00759

Measured 2mo ago against content hash 5d40ed974c10, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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. 2mo 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 (97 stars, last pushed 2mo ago), licensed MIT. It adds 83 tokens to every session and 7,588 once invoked, about $0.0003 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

hallucination-detector compared with skills from other repositories

hallucination-detector next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
hallucination-detectormarcusgoll/Spec-FlowSkill972mo agoMITA83Claude Code
llm-evaluationsickn33/agentic-awesome-skillsSkill51kyesterdayMITA25Claude Code
agent-harness-fault-injectionsickn33/agentic-awesome-skillsSkill51kyesterdayMITA34Claude Code
apify-youtube-transcript-scrapersickn33/agentic-awesome-skillsSkill51kyesterdayMITA48Claude Code
ariasickn33/agentic-awesome-skillsSkill51kyesterdayMITA18Claude Code
apify-competitor-intelligencesickn33/agentic-awesome-skillsSkill51kyesterdayMITA39Claude Code
mcp-tool-developersickn33/agentic-awesome-skillsSkill51kyesterdayMITA38Claude Code