hallucination-guard

Solid

Verify AI-generated imports, API calls, and packages actually exist. Use when finishing AI-generated code that introduces new imports or external API calls — auto-fires after fix/cook to catch phantom functions, non-existent packages, and slopsquatting attacks.

DevOps & Infrastructure 81 stars 23 forks Updated 3 days ago MIT

Install

View on GitHub

Quality Score: 88/100

Stars 20%
64
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# 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 `cook` after code generation, before commit - Called by `fix` after applying fixes - Called by `preflight` as import verification sub-check - Called by `review` during 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 ## Called By (inbound) - `cook` (L1): after code generation, before commit - `fix` (L2): after applying fixes - `preflight` (L2): import verification sub-check - `review` (L2): during code review - `db` (L2): verify SQL syntax and ORM method calls are real - `review-intake` (L2): verify imports in code submitted for review - `skill-forge` (L2): verify imports in newly generated skill code - `adversary` (L2): verify APIs/packages in plan actually exist ## Execution ### Step 1 — Extract imports Use `Grep` to find all import/require/use statements in changed files: ``` Grep pattern: ^(import|require|use|from)\s Files: changed files passed as input Output mode: content ``` Collect every imported module name and file path. Separate into: - In...

Details

Author
Rune-kit
Repository
Rune-kit/rune
Created
5 months ago
Last Updated
3 days ago
Language
JavaScript
License
MIT

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category