Urgent.News

What's breaking now, across hundreds of outlets.

AI

Your AI Agent Just Added 4 npm Packages You've Never Heard Of: 7 Tools to Check Them Before You Merge (2026)

The agent's summary says "Done, tests pass." Then you open the diff and package.json has four new dependencies you have never heard of, one of them pulled in to pad a string. AI coding agents are great at solving the problem in front of them, and npm install is often the fastest way to do that. Here's the short checklist I'd run before that PR merges, with the tool for each question. Question 1:…

The AI coding agent recently added four new npm packages to a project, leaving the developer intrigued about the reasoning behind these additions. Before merging the pull request, the developer decided to run a series of checks to ensure the packages are safe and necessary.

Firstly, the developer used Socket to scan the packages for supply chain risks such as malware, typosquats, and other risky behaviors. This tool is available free of charge for solo developers and small teams, with a paid Team plan for larger teams.

Secondly, the developer ran OSV-Scanner, a free tool that checks the lockfile against the open OSV.dev vulnerability database. This can be done locally or within a Continuous Integration (CI) environment to ensure every agent branch undergoes the same check.

To understand why the new packages were installed, the developer employed npm explain. This tool is pre-installed with npm and prints the chain of dependencies that led to the package's inclusion. If the agent had added a duplicate package, this would be evident with npm explain.

Next, the developer used Knip to identify any unused dependencies and files in the JavaScript and TypeScript project. This free tool comes with over 200 plugins for popular tools like Next.js, Vite, Vitest, and ESLint, ensuring a thorough analysis of the project's dependencies.

For cost considerations, Bundlephobia was used to determine the impact on the project's bundle size. By inputting the package name, developers can see how much the new additions would increase the bundle size. This free tool is perfect for frontend code.

Finally, if the developer believes the agent should reevaluate its choice, TokenBar comes in handy. This Mac menu bar app tracks usage and reset times for various AI coding agents, allowing developers to decide when it's appropriate to request a package addition. TokenBar, which is built on open source code (MIT license), offers a Basic subscription for $5 a month and a Pro lifetime subscription for $15.

Lastly, to ensure continuous updates, the developer utilized Renovate, an open source tool that automatically opens pull requests to update dependencies and lockfiles according to a chosen schedule. Renovate also finds package files in monorepos and can propose replacements for deprecated packages. This tool works across various platforms including GitHub, GitLab, Bitbucket, and others, making it a valuable asset for maintaining updated dependencies.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

More from Dev.to on urgent.news

Get the news by email. Yesterday's most-covered stories, every morning.

See today's edition · More options

More in AI

Better AI Stock: Anthropic vs. Nvidia

Anthropic may be the most exciting AI company on the market, but Nvidia gets paid every time Claude grows, and its shares cost far less for each dollar of expected earnings.

More from Saturday, 5 December 2026 →