Pkgtruth
Description
Ground truth about npm packages for AI coding agents. Catches hallucinated and slopsquatted dependencies before they reach your lockfile.
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
pkgtruth
[](https://www.npmjs.com/package/pkgtruth) [](https://github.com/hxckya/pkgtruth/actions/workflows/ci.yml) [](https://nodejs.org) [](LICENSE)
**Ground truth about npm packages, for AI coding agents and CI.**

Your agent just wrote `npm install unused-imports`. That package is not the linter plugin it meant. It is a name an attacker registered because models kept inventing it — and npm has since replaced it with a security placeholder.
`pkgtruth` catches that before it reaches your lockfile.
Why this exists
Large language models invent package names. Measured across models, **19.7% of generated package names were hallucinated**, and when researchers re-ran the prompts, **43% of those names came back every single time.**
That reproducibility is the whole attack. An attacker does not need to compromise a maintainer, poison a build server, or find a vulnerability. They watch what models invent, register the name, and wait. The technique is called **slopsquatting**, and it is already happening in the wild.
The standing security advice is that agents with package-management capabilities should not install anything without a review gate. `pkgtruth` is that gate, in a form an agent can call on its own.
Install
As an MCP server (for coding agents)
{
"mcpServers": {
"pkgtruth": {
"command": "npx",
"args": ["-y", "pkgtruth"]
}
}
}
Two tools become available:
| Tool | Use it when |
|---|---|
check_package |
About to add, import, or recommend one dependency |
check_dependencies |
About to write a package.json or run an install command |
As a CLI (f
Related Skills
Agency Agents
A complete AI agency at your fingertips - From frontend wizards to Reddit community ninjas, from whimsy inject
AI Awesome Llm Apps
100+ AI Agents, Agent Skills and RAG Apps - Free and Open Source.
AI Firecrawl
🔥 The API to search, scrape, and interact with the web for AI
AI Artifacts Builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web tech
AI Headroom
Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agen
AI CrewAI
Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewA
AI