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 DevelopersGlobal/ai-agent-skills --skill hallucination-preventiongit clone --depth 1 https://github.com/DevelopersGlobal/ai-agent-skillsWrote 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/developersglobal/ai-agent-skills/hallucination-prevention)<a href="https://agentmods.dev/skills/developersglobal/ai-agent-skills/hallucination-prevention"><img src="https://agentmods.dev/badge/skills/developersglobal/ai-agent-skills/hallucination-prevention/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/developersglobal/ai-agent-skills/hallucination-prevention"><img src="https://agentmods.dev/badge/skills/developersglobal/ai-agent-skills/hallucination-prevention.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.00038 | $0.01166 |
| Opus 5 | $0.00019 | $0.00583 |
| Sonnet 5 | $0.00008 | $0.00233 |
| Haiku 4.5 | $0.00004 | $0.00117 |
Grade A, and why
hallucination-prevention 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 10d 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 — 104 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Overview
LLMs hallucinate — they generate plausible-sounding but factually incorrect content with high confidence. In production systems, hallucinations cause incorrect medical advice, broken code, wrong legal citations, fabricated API calls, and erroneous financial data.
This skill builds hallucination detection and mitigation into your AI pipeline architecture — before output reaches users or downstream systems.
When to Use
- Any AI pipeline where factual accuracy matters
- When agents generate code, SQL, or API calls that will be executed
- When agents retrieve information that will influence decisions
- RAG (Retrieval-Augmented Generation) systems
- Agentic pipelines with tool use and multi-step reasoning
Process
Step 1: Classify Your Hallucination Risk
- Map all AI outputs in your system. For each, classify:
- Critical: Incorrect output causes harm (medical, legal, financial, code execution)
- High: Incorrect output wastes significant user/system resources
- Medium: Incorrect output is annoying but recoverable
- Low: Incorrect output is cosmetic
- Apply this skill's full rigor to Critical and High outputs. Lighter checks for Medium and Low.
Verify: Every AI output in your pipeline has a hallucination risk classification.
Step 2: Ground LLM Outputs
- For factual queries: always provide source documents in the prompt (RAG pattern). Instruct the model to cite sources and refuse to answer if the information isn't in the provided documents.
- For code generation: run the code in a sandbox and verify it produces the expected output before returning to the user.
- For structured outputs (JSON, SQL, etc.): validate against a schema before using.
- For numerical claims: require the model to show its work step-by-step and verify key calculations independently.
Verify: Every Critical/High output is grounded in provided sources or verified by execution.
Step 3: Build Verification Layers
- Self-consistency checking: Ask the model the same question 2–3 ways and compare answers. Divergent answers signal uncertain ground.
- Chain-of-thought with verification: Prompt the model to reason step-by-step, then verify the reasoning chain, not just the conclusion.
- Separate generation from verification: Use one prompt to generate, a different prompt to critically evaluate. Never use the same model call for both.
- Human-in-the-loop for Critical outputs: Require human review before Critical AI-generated content reaches end users.
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.
- 10d ago First seen · 104 lines · 38 tokens per session scan A 478385e375e6
hallucination-prevention is a skill published in the GitHub repository DevelopersGlobal/ai-agent-skills (66 stars, last pushed 4mo ago), licensed MIT. It adds 38 tokens to every session and 1,166 once invoked, about $0.0002 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-08-30.
Other skills, from other repositories
data-engineering
Guides data pipeline design, ETL/ELT workflows, schema evolution, and data quality assurance. Use when building data pipelines, designing data warehouses, migrating schemas, or ensuring data integrity across systems. Use when you need reliable, testable, and observable data flows.
ai-ops
Guides operational excellence for AI/ML systems in production. Use when deploying models, managing inference infrastructure, monitoring model drift, or maintaining AI-powered features. Use when you need reliable, observable, and governable machine learning systems.
code-review-and-quality
Conducts multi-axis code review. Use before merging any change. Use when reviewing code written by yourself, another agent, or a human. Use when you need to assess code quality across multiple dimensions before it enters the main branch.
constraint-driven-development
Establishes a project's quality bar as a written contract and stops agents quietly lowering it. Interviews the user on which dimensions matter, supplies sane default thresholds when they have no number in mind, records everything in CONSTRAINTS.md, and watches the diff for a weakened bar — new @ts-ignore or…
performance-optimization
Optimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks.
api-and-interface-design
Guides stable API and interface design. Use when designing APIs, module boundaries, or any public interface. Use when creating REST or GraphQL endpoints, defining type contracts between modules, or establishing boundaries between frontend and backend.