anti-library-hallucination

Validate package names and version pins against external registries.

Updated Jun 27, 2026
One-click install
npx skills add https://github.com/coff33ninja/ai-skills-mcp --skill anti-library-hallucination
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: anti-library-hallucination
Source: https://github.com/coff33ninja/ai-skills-mcp/tree/main/skills/anti-library-hallucination
Command: npx skills add https://github.com/coff33ninja/ai-skills-mcp --skill anti-library-hallucination

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill prevents suggesting non-existent packages, fabricated library names, and invalid version pins, safeguarding against typosquatting and slopsquatting risks.

Core Features & Use Cases

  • Prevent Non-Existent Packages: Ensures that package names suggested do not correspond to non-existent packages.
  • Guard Against Typosquatting: Protects against suggestions that could be considered typosquatting or slopsquatting.
  • Version Pinning Rules: Enforces rules for version pinning to avoid suggestions of non-existent version strings.
  • Typos and Misspellings: Alerts when a possible typo is detected and asks for clarification.
  • Year-Based and Adjective-Based Requests: Provides guidance on handling requests based on hypothetical scenarios like "a library from 2025."

Quick Start

Use the anti-library-hallucination skill to verify the existence of a package before suggesting it.

Frequently Asked Questions about anti-library-hallucination

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

FAQPage Schema
How do I prevent suggesting non-existent packages during code development?

To prevent suggesting non-existent packages, you can validate suggested library names against external registries like npm, PyPI, or Cargo before recommending them. This ensures only valid packages are suggested.

What is typosquatting and how can I protect against malicious package suggestions?

Typosquatting involves creating malicious packages with names similar to popular libraries. You can protect against typosquatting by detecting possible typos and alerting developers to ask for clarification before installing the package.

How do I validate version pinning to avoid non-existent version strings?

You validate version pinning by enforcing rules that check version strings against the package registry. This stops the suggestion of fabricated versions and ensures pinned versions actually exist in the registry.

Does this package validation approach work with npm, PyPI, and Cargo registries?

Yes, this package validation approach works with npm, PyPI, and Cargo. It requires connecting to these external package registries to verify the existence and version history of any suggested library.

How should I handle AI requests for hypothetical libraries like a package from 2025?

When handling requests for hypothetical libraries like a package from 2025, the system provides specific guidance to avoid fabricating packages. It flags these year-based or adjective-based requests as invalid until verified.