Field report · 2

The made-up package names are in the instructions, not the code

I scanned 991 public repos built with AI coding agents. Like last time, their code didn't import a single made-up package. But their READMEs and agent instruction files contain 50,301 install and run commands, and 560 of the package names in them aren't on npm. Coding agents read those files and run those commands.

Method

How I picked the repos

The first report looked at 174 repos. This time I wanted a bigger sample, and repos where I could be sure an AI agent was involved. So I used GitHub code search to find repos that contain an agent instruction file, which is the file a coding agent reads before it starts working.

MarkerRead byRepos
AGENTS.mdCodex, Cursor, Copilot and others330
CLAUDE.mdClaude Code321
.cursor/rules, .cursorrulesCursor162
.windsurfrulesWindsurf77
.github/copilot-instructions.mdGitHub Copilot53
GEMINI.mdGemini CLI41
lovable-tagger in package.jsonLovable projects23

A repo can have more than one marker.

Code search found 11,220 repos. I kept the JavaScript and TypeScript ones that weren't forks or archived, and took the top 1,000 by stars. 991 scanned cleanly. These are mostly small projects: the median has 13 stars, and only 31 have more than 1,000. That's what code search returns, not a sample of the most popular repos on GitHub.

For each repo I did two things:

I only used public data: the GitHub API and the public npm registry. Nothing from these repos was executed, I didn't register any package names, and I'm not naming any repo.

Finding 01

Still no made-up imports in committed code

0
Organic hallucinations
Across 991 repos and 649,213 source files.
166
Repos with a flagged import
I opened every flagged name outside test folders. None was a made-up import.

Same result as in August, now with almost six times as many repos. When an AI makes up an import, the build fails the first time someone runs it, so it gets fixed before anyone commits.

Outside test folders, ghostimport flagged 141 names as missing from npm and free to register. I opened each one where it was imported:

What it actually wasNames
Not an import: an example in a comment, text in a string, or a method that happens to be called require53
An alias set up in the bundler or tsconfig.json that ghostimport didn't follow33
Test fixtures and benchmarks the folder filter missed30
A dependency installed from GitHub, a tarball or under another name ("zod-3": "npm:zod@…")15
A module provided by the host app or generated at build time9
estree, imported for its types, which come from @types/estree1

So every one was a false alarm, and most of them are ghostimport's fault. The four biggest causes are fixed in 0.7.3; see Finding 04.

Finding 02

The commands in docs and agent files name packages that don't exist

50,301
Package names in commands
In 759 repos. 4,871 different names.
560
Names not on npm
In 156 repos. 451 in install commands, 128 in npx-style runs (some in both).
32
In agent instruction files
In 24 repos. These are the ones an agent reads before it starts.

Most of the 560 are harmless once you look at them. They are placeholders like your-cli-package-name, packages a monorepo README tells you to install before they've been published, and sentences that just happen to start with npm.

But a person reads your-cli-package-name and knows it's an example. An agent that has been told to follow the README might just run it. And some of the names look exactly like what a model would invent:

ghostimport says up to 321 of the missing names could be registered by anyone, 18 of them in agent instruction files. That's an upper bound: ghostimport didn't check npm's punctuation rule at the time, and opencode shows that it matters. Since 0.7.4 it does. I'm not publishing the list.

Finding 03

Command names aren't package names, and someone has noticed

npx foo first looks for a command called foo in the project's installed packages. If there isn't one, for example in a fresh clone before npm install, it downloads and runs the npm package called foo. Many tools install a command whose name differs from the package name, so docs that say npx foo work on the author's machine and fetch something else everywhere else.

Command in docsThe tool it meansWhat npx fetches without itRepos
npx jsdoc2mdjsdoc-to-markdownA placeholder that prints a warning4
npx depcruisedependency-cruiserA placeholder that prints a warning3
npx cucumber-js@cucumber/cucumberA placeholder that prints a warning2
npx easeas-cliAn unrelated templating library from 2017, by another author3

The three placeholders were registered in July 2025 "to prevent dependency confusion". Their README points to Aikido Security's threat intelligence. I read their code and didn't run it: it only prints a warning. So someone is already registering these names before attackers do. That's good, but it only covers the names someone has spotted.

ghostimport rates all four as high risk. Since 0.7 its agent hook also checks npx, dlx and bunx runs, so it blocks these commands and tells the agent to find the real tool.

Finding 04

The scan found six bugs in ghostimport

Like in August, running the tool on real code found problems the tests didn't. The worst one would have made the agent hook block ordinary commands: it read npm install # Install dependencies as a request to install two packages, Install and dependencies.

BugWhat went wrong
Shell commentsWords after # were read as package names
Flag valuesThe value after --filter, -w, --prefix and similar flags was read as a package name
Local specspkg@workspace:*, link:, file: and portal: were treated as downloads from npm
Widely used packagesA package with millions of weekly downloads was rated high risk for having one version and one maintainer
Scoped names@ai-sdk/codemod was flagged as a typosquat of nodemon
Capital lettersNames with capitals were reported as free to register, but npm doesn't accept new names with capitals
Command names flaggedv0.7.1v0.7.2
Not on npm854 in 228 repos560 in 156 repos
Reported as free to register620321
Published, rated high risk320162

All six are fixed in 0.7.2, each with a test.

Fixed in 0.7.3

Checking the 141 import names in Finding 01 turned up four more bugs:

Fixed in 0.7.4

These three were still open when this report was published:

Scan log

Every scan behind these numbers

DateCorpusVersionResult
2026-11-14 991 agent-built repos · 649,213 files v0.7.2 0 organic hallucinated imports · 560 command names not on npm, 32 in agent files
2026-11-14 Same v0.7.1 854 command names not on npm · 6 bugs found, fixed in 0.7.2
2026-08-30 174 repos · 23,773 files v0.5.2 0 organic hallucinations · 1 name anyone could have registered, now reserved by Lovable · report

Check your own repo

You don't need my data. Scan your code, then look up the names in the install and npx commands in your README and agent files.

check it yourself
$ npx ghostimport@0.7.2 ./your-repo
$ npm view <name-from-a-command>   # a 404 means nobody has published it

If you write agent instructions, check the commands in them

An agent instruction file is a script someone else's agent will run. Every npx line in it should name the package that's on npm, not the command it installs, and every install line should name a package that exists. If you use Claude Code, the ghostimport hook checks each command before the agent runs it.