sync-lockfiles
Skill318 starsChanged 14 days agoMITView on GitHub
Regenerate both npm lockfiles after any manual change to package.json. Use this skill when the user has added, removed, or bumped a dependency in package.json and needs bun.lock and package-lock.json kept in sync. Triggers: "sync lockfiles", "update lockfiles", "I edited package.json", "regenerate lockfiles". Distinct from apply-dependency-prs, which handles the PR-discovery workflow — this skill handles lockfile sync only.
- Installs packages
In this repository49 other files it gives its agents.
- .agents/skills/unsafe-checker/AGENTS.mdAGENTS.md
- benchmarks/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- e2e/CLAUDE.mdCLAUDE.md
- src/CLAUDE.mdCLAUDE.md
- src-tauri/CLAUDE.mdCLAUDE.md
- website/CLAUDE.mdCLAUDE.md
- website/llms-full.txtllms.txt
- website/llms.txtllms.txt
- ci-gate-diagnosisSkill
- coding-guidelinesSkill
- domain-webSkill
- exploration-modeSkill
- flathub-maintenanceSkill
- m01-ownershipSkill
- m02-resourceSkill
- m03-mutabilitySkill
- m04-zero-costSkill
- m05-type-drivenSkill
- m06-error-handlingSkill
- m07-concurrencySkill
- m09-domainSkill
- m10-performanceSkill
- m11-ecosystemSkill
- m12-lifecycleSkill
- m13-domain-errorSkill
- m14-mental-modelSkill
- m15-anti-patternSkill
- manual-planningSkill
- runbooksSkill
- rust-call-graphSkill
- rust-code-navigatorSkill
- rust-dailySkill
- rust-deps-visualizerSkill
- rust-learnerSkill
- rust-refactor-helperSkill
- rust-skill-creatorSkill
- rust-symbol-analyzerSkill
- rust-trait-explorerSkill
- security-stanceSkill
- seo-auditSkill
- seo-performance-reviewSkill
- skill-improverSkill
- solidjsSkill
- tauri-agent-devSkill
- tauri-v2Skill
- tiptapSkill
- todo-managerSkill
- unsafe-checkerSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 11
When package.json changes, two lockfiles and the Nix dependency hash must all be updated and committed together:
- Very specific: line 33
Linux with Nix: run nix run nixpkgs#prefetch-npm-deps -- package-lock.json and paste the printed hash.
- Very specific: line 39
Commit package.json, bun.lock, package-lock.json, and nix/package.nix together (on Windows, nix/package.nix follows in the step 3 follow-up …
- Very specific: line 49
Never commit only one lockfile.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
When package.json changes, two lockfiles and the Nix dependency hash must all be updated and
committed together:
| File | Used by |
bun.lock | Dev workflow |
package-lock.json | Flathub flatpak-node-generator (offline Linux build) |
nix/package.nix (npmDepsHash) | Nix build (nix build .#default, .github/workflows/nix.yml) |
Steps
- Regenerate
bun.lock:cmd.exe /c bun install - Regenerate
package-lock.json:cmd.exe /c npm install --package-lock-only --legacy-peer-deps - Refresh
npmDepsHashinnix/package.nix(in thefrontend = buildNpmPackage { ... }block):- Linux with Nix: run
nix run nixpkgs#prefetch-npm-deps -- package-lock.jsonand paste the printed hash. - Windows: Nix is not available. Push the lockfile change. The Nix CI workflow then fails
and prints the new hash in an error annotation and in the job summary. Copy that hash into
nix/package.nixand push it as a follow-up commit.
- Linux with Nix: run
- Commit
package.json,bun.lock,package-lock.json, andnix/package.nixtogether (on Windows,nix/package.nixfollows in the step 3 follow-up commit).
Why --legacy-peer-deps
eslint-plugin-solid declares a peer of eslint@^9 but the project uses eslint@10. bun
resolves this silently; npm does not. The flag is required or npm install errors out.
Gotcha
Never commit only one lockfile. package-lock.json is required by Flathub's
flatpak-node-generator to resolve npm dependencies during the offline Flatpak build. A
stale or missing package-lock.json causes the Flathub CI build to fail.
A changed package-lock.json without a matching npmDepsHash breaks nix build .#default. The
Nix CI workflow fails on it and prints the correct hash; it does not commit the fix by itself.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

