# Hallucinated Package Checker: Stop Slopsquatting Installs

> Catches AI-invented and typo-squatted packages in your Python and JavaScript code before you install them: checks every new import against PyPI and npm, flags look-alike and brand-new names, and finds imports missing from your manifest.

Hallucinated Package Checker: Stop Slopsquatting Installs is a free AI agent skill on Agensi by Vijay Kumar, in Security. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Vijay Kumar](https://www.agensi.io/creators/vijay-kumar-1)
- Category: [Security](https://www.agensi.io/skills/security)
- Version: 1.1.0
- Last updated: 2026-12-03
- Security: scan passed (2026-12-03); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/hallucinated-package-checker-stop-slopsquatting-installs
- Tags: security, code-review, testing, slopsquatting, hallucinated-packages, typosquatting, supply-chain, pypi

## What it does

- Extracts new imports from a diff or a whole repo, ignoring the standard library and your own modules
- Checks each name against the live PyPI and npm registries and flags packages that do not exist
- Flags look-alike names one or two letters from a popular package and packages first published in the last 30 d
- Maps import names to install names, such as yaml to PyYAML, so real packages are not wrongly rejected
- Cross-checks imports against requirements, pyproject and package.json and lists any that are undeclared
- Reports a clear verdict with a replacement for every risky name, and fails closed when the network is down

## Who it's for

- **Developers using AI coding agents:** Get a safety check before running an install an AI suggested. Try: "Check the new dependencies in my last commit."
- **Code reviewers and tech leads:** Add a supply-chain pass to PR review. Try: "Review this diff for fake or suspicious packages."
- **Teams adopting AI-assisted coding:** Audit a whole repo once. Try: "Scan this repo and list imports that are not declared."

## About this skill

AI coding assistants sometimes invent package names that sound right. Attackers register those names on PyPI and npm and wait for someone to run `pip install` or `npm install`. This is called slopsquatting, and one wrong install can put malware on your machine or in your build.

**Hallucinated Package Checker** gives your agent a fixed routine for stopping it. It pulls every new import from your diff (or your whole repo), skips the standard library and your own modules, and looks each name up in the real registry. Anything that does not exist is a high-severity finding. Anything that exists but looks suspicious (a name one or two letters from a famous package, or a first release in the last month) is flagged for a human decision.

It also catches a quieter bug: imports that work on your machine but are not listed in `requirements.txt`, `pyproject.toml` or `package.json`.

The checker is a short, readable Python script using only the standard library. It makes read-only requests to two hosts, pypi.org and registry.npmjs.org, sends only package names, installs nothing and writes nothing. A network failure is reported as "unknown", never as safe.

**You end up with** a short report: which packages are real, which are missing or look-alikes (with the likely intended name), and which are undeclared, plus a block or pass verdict.

## Requires

- Python
- Git

## Known limitations

This checks if a package exists and is popular, but it cannot guarantee a real package is 100% safe. It currently only supports Python and JavaScript.

## Technical details

Files: `SKILL.md`, `README.md`, `scripts/verify_packages.py` (about 14 KB, standard library only), `references/manual-checks.md`, `examples/`. Exit codes: 0 clean, 1 missing/similar/undeclared, 2 unknown. Network allow-list is enforced in code (`ALLOWED_HOSTS`). Permissions to expect in the scan: network (two named hosts, GET only), file read.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Hallucinated Package Checker: Stop Slopsquatting Installs skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### What is a hallucinated dependency and how does this skill help me?

This skill protects you from slopsquatting, which happens when hackers register fake software names that an AI might accidentally invent. It checks your code for Python or JavaScript imports and verifies them against official registries before you install them.

### Do I need any special accounts or software to use this?

You only need to provide your code, a list of package names, or a link to your project files. The skill includes a script that automatically connects to the official Python and JavaScript databases to verify the tools you are using.

### What kind of report will I receive after the check is finished?

You get a clear report that marks each tool as safe, missing, or suspicious. If it finds a fake or misspelled package, it will tell you to remove it or suggest the correct name of the real tool you likely intended to use.

### Can this skill check packages for any programming language?

This skill currently supports Python and JavaScript packages found on PyPI and npm. While it provides a manual checklist for other languages like Go or Java, it does not perform automated checks for those ecosystems yet.

### How should I tell my AI agent to start a check?

You can ask your agent to check these dependencies, review a specific file for new imports, or audit your entire project directory. It is best used whenever you are reviewing code written by an AI or before running an install command you do not recognize.

### If a package is marked as okay, does that mean it is completely safe to use?

A safe result means the package exists and has a established history, but it does not mean the code inside is perfect. You should treat an okay status as proof the package is real rather than a full security audit of the software itself.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
