Ghostimport
Description
๐ป Detects ghost imports โ npm packages that don't exist, hallucinated by AI coding tools like Cursor, Copilot, and Claude
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
ghostimport
Stops your AI coding agent from installing npm packages that don't exist.
Your agent invents a package name. It doesn't exist on npm *yet*. Someone is watching for exactly that, and the moment they register it, `npm install` runs their `postinstall` script on your machine.
This is **slopsquatting**. `npm audit`, Snyk and Socket don't catch it โ they only inspect packages you've already installed. ghostimport checks names against the live registry at the moment your agent writes or installs them.
$ ghostimport
Scanned 142 files ยท 38 packages
โ react-server-fetch does not exist on npm
โณ src/data/loader.ts
โณ unregistered โ anyone could claim this name with a malicious postinstall
โ axois high risk
โณ src/api/client.ts
โณ 1-2 chars from 'axios' โ likely a typo
โณ has postinstall script โ runs code on npm install
created 2019-08-29 ยท 1245/week ยท 1 version
2 problems found.
Install
npm install -g ghostimport # or: npx ghostimport
Node.js 22+. Zero runtime dependencies โ the published package uses only Node built-ins.
Use it w
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