AGENT SKILL

项目依赖安全更新

dependency-update

安全更新项目依赖的指南。当被要求更新软件包、升级依赖项或检查过时库时使用。

License 许可
MIT
所属仓库
microsoft/haste
最近更新
2026-11-13
Stars
★ 110
Forks
19

01 前言 Front Matter

name
dependency-update
level
foundational
agents
[ "backend-dev", "security", "security-validation" ]
domain
maintenance
source
Internal engineering practices
status
draft
description
Guide for safely updating project dependencies. Use when asked to update packages, upgrade dependencies, or check for outdated libraries.
created_date
2026-04-27
validated_by
allowed-tools
shell
last_validated

02 资源文件 5

03 SKILL.md 正文

Dependency Update

Overview

A structured process for safely updating project dependencies. Updates are categorized by risk level and applied in controlled batches with verification at each step.

Key Concepts

Semantic Versioning Risk Tiers

  • Patch (x.x.X): Bug fixes only. Safe to batch.
  • Minor (x.X.0): New features, backward compatible. Update in small batches.
  • Major (X.0.0): Breaking changes. Update one at a time. Read the changelog.

Patterns & Techniques

Safe Update Process

Step 1: Audit

# Python
pip list --outdated

# JavaScript
npm outdated

Step 2: Categorize — Group by risk tier (patch, minor, major).

Step 3: Update per batch

  1. Update the dependency
  2. cd hastelib && hatch build -t wheel — check build
  3. cd hastelib && hatch run test:pytest — check behavior
  4. cd ui && npm run lint — check for new warnings
  5. If tests fail, investigate and fix or revert

Step 4: Security check — Scan for known vulnerabilities.

Step 5: Commit — One commit per logical group:

chore(deps): update [package] from vX to vY

Decision Framework

Update Type Risk Strategy
Patch Low Batch all, update together
Minor (well-known pkg) Low-Med Small batches of 3-5
Minor (niche pkg) Medium One at a time, check changelog
Major High One at a time, read migration guide
Security fix Critical Update immediately, regardless of type

Common Pitfalls

  • Updating everything at once — If tests fail, you can't tell which update caused it
  • Skipping the changelog — Major updates often require code changes
  • Ignoring transitive dependencies — A safe direct dep can pull in a vulnerable transitive dep

04 同仓库更多 Skills

microsoft
microsoft/haste

HASTE 实施验证与诊断

validation-diagnostics

HASTE 的验证与诊断技能。对比计划工作与已实现工作,生成诊断报告,并将遗漏项反馈到技能改进中。使用场景:'验证实现'、'对比规格'、'诊断报告'、'偏差分析'、'覆盖检查'、'实现审查'。

测试工程师测试与质量保障
★ 110
microsoft
microsoft/haste

Dependabot 漏洞分析与分诊

security-analysis

面向 HASTE 的 Dependabot 与安全分析技能。解析告警、归类相关漏洞、应用严重性规则并生成结构化报告。使用场景:'Dependabot 告警'、'安全扫描'、'漏洞分诊'、'依赖审计'、'npm audit'、'pip audit'、'CVE 分析'。

安全工程师安全公告与漏洞管理
★ 110
microsoft
microsoft/haste

发布说明与变更日志生成

release-notes

根据提交历史生成发布说明。当需要起草发布说明、创建变更日志或总结某个版本的变更时使用。

软件开发工程师部署与发布管理
★ 110
microsoft
microsoft/haste

HASTE 卫星影像供应商适配

imagery-provider-adaptation

面向 HASTE 的影像供应商适配技能。封装卫星影像来源(Planet、Vantor、Airbus 等)的特定逻辑。适用场景:'new imagery provider'(新影像供应商)、'add source type'(添加来源类型)、'satellite provider'(卫星供应商)、'Planet'、'Vantor'、'Airbus'、'Pleiades'、'WorldView'、'SkySat'、'imagery ingestion'(影像摄取)、'provider adapter'(供应商适配器)。

软件开发工程师地图与位置服务
★ 110
microsoft
microsoft/haste

HASTE 确定性脚本执行

deterministic-scripts

面向 HASTE 的确定性脚本执行技能。使用脚本而非自由形式的 LLM 行为,以实现一致、可重复的操作。适用场景:'run preprocessing'(运行预处理)、'convert format'(转换格式)、'parse metadata'(解析元数据)、'generate tiles'(生成切片)、'build wheel'(构建 wheel 包)、'deploy functions'(部署函数)。防止产生幻觉脚本。

软件开发工程师开发环境与工具链管理
★ 110
microsoft
microsoft/haste

测试失败调试排查

debug-test-failures

用于测试失败的系统化调试工作流。当测试失败、CI 构建变红,或被要求调试测试问题时使用。

测试工程师调试与故障排查
★ 110