Package Reality Check

Did your AI assistant just invent that package?

Code assistants recommend dependencies with total confidence, and a surprising share of them do not exist. Attackers register those invented names and wait for the next person to run pip install. Paste your dependencies below and check every one against the real registries before anything touches your machine.

Queries go from your browser straight to npm and PyPI. Nothing else sees your code.

👻 What package hallucination is

Large language models complete patterns. When a task calls for a package that handles JWT authentication for FastAPI, a model may produce a plausible name whether or not anyone published it. A USENIX Security study of 576,000 generated code samples reported average hallucination rates of at least 5.2% for commercial models and 21.7% for open-source models, including 205,474 unique invented package names.

Repeated phantom names create an opening for slopsquatting: someone can register a suggested name and wait for later users to install it. Package existence is therefore worth checking separately from vulnerability data.

🚦 What the verdicts mean

VerdictMeaning
PHANTOMThe package is not in the registry. If a tool suggested it, the name was likely invented. Never pre-create internal names publicly; a squatter can claim them.
DANGERThe package exists, but it is both a near-miss of a popular name and young or barely downloaded. That combination is the classic squatting profile.
CHECKRegistered recently, rarely downloaded, deprecated, or one edit away from a popular package. Usually fine, worth thirty seconds of review.
OKEstablished package. This says nothing about its quality, only that it is real and not an obvious impostor.

🕵️ What this tool checks

🛡️ How to protect yourself beyond this page

⌨️ Use it from your terminal or CI

The same checks run outside the browser as a zero-dependency command line tool and a GitHub Action, so a hallucinated dependency is caught before anything installs.

Check a project

npx github:JaydenYoonZK/package-reality-check

Reads the dependency manifests in the current folder (package.json, requirements.txt, pyproject.toml) and checks every name against the live npm and PyPI registries. Pass a path to check another project.

Fail the build on danger

npx github:JaydenYoonZK/package-reality-check --fail-on danger

Exits non-zero at your chosen severity: phantom, danger, warn, or never. Add --json for pipelines and --include-code to also scan import statements in source files.

One step in a workflow

- uses: JaydenYoonZK/package-reality-check@v1

The GitHub Action runs the same check on pull requests before dependencies install. The full workflow example lives in the README.

Full flags and the Action inputs are in the README.

💬 Frequently asked questions

No. Parsing happens in your browser, and the only network requests are package-name lookups sent directly to npm and PyPI. The source contains the complete browser and registry logic.

No, it is the expected result: the tool only sees public registries. It is also a useful prompt to check that your internal name is protected from public registration.

Edit distance cannot read intent. Forks and legitimately similar names will occasionally trip the check. The verdict text always says what the similarity is, so you can decide in seconds.

npm and PyPI. Other ecosystems are tracked on the issue tracker.

🌱 Why I built this

A code suggestion once handed me a package name that did not exist, one letter away from one that did. Registering that name would take a squatter a few minutes. Checking dependencies by hand got old fast, so I built the check I wanted to run before every install.