update-deps
它能做什么
这个技能会在更新 JavaScript 软件包前检查其安全性。适合希望保持 npm 或 Bun 项目更新、又不想承担隐藏风险的开发者。
适用场景
- ✓当你想更新 JavaScript 或 Bun 项目中的软件包,并需要先进行检查时。
- ✓当某个软件包的更新看起来异常,或来自你不熟悉的维护者时。
- ✓当你想留下书面记录,说明哪些软件包已更新、哪些被暂缓时。
技能链接
https://github.com/backnotprop/plannotator/blob/main/.agents/skills/update-deps/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请检查这个项目中过时的软件包,只更新那些通过安全检查的。”
每周 5 个新技能,1 分钟读完。
工作原理
这个技能会列出有新版本的软件包,然后检查每个包的维护者、发布时间、代码变更和来源证明。它会更新安全的软件包,并将有风险的软件包搁置,等待人工审查,同时记录每项决定。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Update Dependencies
Audit outdated packages, verify supply chain integrity, bump what's safe, defer what needs review, and log everything.
This process has three phases: discovery, integrity audit, and execution. The integrity audit is the most important — every package gets checked before it touches the lockfile.
Phase 1: Discovery
Run bun outdated to get the full list of packages with available updates.
bun outdated
Parse the output into a structured list. For each package, note:
- Package name
- Current version
- Available update version
- Whether it's age-gated (indicated by
*in the output — the footnote "The * indicates that version isn't true latest due to minimum release age" confirms this) - Whether it's a runtime dep, dev dep, or peer dep
Also check whether any packages are blocked entirely by the age gate (like @pierre/diffs was when its minimum semver range couldn't resolve). Flag these separately — they may need minimumReleaseAgeExcludes in bunfig.toml.
Phase 2: Integrity Audit
This is the core of the process. Spawn one Sonnet sub-agent per package to run the integrity check in parallel. Sonnet is used here because these are independent, structured verification tasks that don't need heavier reasoning.
Each sub-agent receives the package name, current version, and target version, and performs the following checks:
Sub-agent prompt template
For each outdated package, spawn a Sonnet agent with this task:
You are auditing the npm package "{package}" for a version bump from {current} to {target}.
Run these checks and report back with a JSON object:
1. **Maintainer verification**: Check if maintainers changed between versions.
npm view {package}@{current} maintainers --json
npm view {package}@{target} maintainers --json
Compare the two lists. Flag any additions or removals.
2. **Publish date and age**: Get the publish timestamp.
npm view {package} time --json
Extract the date for version {target}. Calculate days since publication.
Flag if younger than 7 days.
3. **Provenance**: Check if the package has registry signatures or attestations.
npm audit signatures (if not already run this session)
Note whether the package has provenance attestations.
4. **Tarball diff**: Show what actually changed in the published package.
npm diff --diff={package}@{current} --diff={package}@{target}
Summarize the changes:
- How many files changed
- Are changes limited to version bumps, deps, and rebuilt dist? Or are there meaningful source changes?
- Any new runtime dependencies added?
- Any suspicious patterns (obfuscated code, eval(), network calls in unexpected places)
5. **Release notes**: Try to find what changed.
Check the package's repository for release notes or changelog:
npm view {package}@{target} repository.url
gh release view v{target} --repo <owner/repo> (try with and without v prefix)
Summarize the changelog if found.
Report your findings as JSON:
{{
"package": "{package}",
"from": "{current}",
"to": "{target}",
"age_days": <number>,
"maintainers_changed": <boolean>,
"maintainers_added": [],
"maintainers_removed": [],
"provenance": <boolean>,
"new_runtime_deps": [],
"files_changed": <number>,
"has_source_changes": <boolean>,
"changelog_summary": "<brief summary>",
"suspicious_patterns": [],
"verdict": "safe" | "review" | "defer",
"verdict_reason": "<one sentence explanation>"
}}
Verdict guidelines:
- "safe": Same maintainers, no new runtime deps, changes match what changelog describes, no suspicious patterns
- "review": Minor concerns (e.g., new maintainer who is clearly from the same org, small new dep from known publisher)
- "defer": Maintainer changes from unknown accounts, new runtime deps with unclear purpose, suspicious code patterns, substantive API changes that need integration testing
Collecting results
As sub-agents complete, collect their JSON reports. If a sub-agent fails or times out, mark that package as "defer" with reason "audit failed".
Tier classification
After collecting all results, classify packages into tiers. This helps the user understand the risk profile at a glance:
| Tier | Description | Typical action |
|---|---|---|
| Runtime, high surface | Libraries your code calls directly (parsers, diff engines, UI libs) | Check provenance, review diff, run tests |
| SDK/API deps | Third-party service SDK |
常见问题
来源证明是什么意思?
它是一种证明软件包在何处构建和发布的凭据,有助于确认其确实来自真正的源头。
所有软件包会同时更新吗?
不会。每个软件包都会单独检查,然后才会修改锁文件。
它只适用于 Bun 吗?
步骤从 Bun outdated 命令开始,因此它是为 Bun 项目设置的。
详情
作者的原始描述
Audit and update npm/Bun dependencies with supply chain integrity checks — verifies maintainers, publish age, tarball diffs, and provenance before bumping. Defers risky packages to ~/.supply-chain/notes/.
repo: backnotprop/plannotator
热度
- GitHub 星标
- 9.8k
- 排名
- #12192
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
plannotator-annotate
9.8k帮你的智能体在 Plannotator 的批注界面中打开文件、文件夹或网页,然后根据你标注的笔记采取行动。
plannotator-review
9.8k帮你的智能体打开你的修改内容、文件夹或拉取请求的浏览器代码审查界面,然后修复你留下的反馈。
plannotator-annotate
9.8k帮你的智能体把文档发送到 Plannotator 进行标注,计划和规格可以选择批准。之后智能体会根据反馈采取行动。
plannotator-last
9.8k帮你的智能体在 Plannotator 中打开它的上一条回复,让你进行标注,并根据你的笔记修改该回答。