Package Manager Updates
This skill automates package update workflows: check → summarize → update (on demand).
Workflow
Step 1: Check for Updates
Run these commands to check outdated packages for each package manager:
CODEBLOCK0
Step 2: Present Summary
Format the results in a clear table:
| Package Manager | Outdated Count |
|---|
| npm | X |
| pip |
X |
| brew | X |
| cargo | X |
For detailed output, show per-package tables with Current vs Latest versions.
Step 3: Update (On Demand)
Only update when user explicitly confirms. Run:
CODEBLOCK1
Exclusions
- - Always exclude OpenClaw packages (check if package name starts with
openclaw or is in the OpenClaw ecosystem) - Skip system-critical packages unless user explicitly asks
Output Format
Keep output concise. Use markdown tables for summaries. Present update commands only when user confirms.
包管理器更新
本技能可自动执行包更新工作流程:检查 → 汇总 → 按需更新。
工作流程
第一步:检查更新
运行以下命令检查各包管理器的过期包:
bash
npm 全局包
npm outdated -g --depth=0 2>/dev/null || echo npm: 无全局包
pip
pip list --outdated 2>/dev/null || pip3 list --outdated 2>/dev/null
Homebrew
brew outdated
Cargo (Rust)
cargo outdated 2>/dev/null || echo cargo: 未安装或无项目
Go 模块
go list -m -u all 2>/dev/null || echo go: 无模块
第二步:呈现汇总
以清晰表格形式呈现结果:
X |
| brew | X |
| cargo | X |
如需详细输出,则显示每个包的当前版本与最新版本对比表格。
第三步:按需更新
仅在用户明确确认后执行更新。运行:
bash
npm - 更新所有全局包
npm update -g
npm - 更新指定包
npm install -g <包名>@latest
pip
pip install --upgrade <包名>
pip(Homebrew 管理)
brew upgrade pip 2>/dev/null || pip install --upgrade <包名>
Homebrew
brew update && brew upgrade
Homebrew(更新/升级后)
brew cleanup
brew doctor
Homebrew - 指定包
brew upgrade <包名>
Cargo
cargo update
Go
go get -u <模块>
排除项
- - 始终排除 OpenClaw 包(检查包名是否以 openclaw 开头或属于 OpenClaw 生态系统)
- 跳过系统关键包,除非用户明确要求
输出格式
保持输出简洁。使用 Markdown 表格呈现汇总。仅在用户确认后显示更新命令。