AI pulled in 12 packages where 3 would do
A practical fix and a copyable AI coding prompt. Replace bracketed placeholders with your project details.
1. Check the problem
Agents reach for a new package instead of a few lines of code, leaving overlapping or vulnerable dependencies you never chose. Run `npm audit`, list dependencies, and drop the redundant ones. Tell the agent not to add one without asking.
2. Use the prompt
Audit this project's dependencies. Run npm audit (or pip-audit), then list every direct dependency with: is it still maintained, does it overlap with another one, and could it be replaced by the standard library or a few lines of code? Recommend which to remove, remove them, and run the tests. From now on, don't add a dependency without asking me first.3. Verify the fix
Review the proposed diff, run the relevant checks and exercise the original failing flow before merging.
Continue in the related workflow chapter or read the longer explanation.