A checklist before installing an npm package or a VS Code extension

Six checks for an npm package and five for a VS Code extension, each one you can do by hand — and which of them RepoGates answers first.

The short answer. Before you install an npm package, check its exact name, look it up in OSV's malicious-package records, read its install scripts, and check its declared repository, its age and who published its latest version. Before you install a VS Code extension, check the publisher's verified domain, its installs against its age, its name, its source and its manifest.

Last reviewed . Nobody can tell you a package or an extension is safe; these checks tell you whether it is trustworthy enough to install.

Before you install an npm package

A package that runs code when it is installed, published under a name one letter away from a popular one, or taken over from its maintainer, reaches you the moment npm install runs — and an AI coding agent may type that command for you.

  1. Check the exact name. Compare the package name letter by letter with the package you meant. A name one edit away from a popular package is the typosquat shape.
  2. Look it up in OSV's malicious-package records. Search osv.dev for the package name. A MAL- record means the package has been reported as malicious.
  3. Look for code that runs at install time. Open the package's package.json and read its preinstall, install and postinstall scripts, which npm runs when it installs the package. A script that downloads code and runs it is the most serious shape.
  4. Check the source repository it declares. Open the repository the package declares and check that its own manifest names this package. A popular repository that does not name the package is the starjacking shape; no repository at all on a new package is a finding of its own.
  5. Check its age and who published the latest version. Check when the package was first published, whether the latest version came from a publisher who published none before it, and whether it was released after a year of silence — the shape a taken-over account leaves.
  6. Pin the version you checked. Install the exact version you reviewed, so a later release cannot change what installs.

Before you install a VS Code extension

An extension runs inside your editor with your files, your terminal and your credentials in reach. Is this VS Code extension safe? explains each check at more length.

  1. Check the publisher's verified domain. Every Marketplace publisher shows as verified, so look for a verified domain, which ties the publisher to an organisation you can look up.
  2. Check that its installs fit its age. A listing a few days old with tens of thousands of installs is the shape of bought traction.
  3. Compare its name with the one you meant. Compare the publisher and the name with the extension you meant; cloned listings copy the icon and the description too.
  4. Find its source, and check the owner is the publisher. A linked repository lets you check what you are installing. No link at all is common for closed-source tools from verified vendors, and a warning on anything else.
  5. Read what its manifest declares. The manifest says whether it executes code, which events wake it, which proposed APIs it opts into and which other extensions it pulls in.

Where RepoGates does a step for you

What it covers, and what it cannot

The package checks do not read a package's code or what the package installs after it, and the extension checks read the listing and the package's file list, not its code; a deep scan reads the files. A PASS means every check that could run, ran, and none fired — never a guarantee.

The browser extension does not see git clone, package managers or curl — outside Claude Code with the RepoGates plugin, whose hook refuses a clone or install that names a blocked repository on the command line, before it runs. The plugin's hook sees Bash tool calls in Claude Code and nothing else: it does not see a command you type in your own terminal or one another agent runs. Edit and Write are read for one thing only — an API key about to be saved — checked on the machine and never sent; that guard asks, it never denies. An extension installed from the editor's own Extensions pane is not a shell line, so no hook sees it. On npmjs.com pages the verdict is answered through the agent surfaces, not the browser board.

Questions

Is it safe to install npm packages from unknown authors? Nobody can promise that of a package. An unknown author is not a finding by itself; what you can check is whether a malicious-package record names it, whether it runs code at install time, whether its declared repository names it, how old it is and who published its latest version.

Are VS Code extensions safe to install? An extension runs inside your editor with your files, your terminal and your credentials in reach, and malicious ones have been published under names one letter away from popular ones. Check the publisher's verified domain, its installs against its age, its name, its source and what its manifest declares before you press Install.

Does RepoGates read a package's code? Not on these checks. The twelve npm and PyPI checks read the registry's own record, never the package's code or what it installs after it, and the VS Code checks read the listing and the package's file list. A deep scan reads the files, priced in credits.

Set up the Claude Code plugin Add to Browser — it's free Plans

The package and extension checks run on the paid plans, through the MCP server and the Claude Code plugin. The browser extension is free to start.

Adding a skill, a Claude Code plugin or an MCP server instead? Read how to check a Claude Code skill is safe before installing it and how to vet an MCP server before connecting it. A GitHub repository? Read is this GitHub repo safe?