一键导入
package-upgrade
Batch package upgrades across multiple repos: pnpm up --latest, version caps, Expo mobile, branch+PR workflow.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Batch package upgrades across multiple repos: pnpm up --latest, version caps, Expo mobile, branch+PR workflow.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Decision guide for delegating to caveman-style subagents. Tells the main thread WHEN to spawn `cavecrew-investigator` (locate code), `cavecrew-builder` (1-2 file edit), or `cavecrew-reviewer` (diff review) instead of doing the work inline or using vanilla `Explore`. Subagent output is caveman-compressed so the tool-result injected back into main context is ~60% smaller — main context lasts longer across long sessions. Trigger: "delegate to subagent", "use cavecrew", "spawn investigator/builder/reviewer", "save context", "compressed agent output".
Ultra-compressed commit message generator. Cuts noise from commit messages while preserving intent and reasoning. Conventional Commits format. Subject ≤50 chars, body only when "why" isn't obvious. Use when user says "write a commit", "commit message", "generate commit", "/commit", or invokes /caveman-commit. Auto-triggers when staging changes.
Compress natural language memory files (CLAUDE.md, todos, preferences) into caveman format to save input tokens. Preserves all technical substance, code, URLs, and structure. Compressed version overwrites the original file. Human-readable backup saved as FILE.original.md. Trigger: /caveman-compress FILEPATH or "compress memory file"
Quick-reference card for all caveman modes, skills, and commands. One-shot display, not a persistent mode. Trigger: /caveman-help, "caveman help", "what caveman commands", "how do I use caveman".
Ultra-compressed communication mode. Cuts output tokens 65% (measured) by speaking like caveman while keeping full technical accuracy. Supports intensity levels: lite, full (default), ultra, wenyan-lite, wenyan-full, wenyan-ultra. Use when user says "caveman mode", "talk like caveman", "use caveman", "less tokens", "be brief", or invokes /caveman. Also auto-triggers when token efficiency is requested.
Show real token usage and estimated savings for the current session. Reads directly from the Claude Code session log — no AI estimation. Triggers on /caveman-stats. Output is injected by the mode-tracker hook; the model itself does not compute the numbers.
| name | package-upgrade |
| description | Batch package upgrades across multiple repos: pnpm up --latest, version caps, Expo mobile, branch+PR workflow. |
| version | 1.0.0 |
| author | johnchen |
| metadata | {"hermes":{"tags":["npm","pnpm","dependencies","upgrade","monorepo","expo"]}} |
Batch-upgrade npm packages across multiple repos using pnpm.
gh) or API access for opening PRs~/projects/For each repo:
cd ~/projects/<repo>
git checkout main
git pull
git checkout -b feat/john/update-packages-YYYYMMDD
If git checkout main fails due to uncommitted changes, stash first:
git stash
git checkout main
git pull
git checkout -b feat/john/update-packages-YYYYMMDD
Leave the stash on the old branch — the user can pop it when they return.
NEVER modify main directly. Always create a feature branch and open a PR.
pnpm up -r --latest
If the upgrade fails (e.g. a package's latest version has a broken transitive dep), see the "Handling broken upstream deps" section in Pitfalls below.
After upgrade, check and revert these packages if they were bumped beyond the allowed range:
| Package | Cap | Where |
|---|---|---|
@types/node | latest 24.x.x (e.g. ^24.13.2, not ^24.0.0) | package.json or pnpm-workspace.yaml (catalog) |
@typescript/native-preview | "beta" — do NOT upgrade | package.json or pnpm-workspace.yaml (catalog) |
Revert with sed or manual edit, then confirm with grep.
For turborepo-starter-kit, the apps/mobile workspace uses Expo and requires a separate upgrade step:
pnpm mobile:expo:upgrade
Run this after the general pnpm up -r --latest and version cap enforcement, but before pnpm install.
pnpm install
This regenerates the lockfile after any manual version reverts.
Run the project's verification suite to confirm nothing broke. Read the project's AGENTS.md for the exact commands; the standard set is:
pnpm lint
pnpm build
pnpm check
If any step fails, fix immediately before committing. Common issues: version incompatibilities between upgraded packages, deprecated API usage surfaced by stricter types.
git add -A
git commit -m "chore(deps): update all packages to latest versions"
git push -u origin feat/john/update-packages-YYYYMMDD
Then open a PR via gh pr create or the GitHub API.
Never modify main. All changes go through a feature branch + PR. User reviews before merge. If you accidentally commit to main (e.g. while fixing a subagent's missed step), recover:
git reset --soft HEAD~1 && git stash && git checkout <feature-branch> && git stash pop, then force-push main back:git checkout main && git reset --hard origin/main && git push --force origin main.
@types/node cap is strict.
pnpm up --latestwill bump it to 26.x or higher. Always check and revert — use the latest 24.x.x version (e.g.^24.13.2), not^24.0.0.
@typescript/native-preview stays at "beta". Never upgrade this package.
turborepo-starter-kit has two upgrade phases. General upgrade first, then
pnpm mobile:expo:upgradefor the Expo mobile app. Don't skip the Expo step.
Subagent delegation pitfall (turborepo-starter-kit). When delegating to subagents, the
pnpm mobile:expo:upgradestep often gets skipped even when listed in the prompt. Subagents treatpnpm up -r --latestas "done" and move on. Mitigation: Either (a) run turborepo-starter-kit manually (not delegated), or (b) verify the subagent ran the command by checkinggit logfor an expo-specific commit before approving. If missing, run it yourself on the feature branch and amend.
pnpm install is last. Run it after all version reverts are done so the lockfile reflects the correct versions.
Transient registry errors on
pnpm up. Newly published package versions may not propagate to all registry mirrors immediately. Ifpnpm up -r --latestfails withERR_PNPM_NO_MATCHING_VERSIONfor a package that should exist (e.g.@vitest/spy@4.1.10), wait a few seconds and retry. Check availability withpnpm view <pkg> versions --json | tailbefore concluding the version doesn't exist.
Branch naming convention:
feat/john/update-packages-YYYYMMDD(date-based).
Handling broken upstream deps. Sometimes
pnpm up -r --latestfails because a package's latest version has a missing transitive dependency (e.g. vitest 4.1.10 → @vitest/pretty-format@4.1.10 which doesn't exist). Workaround:
- Pin the broken package to its last working exact version (no caret) in whichever file declares it (root
package.jsonorpnpm-workspace.yamlcatalog)- Run
pnpm up -r --latest— it skips the pinned package and upgrades everything else. Note: pnpm preserves the range style — no caret stays no caret.- Re-add the caret manually if the original had one (e.g.
"4.1.10"→"^4.1.10")- Check
git diff— if the broken version was written back, manually revert to the last working version with caret- Run
pnpm install, then caps enforcement, then verify (lint/build/check)Race condition note: The missing transitive dep may appear within minutes (npm publish is eventually consistent). After the workaround succeeds, check with
pnpm view <pkg> versions --json | tail— if the missing version now exists, you can safely upgrade to it.
Monorepo sequential upgrade with --filter. If
pnpm up -r --latestfails at the root level, you can upgrade sub-packages first:pnpm up --latest --filter '!.'then handle the root separately. Useful when the failure is root-specific (e.g. vitest in root but not in sub-packages).
See references/projects.md for the list of repos and their specific configurations.