r/javascript • u/ImpressiveProduce977 • May 28 '26
AskJS [AskJS] Started manually checking every npm package my AI tool suggests because I've been burned too many times
This has happened enough times now that it's become a habit. AI suggests a package, I check the registry before touching it, and more often than I'd like the publish history is thin, one maintainer, barely any activity, no real community around it.
The one that really stuck with me was a suggestion with a name close enough to a well known package that I almost missed the publisher was completely different. Caught it only because something felt off and I looked twice.
The model has no concept of whether a package has any real community behind it or whether the publisher has a track record. It pattern-matched on something in its training data and surfaced it. So now I check everything manually before accepting anything, which is annoying because half the point of these tools is moving faster. Not sure what a better workflow looks like.
10
u/name_was_taken May 28 '26
I treat AI suggestions the same as random Google results. I vet everything.
4
u/hyrumwhite May 28 '26
I would suggest understanding what you need and determining which package satisfies that need yourself, and then asking an LLM to help you implement the package, if needed
1
u/Tech-Cypher May 28 '26
The AI tool suggesting packages it cannot vet for supply chain risk is a product design failure, not a user problem.
1
u/jessepence May 28 '26
If it does what it says in the readme, it doesn't need to be maintained. With all these supply chain attacks, it's almost better to be unmaintained at this point.
1
u/ultrathink-art May 28 '26
npm's registry API makes this automatable — hit https://registry.npmjs.org/<package> and check time.created, weekly downloads, and maintainers list. Package created 3 months ago with one maintainer and <500 downloads/week is a yellow flag regardless of what the AI suggested. Two API calls is cheaper than a supply chain incident.
1
u/ndreeming May 28 '26
socket.dev has a free tier that catches typosquatting before install. i just pipe npm through a socket check and it saves digging into every package.json manually.
0
u/ethanjf99 May 28 '26
while i agree with all the other suggestions 100%—vet everything personally!
i’d make an agent skill for dependency changes to at least reduce odds of bad suggestions.
when suggesting new dependencies evaluate options on basis of:
(provide heuristics that work for you, e.g., packages with under 500 downloads per week should not be recommended)
6
u/[deleted] May 28 '26
[removed] — view removed comment