npm-supply-chain-check

npm-supply-chain-check is a skill for Codex from majiayu000/spellbook. It costs 88 tokens per session (1,294 once invoked), scanned A, original, MIT.

A read-only checker for known malicious npm package versions and signs of JavaScript dependency supply-chain attacks. It examines repositories, lockfiles, and installed packages.

In plain words
What is it for?
Use it to investigate npm compromises, suspicious install scripts, credential-stealing packages, or incidents such as Shai-Hulud.
Why use it?
It helps determine whether a project references a risky package without treating that reference as proof that malicious code ran. It also avoids exposing secret values.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use it to investigate npm compromises, suspicious install scripts, credential-stealing packages, or incidents such as Shai-Hulud.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/majiayu000/spellbook/npm-supply-chain-check
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add majiayu000/spellbook --skill npm-supply-chain-check
Clone the repo
git clone --depth 1 https://github.com/majiayu000/spellbook

Made for: 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-supply-chain-check

README.md
[![agentmods](https://agentmods.dev/badge/skills/majiayu000/spellbook/npm-supply-chain-check/github.svg)](https://agentmods.dev/skills/majiayu000/spellbook/npm-supply-chain-check)
Your own site
<a href="https://agentmods.dev/skills/majiayu000/spellbook/npm-supply-chain-check"><img src="https://agentmods.dev/badge/skills/majiayu000/spellbook/npm-supply-chain-check/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-supply-chain-check

Your own site · 80×15
<a href="https://agentmods.dev/skills/majiayu000/spellbook/npm-supply-chain-check"><img src="https://agentmods.dev/badge/skills/majiayu000/spellbook/npm-supply-chain-check.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 88 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,294 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00088 $0.01294
Opus 5.5 $0.00035 $0.00518
Sonnet 5.5 $0.00018 $0.00259
Haiku 4.5 $0.00009 $0.00129

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

Security

Grade A, and why

npm-supply-chain-check 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 3mo ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/scan_npm_supply_chain.py, tests/test_scan_npm_supply_chain.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/npm-supply-chain-check/SKILL.md · 140 lines

How it starts

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

NPM Supply Chain Check

Run an evidence-bounded, read-only scan. Distinguish a dependency reference from proof that malicious code executed, and never read or print secret values.

Workflow

1. Fix the scan boundary

Resolve the exact repository or directory first. Default to the current repository only. Do not silently expand a repo scan to the user's home directory, all worktrees, global package caches, or CI systems.

2. Check intelligence freshness

Read references/shai-hulud-2026-iocs.json when investigating that incident. It is a dated minimum baseline, not a complete list of every affected community package. For an active incident, also check current primary sources such as the npm registry and maintainer/security advisories before declaring a version safe. Do not modify the bundled baseline during an ordinary scan.

3. Run the deterministic scanner

From this skill directory:

python3 scripts/scan_npm_supply_chain.py <target> --format text

Use JSON when another tool will consume the result:

python3 scripts/scan_npm_supply_chain.py <target> --format json

Add --deep only when source and built JavaScript files should also be searched for network and campaign strings. Deep mode still reports paths and indicators, not surrounding file contents.

Exit codes are machine-checkable:

  • 0: scan completed and found no indicators in the checked scope.
  • 1: one or more affected versions or suspicious indicators were found.
  • 2: the scan could not complete because its target or IOC data was invalid.

4. Classify the evidence

Evidence Meaning
Affected version in a manifest or lockfile Exposure candidate; it does not prove installation or execution.
Affected version under node_modules Malicious package content may have been present locally.
Known malicious SHA-256 High-confidence local artifact match.
IOC preinstall command or campaign/network string Strong suspicious-content evidence; inspect provenance and timing.
IOC filename with a different hash Triage lead only; filenames such as setup.mjs can be legitimate.
No findings No known indicators in this scope and baseline; not proof of a clean machine.

Read the full file on GitHub · 140 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 3mo ago First seen · 140 lines · 88 tokens per session scan A ffe7b2dd9cce

Subscribe to this mod's changes

npm-supply-chain-check is a skill published in the GitHub repository majiayu000/spellbook (303 stars, last pushed 4d ago), licensed MIT. It adds 88 tokens to every session and 1,294 once invoked, about $0.0004 per session on Opus 5.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-09-03.

Related

npm-supply-chain-check compared with skills from other repositories

npm-supply-chain-check next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
npm-supply-chain-checkmajiayu000/spellbookSkill3034d agoMITA88Codex
cao-session-managementawslabs/cli-agent-orchestratorSkill1.9kyesterdayApache-2.0B83Claude Code
workflowzhinkgit/embeddedskillsSkill829yesterdayMITA65Claude Code
agent-deckasheshgoplani/agent-deckSkill1.4kyesterdayMITA63Claude Code, Codex
fast-resumeangristan/fast-resumeSkill198yesterdayMITA50Claude Code, Codex
pneuma-sessionpandazki/pneuma-skillsSkill1624d agoMITA127Claude Code, Codex
lov-organize-storagelovstudio/skillsSkill72todayMITA58Claude Code