hallucination-guard
Installation
SKILL.md
hallucination-guard
Purpose
Post-generation validation that verifies AI-generated code references actually exist. Catches the 42% of AI code that contains hallucinated imports, non-existent packages, phantom functions, and incorrect API signatures. Also defends against "slopsquatting" — where attackers register package names that AI commonly hallucinates.
Triggers
- Called by
cookafter code generation, before commit - Called by
fixafter applying fixes - Called by
preflightas import verification sub-check - Called by
reviewduring code review - Auto-trigger: when new import statements are added to codebase
Calls (outbound)
Exception: L3→L3 coordination
research(L3): verify package existence on npm/pypi