upgrade-deps
Dependency upgrade assistant with research and validation phases
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Dependency upgrade assistant with research and validation phases
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Read and write the second brain — a git-backed Obsidian vault at ~/SourceRoot/brain (PARA structure + a top-level wiki/ knowledge tree). Use whenever the user mentions "brain", "second brain", "knowledge base", "note", "remember", "look up", "find note", "capture", "wiki", or "okf". Also use for any request to save, retrieve, or organize personal knowledge that belongs in the brain rather than in a repo-specific doc.
Write, draft, and polish prose through a human-owned 7-step pipeline. Use whenever the user says "distill", "write article", "draft", "summarize into", "create content", "synthesize", or "publish". Also use for any task where the output is a piece of long-form writing — the pipeline keeps prose quality out of coding sessions.
RETIRED — manage the (now decommissioned) per-machine mlx-audio TTS/STT stack; TTS/STT moved to the cloud audio-gateway (VPS)
Operate the Mac mini remote dev host — connecting from the MacBook over mosh or herdr --remote, running and reattaching many Claude Code agents, herdr workspaces/panes and its socket API, claude --bg durable daemons, the Uptime Kuma readiness heartbeat, and the failure modes specific to a headless always-on Mac. Use when the user mentions herdr, mosh, the mini, "remote dev", "dev host", detaching or reattaching agents, "did my agent survive", sessions dying on lid-close, or asks how to reach a dev server running on the mini.
Manage the personal image stack — public CDN uploads/transform URLs and the private image-share layer. Use whenever an image needs a URL (public or private) for an article, blog post, vault note, README, OpenGraph tag, or a one-off share; or when the user says "upload this image", "share this image", "private image", "publish image", "host this screenshot", "get me a CDN link", "resize this", mentions "image-share", or asks where an image lives.
Bidirectionally sync ALL git repos across two machines — this MacBook and the always-on Mac mini — over SSH, using GitHub/GitLab as the transport. Commits and pushes uncommitted work on both sides, then rebases/fast-forwards each so they converge, with per-repo subagents resolving rebases and merge conflicts. This is a MULTI-repo, TWO-machine operation — distinct from /commit, /ship, or /git-cleanup, which act on a single repo. Use whenever the user wants to sync their machines/repos, "catch up" the laptop to the Mac mini or push laptop work back, is about to travel or just got back, has uncommitted work scattered across many repos, or wants to reconcile branches that diverged between the two machines. Trigger even on a bare "sync", "sync my machines", or "get my repos up to date".
| name | upgrade-deps |
| description | Dependency upgrade assistant with research and validation phases |
Analyze, validate, upgrade npm/bun dependencies, run validation, and commit changes.
Principle: Keep main thread focused on coordination. Delegate heavy operations to MCP-routed skills.
| Skill | Use For | Mode |
|---|---|---|
/research | Major version research, breaking changes, migration guides | MCP (research-gateway) |
/check | Post-upgrade validation (format, lint, tsc, build) | MCP (sideclaw) |
ALWAYS delegate:
/research skill/research skill/check skillKeep in main thread:
/research routes through the research-gateway MCP (hosted VPS service on IU models, off Max — a blocking call) and /check routes through sideclaw (claude-haiku-4-5, currently on Max — async job). Verbose work stays off the main thread; only the structured result returns.
1. Check git state:
git status --porcelain
If ANY output: STOP immediately and tell user:
⚠️ Uncommitted changes detected. Please commit or stash before upgrading dependencies.
2. Identify base branch:
git remote show origin 2>/dev/null | grep 'HEAD branch' | cut -d: -f2 | tr -d ' '
3. Stay in project root - NEVER cd to subfolders
Detect package manager by checking lockfiles in project root:
bun.lock or bun.lockb → bunpackage-lock.json → npmyarn.lock → yarnpnpm-lock.yaml → pnpmCheck for workspace setup:
grep -q '"workspaces"' package.json && echo "WORKSPACE"
Project Types:
--deep--deepCheck if OpenSpec is installed and update instruction files.
1. Detection:
# Check if OpenSpec CLI is available
command -v openspec >/dev/null 2>&1 && echo "OPENSPEC_INSTALLED"
# Check current version
openspec --version 2>/dev/null
2. Check for updates:
# Get current installed version
CURRENT=$(openspec --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')
# Get latest version from npm
LATEST=$(npm view openspec version 2>/dev/null)
echo "Current: $CURRENT"
echo "Latest: $LATEST"
3. If update available:
# Update OpenSpec globally
npm update -g openspec
4. Update instruction files:
# Update OpenSpec templates and instruction files in project
openspec update
5. Version change analysis:
If there's a major or minor version change, delegate research:
/research OpenSpec CLI migration [old-version] to [new-version] Claude Code setup changes
Research should cover:
Present results:
## 🔧 OpenSpec Update
| Item | Value |
|------|-------|
| Previous version | X.Y.Z |
| New version | A.B.C |
| Instruction files | Updated ✅ |
### Version Changes (if major/minor)
**Breaking changes:** [via /research skill]
- [Change 1]
- [Change 2]
**New features for Claude Code:**
- [Feature 1]
- [Feature 2]
**⏸️ Continue with npm/bun dependency upgrades?**
Skip OpenSpec phase if:
openspec command not found.openspec/ directory in project--skip-openspecUse npm-check-updates (ncu) to check versions. Run from project root.
For single project (npm):
npx npm-check-updates
For single project (bun):
npx npm-check-updates --packageManager bun
For workspace (npm/bun):
npx npm-check-updates --deep [--packageManager bun]
Present results:
## 📊 Outdated Dependencies
| Category | Count | Action |
|----------|-------|--------|
| 🟢 Patch | X | Safe to upgrade |
| 🔵 Minor | Y | Generally safe |
| 🔴 Major | Z | Research required |
### Major Upgrades Requiring Research:
- `package-a`: 2.x → 3.x
- `package-b`: 4.x → 5.x
**⏸️ Shall I research breaking changes for the major upgrades?**
/research Skill⚠️ ALWAYS use /research skill for major version research.
/research docs:[package-name] migration [old-version] to [new-version]
Research for each major upgrade:
After research returns:
## 🔴 Major Upgrades Analysis
### [package-a] 2.x → 3.x
**Risk:** [low/medium/high]
**Breaking changes:**
- [Change 1]
- [Change 2]
**Code changes needed:**
- [File/area affected]
**Peer deps:** [Updates required]
---
**⏸️ Proceed with upgrades?**
- [ ] Safe upgrades only (patch + minor)
- [ ] Safe + low-risk majors
- [ ] All upgrades (with code changes)
IMPORTANT: All commands run from project root. Never cd.
# npm
npx npm-check-updates --target minor -u && npm install
# bun
npx npm-check-updates --target minor -u --packageManager bun && bun install
# With --deep for workspaces
npx npm-check-updates --target minor -u --deep [--packageManager bun] && [npm|bun] install
npx npm-check-updates -u <package1> <package2> [--packageManager bun] && [npm|bun] install
/check Skill⚠️ ALWAYS use /check skill for validation.
/check
The skill will:
After validation:
## ✅ Validation Results
| Check | Status | Details |
|-------|--------|---------|
| Format | ✅/❌ | [Details] |
| Lint | ✅/❌ | [Details] |
| Types | ✅/❌ | [Details] |
| Build | ✅/❌ | [Details] |
**⏸️ Ready to commit?** / **⏸️ Fix issues first?**
NEVER run: dev, start, serve, or any server-starting commands.
If validation fails: Report which step failed, suggest fixes, do NOT commit.
If all validations pass:
git add package.json package-lock.json bun.lock 2>/dev/null
git add "**/package.json" 2>/dev/null # For workspaces
Commit message format:
# For patch/minor only:
git commit -m "chore: upgrade dependencies"
# For specific packages:
git commit -m "chore: upgrade <package1>, <package2>"
# For major version:
git commit -m "chore: upgrade <package> to v<version>"
📦 Dependency Upgrade Report
============================
🔍 Pre-flight
-------------
Git status: ✅ Clean
Base branch: main
Package manager: bun
Project type: workspace
🔧 OpenSpec Update
------------------
Status: ✅ Updated (1.2.0 → 1.3.0)
Instruction files: ✅ Refreshed
Migration research: ✅ (via /research skill - new Claude Code patterns)
📊 Outdated Dependencies
------------------------
🟢 Patch: 3 packages
🔵 Minor: 5 packages
🔴 Major: 2 packages
🔴 Major Upgrades Analysis (via /research skill)
------------------------------------------------
## react 18.x → 19.x
Risk: medium
Breaking changes:
- Concurrent features now default
- useEffect cleanup timing changed
Peer deps: react-dom must also upgrade
⚡ Upgrade Commands
-------------------
# Safe (patch+minor):
npx npm-check-updates --target minor -u --deep --packageManager bun && bun install
✅ Validation Results (via /check skill)
-----------------------------------------------
format:check: ✅
lint: ✅
type-check: ✅
build: ✅
📝 Ready to Commit
------------------
git commit -m "chore: upgrade dependencies"
| Phase | Operation | Skill |
|---|---|---|
| Pre-flight | Git checks | Main thread |
| Phase 1 | Project detection | Main thread |
| Phase 1.5 | OpenSpec update | Main thread |
| Phase 1.5 | OpenSpec migration research | /research (if major/minor) |
| Phase 2 | Check outdated | Main thread |
| Phase 3 | Research majors | /research |
| Phase 4 | Execute upgrades | Main thread |
| Phase 5 | Validation | /check |
| Phase 6 | Commit | Main thread |