بنقرة واحدة
update-package-locks
Use when refreshing package-lock.json files in ng-mocks.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Use when refreshing package-lock.json files in ng-mocks.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Use when preparing GitHub Dependabot pull requests by listing open PRs, verifying they are authored by app/dependabot, enabling auto-merge, and approving them without merging manually.
Use when replaying the current local branch onto upstream/main, or onto another provided remote branch, by stashing local changes, resetting to the target branch, and cherry-picking missing commits back one by one.
Use when triaging or fixing ng-mocks GitHub issues and bug reports in a dedicated worktree based on upstream/main, with a local issue-* regression test, a focused source fix, coverage validation, e2e matrix checks, a conventional commit message, and a pull request.
Use when updating major Node.js versions across ng-mocks projects, including CI/CD, .nvmrc, Docker images, npm compatibility, @types/node, and wrapper-based validation.
Use when syncing or simplifying example code in docs/articles or README.md so embedded docs samples stay aligned with examples tests while removing compatibility noise from the published snippets.
| name | update-package-locks |
| description | Use when refreshing package-lock.json files in ng-mocks. |
Use this skill for a fresh lockfile refresh or to regenerate a lockfile while resolving an existing dependency PR conflict, without permanently changing the repo's normal install flow.
This workflow is intentionally narrow. Follow the sequence exactly. Do not manually add tests, lint, local npm commands, rebases, or unrelated cleanup unless the user explicitly asks for them.
Create a plain Markdown checklist that any AI agent can follow:
- [ ] Identify whether this is a fresh refresh or an existing dependency PR conflict
- [ ] Create an isolated worktree from `upstream/main` or the existing PR branch
- [ ] For a PR conflict, merge `upstream/main` and keep the dependency PR's lockfile side as the regeneration base
- [ ] Temporarily change the relevant `compose.yml` service command line(s) from `npm install` to `npm update`
- [ ] Run the update wrapper pass with wrapper targets in batches of 2-4
- [ ] Restore `compose.yml` back to `npm install`
- [ ] Run the install wrapper pass with wrapper targets in batches of 2-4
- [ ] Commit the refreshed lockfiles with only the dependency or merge changes already in scope
- [ ] Push a fresh branch and create a PR, or push the existing PR branch
- [ ] Summarize the two wrapper passes and any npm warnings
upstream/main.upstream/main without rewriting history, and keep the dependency PR's lockfile side as the regeneration base.compose.yml.compose.yml service command line(s) from npm install to npm update.compose.sh and compose.yml, then run them in batches of 2-4 concurrent commands. If the user explicitly named one target, run only that target.npm install.package-lock.json files with only the dependency or merge changes already in scope, plus .agents/skills/update-package-locks/SKILL.md if this skill was intentionally edited.upstream/main. For an existing dependency PR, push back to that PR branch.Do not use the current active worktree. A fresh refresh needs a new branch; an existing dependency PR conflict stays on its PR branch in an isolated worktree. Do not manually run sh test.sh, root tests, lint, TypeScript checks, local npm install, local npm update, or ad-hoc dependency commands as part of this workflow unless the user explicitly asks for them.
For a repo-wide refresh, the affected command lines are all service command entries in compose.yml that currently read - install. Change only those entries to - update, run the wrapper, then change those same entries back to - install. Do not edit package.json, shell scripts, or lockfiles by hand.
For repo-wide refreshes, derive targets from the current compose.sh and compose.yml; do not hardcode target names or rely on bare sh compose.sh. Run each target once per pass in batches of 2-4, with a unique COMPOSE_PROJECT_NAME per concurrent command. Clean each batch with docker compose down -v before starting the next one.
If a wrapper target fails because Docker reports exhausted address pools or Puppeteer reports a corrupt cache folder, clean up that target's compose project and rerun the same wrapper target with a fresh COMPOSE_PROJECT_NAME. Do not switch to local npm commands.
If several worktrees or agent sessions are active, use a unique compose namespace for every wrapper command:
COMPOSE_PROJECT_NAME=ngmocks_<unique> sh compose.sh <target>
# Start from upstream/main in a new worktree.
git fetch upstream main
git worktree add -b codex/<lockfile-branch> ../<lockfile-worktree> upstream/main
# Resolve an existing dependency PR without rewriting its history.
git fetch upstream main <pr-branch>
git worktree add ../<pr-worktree> <pr-branch>
git merge --no-edit upstream/main
git checkout --ours path/to/package-lock.json # PR side when merging main into the PR branch
# Repo-wide lockfile refresh.
# Edit compose.yml to npm update, run current wrapper targets in batches of 2-4, then restore npm install and repeat the same batches.
# Specific target lockfile refresh, only when the user named a target.
# First edit that target's compose.yml service command to npm update.
COMPOSE_PROJECT_NAME=ngmocks_<unique> sh compose.sh <target>
# Then restore that target's compose.yml service command to npm install.
COMPOSE_PROJECT_NAME=ngmocks_<unique> sh compose.sh <target>
# Commit and publish after the wrapper sequence succeeds.
git add package-lock.json docs/package-lock.json tests-e2e/package-lock.json e2e/*/package-lock.json
git add .agents/skills/update-package-locks/SKILL.md # only if intentionally edited
git commit -m "chore: refresh package lockfiles"
git remote -v
git push -u origin codex/<lockfile-branch>
# Create a PR against upstream/main after the push succeeds.
sh compose.sh <target> once while the service command is temporarily npm update, then run sh compose.sh <target> again after restoring npm install.npm update, then run every same target again after restoring all service commands to npm install.sh test.sh, npm test, lint, or TypeScript checks as part of this skill's default validation.upstream/main for fresh work, or the existing PR branch for conflict resolution.compose.yml in an npm update state after finishing.npm install, npm update, or ad-hoc node commands when the wrapper flow covers the task.COMPOSE_PROJECT_NAME for each wrapper command.docker compose down -v after successful batches or failed transient Docker/Puppeteer setup runs.upstream accepts contributor branches.