Instructions
When to Use
- Use for lockfiles, audits, install-script policy, CI gates.
- Prefer
dependency-migrationsfor major version upgrade plans. - Prefer
github-actions-cito implement the CI jobs.
Improve dependency hygiene and supply-chain posture for a Node repo (prefer pnpm).
- Confirm lockfile is committed and CI uses frozen install (
pnpm install --frozen-lockfile). - Add or verify audit on PR (
pnpm audit --audit-level=highor org standard); document exit code policy. - Enable dependency review on lockfile PRs when on GitHub - link to org setting if missing.
- Lifecycle scripts: evaluate
ignore-scripts/ pnpm trusted dependency builds; list packages that truly needpostinstall. - New deps: require justification, scoped name when possible, link to repo + last release date.
- Pair with
dependency-migrationsfor majors - never stack unrelated major bumps.
Outcomes
- Markdown policy section + optional
.npmrc/ workflow snippet titles (user pastes content).
Output Rules
suggest-shell: give exact commands; user runs them. No curl | sh from untrusted URLs.
Scope and boundaries
- In scope: npm/pnpm/yarn lockfiles, audit, CI gates, install-script policy.
- Out of scope: SLSA full provenance, custom binary signing.
Safety
- Do not add registry auth tokens to files; use CI secrets.
Troubleshooting
- Audit noise in monorepos: run
pnpm audit --prodto prioritize runtime deps when dev-only tooling drowns signal; still review dev tooling for supply-chain risk periodically. - False positives: document CVE ID + reason for allowlist entry with owner and review date.
Related skills
dependency-migrations- ordered majorsgithub-actions-ci- CI audit policyenv-config-agent- secret exposure via scripts
GitHub: https://github.com/bh611627/skillcodex/tree/main/skills/secure-dependencies/SKILL.md
npm: https://www.npmjs.com/package/@skillcodex/skills