hallucination-guard

Verify imports, packages, and API calls in AI-generated code.

82|23|Updated Feb 24, 2026
One-click install
npx skills add https://github.com/Rune-kit/rune --skill hallucination-guard-rune-kit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hallucination-guard
Source: https://github.com/Rune-kit/rune/tree/main/skills/hallucination-guard
Command: npx skills add https://github.com/Rune-kit/rune --skill hallucination-guard-rune-kit

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill prevents AI-generated code from including non-existent imports, packages, functions, or API calls, thereby reducing bugs and security risks.

Core Features & Use Cases

  • Import Verification: Checks if imported modules and files actually exist in the project.
  • Package Validation: Ensures external packages are listed in the project's manifest and exist on registries.
  • API Signature Check: Verifies that API calls and function signatures match documentation.
  • Slopsquatting Defense: Detects and flags potentially malicious package names that mimic popular ones.
  • Use Case: After an AI generates new code for a feature, this skill runs automatically to ensure all its dependencies and references are valid before committing, preventing runtime errors and security vulnerabilities.

Quick Start

Run the hallucination-guard skill to verify all imports in the recently changed files.

Frequently Asked Questions about hallucination-guard

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I verify AI-generated code imports and packages actually exist?

Prevent AI code hallucinations by validating imported modules, verifying external packages against project manifests and registries, and checking API signatures to ensure all references exist before committing code.

What is a slopsquatting attack in AI code generation?

A slopsquatting attack occurs when AI code generation suggests malicious package names that mimic popular ones, and validation checks detect and flag these phantom packages to prevent security vulnerabilities.

How do I check if AI-generated API calls match the correct function signatures?

Check AI-generated API calls by verifying that function signatures and API calls match documentation, ensuring the accuracy of internal file paths, external package integrity, and API signature correctness against project files.

Can I validate external packages against registries without manual checks?

Yes, you can validate external packages automatically by ensuring they are listed in the project's manifest and exist on external registries, enforcing strict checks on package integrity to prevent hallucinated references.

When should I run validation on AI-assisted development code?

Run validation after an AI generates new code for a feature and before committing, ensuring all dependencies and references are valid to prevent runtime errors and security vulnerabilities in AI-assisted development.