npm-safe-scan

npm-safe-scan is a skill for Claude Code, Codex from nisconder/npm-safe. It costs 128 tokens per session (2,679 once invoked), scanned A, original, Apache-2.0.

A security checker for npm packages, which are reusable JavaScript components installed from the npm package registry. It examines package information and README files for signs such as suspicious install scripts, lookalike names, exposed secrets, and unsafe download links.

In plain words
What is it for?
Use it before running npm, Yarn, or pnpm install or upgrade commands to check the package name and version, review the reported risk level, and use locally cached results when available.
Why use it?
It helps identify supply-chain risks before a package is installed or upgraded. A clean result only means no configured warning was found in the checked information; it does not prove the package is safe.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is node packages/core/dist/cli/cli.js ....

Good fit Use it before running npm, Yarn, or pnpm install or upgrade commands to check the package name and version, review the reported risk level, and use locally cached results when available.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/nisconder/npm-safe
agentmods
npx agentmods add skills/nisconder/npm-safe/npm-safe-scan

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for npm-safe-scan

README.md
[![agentmods](https://agentmods.dev/badge/skills/nisconder/npm-safe/npm-safe-scan/github.svg)](https://agentmods.dev/skills/nisconder/npm-safe/npm-safe-scan)
Your own site
<a href="https://agentmods.dev/skills/nisconder/npm-safe/npm-safe-scan"><img src="https://agentmods.dev/badge/skills/nisconder/npm-safe/npm-safe-scan/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for npm-safe-scan

Your own site · 80×15
<a href="https://agentmods.dev/skills/nisconder/npm-safe/npm-safe-scan"><img src="https://agentmods.dev/badge/skills/nisconder/npm-safe/npm-safe-scan.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 128 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,679 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00128 $0.02679
Opus 5 $0.00064 $0.01340
Sonnet 5 $0.00026 $0.00536
Haiku 4.5 $0.00013 $0.00268

Measured 10d ago against content hash 3f3e836dd3b8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

npm-safe-scan scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/core/skill/npm-safe-scan/SKILL.md · 210 lines

How it starts

The opening of the file, as written. The whole thing — 210 lines — stays where its author put it; the contents beside it link to each section on GitHub.

npm-safe-scan

This skill invokes the npm-safe CLI to statically and semantically analyze published npm metadata and README content for supply-chain security risks. The engine inspects suspicious install and lifecycle scripts, obfuscation signals, typosquatting and homograph lookalikes, exposed secrets, malicious binary links, and registry mismatches, then assigns a security score and severity level. Results are cached in a local SQLite database (default ~/.npm-safe/npm-safe.db), requests are rate-limited to respect the registry, and everything runs locally with no external server required. The current engine does not inspect package tarball source, so never describe a clean result as proof that a package is safe.

Core rule: check before you install

Whenever the user wants to install, add, or upgrade an npm package (including transitive dependencies of something they install), run a security check FIRST:

  1. Identify the package name and version.
  2. Run npm-safe check <name> (add --refresh if a cached result may be stale).
  3. Interpret the result:
    • safe — no configured signal was detected in the current metadata/README inspection boundary. Proceed only if the user's normal dependency policy permits it.
    • suspicious — mention the findings and recommendations; install only with user consent.
    • dangerous or unknown — do not install silently. Report the findings (rule, message, recommendation) and ask the user whether to continue.
  4. After installing a package the user picked, you may record it: npm-safe watch add <name> if they want ongoing monitoring.

For a project-wide safety gate (e.g. before committing a lockfile change), run npm-safe ci --lockfile and act on the exit code (0 = pass, 2 = dependency reached the fail threshold).

When the user runs the install themselves (or the gate is enabled), they can use npm-safe install <pkg...> — it checks every package and asks for manual confirmation when a package scores below the threshold (default 85, configurable via npm-safe gate set-threshold).

Read the full file on GitHub · 210 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 210 lines · 128 tokens per session scan A 3f3e836dd3b8

Subscribe to this mod's changes

npm-safe-scan is a skill published in the GitHub repository nisconder/npm-safe (5 stars, last pushed 7d ago), licensed Apache-2.0. It adds 128 tokens to every session and 2,679 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

edgeone skill scanner

A local static scanner that checks agent-skill files for security risks before they are installed or used. Static analysis examines files without running them.

Tencent/AI-Infra-Guard · 148 tokens

datamol

Pythonic wrapper around RDKit with simplified interface and sensible defaults. Preferred for standard drug discovery including SMILES parsing, standardization, descriptors, fingerprints, clustering, 3D conformers, parallel processing. Returns native rdkit.Chem.Mol objects. For advanced control or custom parameters…

synthetic-sciences/openscience · 67 tokens

clinicaltrials-database

Query ClinicalTrials.gov via API v2. Search trials by condition, drug, location, status, or phase. Retrieve trial details by NCT ID, export data, for clinical research and patient matching.

synthetic-sciences/openscience · 47 tokens

esm

Comprehensive toolkit for protein language models including ESM3 (generative multimodal protein design across sequence, structure, and function) and ESM C (efficient protein embeddings and representations). Use this skill when working with protein sequences, structures, or function prediction; designing novel…

synthetic-sciences/openscience · 86 tokens

pysam

Genomic file toolkit. Read/write SAM/BAM/CRAM alignments, VCF/BCF variants, FASTA/FASTQ sequences, extract regions, calculate coverage, for NGS data processing pipelines.

synthetic-sciences/openscience · 47 tokens

openalex-database

Query and analyze scholarly literature using the OpenAlex database. This skill should be used when searching for academic papers, analyzing research trends, finding works by authors or institutions, tracking citations, discovering open access publications, or conducting bibliometric analysis across 240M+ scholarly…

synthetic-sciences/openscience · 76 tokens