/dependencies:install-scriptsfrom dependencies
Blocks dependency install scripts (preinstall, install, postinstall) for npm and uv by default, then allowlists only the few packages that need them. Use when hardening a project against compromised releases or unwanted lifecycle scripts.
Ships in dependencies. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Installing a package should copy files. A preinstall, install, or
postinstall script makes it run code instead - with your shell, your
environment, your CI token, and your ~/.ssh, before anyone has read a line of
the package. The Shai-Hulud worm propagated exactly this way, out of a
transitive dependency nobody chose.
Almost no package needs it. In one 437-package tree, two do: esbuild and
fsevents, both distributing native binaries. That ratio is what makes the fix
cheap - deny every script by default, then allowlist the handful that
build something, each with its reason beside it.
Read the flags off the installed tool: npm help config, uv sync --help.
Read it out of the lockfile, with nothing installed:
jq -r '.packages | to_entries[] | select(.value.hasInstallScript) | .key' package-lock.json
uv sync --no-build --no-install-project --dry-run
hasInstallScript flags preinstall, install, and postinstall. It does not
flag prepare, which runs for git and path dependencies - read the manifest of
each dependency pulled from a git URL.
uv has no postinstall. Python code runs at install time when a source
distribution builds, so the script surface is the set of dependencies with no
wheel, and the --dry-run above names one per run.
Do the same for the project's own scripts
(grep -nE '"(pre|post)?[a-z]+"\s*:' package.json), because the deny in step 2
catches those too.
Done when every package that executes code at install time is listed with what it builds and whether the project needs it, and the project's own lifecycle scripts sit beside that list.
For npm, commit it so CI, contributors, and image builds share one setting:
# .npmrc
ignore-scripts=true
For uv, put it on the install command - UV_NO_BUILD=1 covers a whole job:
uv sync --locked --no-build --no-install-project
--no-build refuses to build any source distribution, including the project
itself. Put --no-install-project beside it, then install the project in a
second step without the flag: its build backend is code you wrote.
Cover every install site - CI, image builds, task runners, deploy scripts -
which the frozen-install skill's step 1 grep finds. In a Dockerfile, copy
.npmrc in before the install layer, or the deny does not apply.
For a manager this skill omits, the vocabulary is onlyBuiltDependencies with
pnpm approve-builds (pnpm 10 denies by default), trustedDependencies
(bun), and enableScripts: false with dependenciesMeta.<pkg>.built (Yarn
2+).
Done when every install site denies scripts through committed config or an explicit flag, and the deny reaches the image build.
Rebuild the needed packages by name, right after the install that skipped them:
npm ci
npm rebuild --ignore-scripts=false --foreground-scripts esbuild fsevents
A project-wide ignore-scripts=true applies to npm rebuild as well, so
without --ignore-scripts=false the rebuild reports success and runs nothing at
all. --foreground-scripts prints what each script did so you can confirm it
ran.
uv has no per-package allowlist: --no-build-package denies more, and nothing
permits less. A dependency with no wheel leaves three choices - replace it,
build and host a wheel yourself, or drop --no-build for the whole tree and
record which package forced that.
Keep the allowlist beside the install command it follows, with the reason per package:
# esbuild, fsevents: native binaries, no JavaScript fallback
run: npm rebuild --ignore-scripts=false esbuild fsevents
Done when every allowlisted package names its reason, and nothing sits in the allowlist that step 1 did not flag.
ignore-scripts=true silences the project's own lifecycle scripts too, and it
does it quietly: npm run and npm test still run the script named, while
their pre and post hooks stop firing, so npm test passes without its
pretest fixture step.
npm run pretest && npm test, or fold it
into the main script.prepare work - husky, a build before publish - as its own command.Done when every pre hook, post hook, and prepare from step 1 is either
called explicitly somewhere or recorded as deliberately dropped.
rm -rf node_modules && npm ci --foreground-scripts
--foreground-scripts prints every script that executes, so a denied install
prints nothing for the step 1 packages. Output from any of them means the deny
is not in effect at that site. Then run the allowlist rebuild and confirm output
appears for exactly the allowlisted packages and no others.
For uv, uv sync --no-build --no-install-project --dry-run exiting zero is the
observation: no dependency needs a build.
Done when a fresh install at each site from step 2 produces script output from the allowlist only.
Report the denied sites, the allowlist with reasons, and the hooks moved in
step 4. A package can still run its code once the project imports it. A deny
also says nothing about which version arrived. Pair this with
dependency-cooldown so a fresh release ages first, and frozen-install so
every site installs the same tree. Check the update bot as well: it installs on
its own infrastructure with its own token when it refreshes the lockfile.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub staticaland/skills --plugin dependencies5 skills in this plugin
/adopt-small-dependenciesAdopt one barely used dependency into the repo as a drop-in copy with its source and licence, then drop the dependency./dependency-cooldownSet up dependency cooldowns - a minimum release age that holds back freshly published package versions - across a project's package managers and update bots. Use when the user wants protection from compromised releases, or mentions cooldown, minimum release age, or exclude-newer./frozen-installReplace resolving install commands with frozen ones, such as `npm ci` and `uv sync` in locked mode, at every site meant to reproduce a lockfile, from CI workflows and image builds to task runners, deploy scripts, and docs. Use when the user wants reproducible installs, or mentions `npm install` in CI, `npm ci`, clean-install, a frozen lockfile, or lockfile drift. Covers `npm` and `uv`./renovate-setupAdd or extend Renovate with a seven-day minimum release age and immutable updates: lock files kept with their integrity hashes, and GitHub Actions and container images pinned to commit SHAs and digests. Use when the user adopts Renovate, fresh or in place of another update bot, or wants it to cover manifests, tools, images, actions, or custom files it misses.