Lockfile Doctor

Diagnose package-manager and lockfile drift that causes 'works on my machine' deploy failures. Use whenever an install behaves differently in CI than locally, the user mentions lockfile conflicts, npm/pnpm/yarn confusion, 'npm ci failed', non-reproducible builds, or when auditing any Node project before deploy. Runs fully offline — no API keys, no network, no credentials.

Starr-del be1dbc9 2 files · 7.6 KB Updated

File contents

lockfile-doctor

Part of shipsafe — offline deploy-safety skills. Every script is stdlib-only Python 3.8+; nothing leaves the machine.

python3 scripts/lockfile_doctor.py <project_root> [--json]

Checks: multiple coexisting lockfiles (platform picks one, devs use another), missing lockfile entirely, packageManager field disagreeing with the committed lockfile, missing engines.node, and fragile dependency specs — git branches, file: paths that won't exist on the build machine, and */latest wildcards.

The mental model to give the user: a deploy is reproducible only if the same package manager, same Node version, and same lockfile produce the same node_modules everywhere. Each finding is one of those three legs broken.

When MULTIPLE_LOCKFILES fires, help the user pick ONE manager (whichever the team actually uses), delete the other lockfiles, and gitignore them so they don't return.

Exit codes: 0 clean, 1 findings.

All paths below are relative to this skill's directory (lockfile-doctor/).

Starr-del/ShipSafe/tree/main/skills/lockfile-doctor commit be1dbc9b1f

Frequently asked questions

npx skillmds@latest add starr-del/lockfile-doctor