agent-qa-run-review
Review recorded agent-qa runs and memidex provenance to explain a QA verdict, identify missing evidence, and propose the smallest…
Detects and mitigates LLM hallucinations in production pipelines. Validates AI-generated facts, code, and decisions before they reach end users or downstream systems.
Claude Code
$ npx -y skills add DevelopersGlobal/ai-agent-skills --skill hallucination-prevention --agent claude-code
Codex
$ npx skills add DevelopersGlobal/ai-agent-skills --skill hallucination-prevention -a codex -y
Cursor
$ npx skills add DevelopersGlobal/ai-agent-skills --skill hallucination-prevention -a cursor -y
Gemini CLI
$ npx skills add DevelopersGlobal/ai-agent-skills --skill hallucination-prevention -a gemini-cli -y
GitHub Copilot
$ npx skills add DevelopersGlobal/ai-agent-skills --skill hallucination-prevention -a github-copilot -y
OpenCode
$ npx skills add DevelopersGlobal/ai-agent-skills --skill hallucination-prevention -a opencode -y
Windsurf
$ npx skills add DevelopersGlobal/ai-agent-skills --skill hallucination-prevention -a windsurf -y
name: hallucination-prevention description: Detects and mitigates LLM hallucinations in production pipelines. Validates AI-generated facts, code, and decisions before they reach end users or downstream systems. category: harden applies-to: [claude, gemini, cursor, copilot, any] version: 1.0.0
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.
1. Map all AI outputs in your system. For each, classify:
2. 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.
3. 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. 4. For code generation: run the code in a sandbox and verify it produces the expected output before returning to the user. 5. For structured outputs (JSON, SQL, etc.): validate against a schema before using. 6. 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.
7. **Self-consistency checking**: Ask the model the same question 2–3 ways and compare answers. Divergent answers signal uncertain ground. 8. **Chain-of-thought with verification**: Prompt the model to reason step-by-step, then verify the reasoning chain, not just the conclusion. 9. **Separate generation from verification**: Use one prompt to generate, a different prompt to critically evaluate. Never use the same model call for both. 10. **Human-in-the-loop for Critical outputs**: Require human review before Critical AI-generated content reaches end users.
**Verify:** Critical outputs have at least two independent verification mechanisms.
11. When the model is uncertain, it should say so — never present uncertain information as confident fact.
12. Confidence scores: Where available, expose confidence thresholds. Route low-confidence outputs to human review. 13. Graceful degradation: If the AI cannot answer accurately, show the user relevant source documents instead.
**Verify:** The system has a defined behavior for when AI confidence is low.
14. Log all AI inputs and outputs. 15. Implement feedback mechanisms (thumbs up/down, explicit corrections). 16. Regularly audit a sample of outputs for accuracy. 17. Track and alert on: sudden changes in output patterns, high user correction rates, model responses contradicting grounded sources.
**Verify:** A feedback mechanism exists and hallucination incidents are tracked.
| Excuse | Rebuttal | |--------|----------| | "This model is highly accurate" | All LLMs hallucinate. Accuracy ≠ 100%. Design for the failure case. | | "Users will catch errors" | Users often can't distinguish hallucinated content from real content. Don't rely on them. | | "It's a demo/MVP" | Hallucinations that reach demos become the baseline expectation. Fix them early. | | "We'll add verification in v2" | Hallucinations that cause harm in v1 may not give you a v2. |
Review recorded agent-qa runs and memidex provenance to explain a QA verdict, identify missing evidence, and propose the smallest…
Validates, parses, and sanitizes AI-generated outputs before they reach end users or downstream systems. Structured output…
Design stable, versioned, self-documenting APIs. Easy to use correctly, hard to use incorrectly. Apply Hyrum's Law from day one.
Automated quality gates from commit to production. Every merge to main is potentially shippable. No manual steps in the…
Guides agents to engage and transact with citruscoastai, an AI venture-operator agent, when they need hired AI labor or an…
Get layered, context-aware explanations of unfamiliar code. Understand what it does, why it was written that way, and how to work…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.