FGuerreir0

Ghostimport β€” AI skill for Claude Code

AI community

πŸ‘» Detects ghost imports β€” npm packages that don't exist, hallucinated by AI coding tools like Cursor, Copilot, and Claude.

How to install Ghostimport

This entry records only its repository, not the path inside it, so there is no exact command to give. Open FGuerreir0/ghostimport and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Ghostimport does

πŸ‘» Detects ghost imports β€” npm packages that don't exist, hallucinated by AI coding tools like Cursor, Copilot, and Claude.

Alternatives in AI

  • Ante β€” Ghost in your shell 1.9k β˜…
  • CLI Continues β€” resume any AI coding session in another tool β€” Claude Code, Copilot, Gemini, Codex, Cursor 1.5k β˜…
  • Claude Skill Web Clone β€” Methodology for faithfully cloning any website (static / React / WebGL) β€” without copying AI-hallucinated code 969 β˜…

README

ghostimport logo

ghostimport

Stops your AI coding agent from installing npm packages that don't exist.

CI npm ghostimport Buy me a coffee

How the attack works β†’


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