ln-822-nuget-upgrader by levnikolaevich/claude-code-skills
npx skills add https://github.com/levnikolaevich/claude-code-skills --skill ln-822-nuget-upgraderPaths: File paths (
shared/,references/,../ln-*) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root. Ifshared/is missing, fetch files via WebFetch fromhttps://raw.githubusercontent.com/levnikolaevich/claude-code-skills/master/skills/{path}.
类型: L3 工作者 类别: 8XX 优化 父级: ln-820-dependency-optimization-coordinator
升级 .NET NuGet 包,具备自动破坏性变更检测和迁移功能。
| 方面 | 详情 |
|---|
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 输入 | 解决方案/项目路径 |
| 输出 | 更新后的 .csproj 文件,迁移报告 |
| 支持 | .NET 6, 7, 8, 9, 10 |
阶段: 预检 → 查找项目 → 安全审计 → 检查过时包 → 识别破坏性变更 → 应用升级 → 还原与构建 → 报告
| 检查项 | 必需 | 缺失时的操作 |
|---|---|---|
| .csproj 文件 | 是 | 阻止升级 |
| .sln 文件 | 否 | 改用 csproj 发现方式 |
| Git 干净状态 | 是 | 阻止(需要干净的基线用于回滚) |
工作者假定协调器 (ln-820) 已验证 git 状态并创建了备份。
必读: 加载 shared/references/git_worktree_fallback.md — 使用 ln-822 行。
| 方法 | 命令 |
|---|---|
| 查找 .csproj | Get-ChildItem -Recurse -Filter *.csproj |
| 从解决方案 | dotnet sln list |
| 检查项 | 命令 |
|---|---|
| 易受攻击的包 | dotnet list package --vulnerable |
| 过时的包 | dotnet list package --outdated |
| 严重性 | 操作 |
|---|---|
| 严重 | 阻止升级,报告 |
| 高 | 警告,继续 |
| 中/低 | 仅记录 |
| 步骤 | 命令 |
|---|---|
| 安装工具 | dotnet tool install --global dotnet-outdated-tool |
| 检查 | dotnet outdated --output json |
| 包 | 破坏性版本 | 关键变更 |
|---|---|---|
| Microsoft.EntityFrameworkCore | 8 → 9 | 查询变更,迁移格式 |
| Serilog.AspNetCore | 7 → 8 | 配置格式 |
| Swashbuckle.AspNetCore | 6 → 7 | 最小 API 支持 |
| 优先级 | 工具 | 使用时机 |
|---|---|---|
| 1 | mcp__context7__query-docs | 查找库文档的首选 |
| 2 | mcp__Ref__ref_search_documentation | 官方 Microsoft 文档 |
| 3 | WebSearch | 最新信息,社区解决方案 |
| 步骤 | 工具 | 参数 |
|---|
| 操作 | 工具 | 查询示例 |
|---|---|---|
| 搜索 | mcp__Ref__ref_search_documentation | "dotnet EntityFrameworkCore 9 migration guide" |
| 阅读 | mcp__Ref__ref_read_url | URL 来自搜索结果 |
当 Context7/Ref 无结果时使用:
"<package> .NET <version> breaking changes migration""<error code> <package> fix"| 优先级 | 包类型 |
|---|---|
| 1 | SDK/运行时 (Microsoft.NET.Sdk) |
| 2 | 框架 (Microsoft.AspNetCore.*) |
| 3 | EF Core (影响迁移) |
| 4 | 日志记录 (Serilog.*) |
| 5 | 其他包 |
| 操作 | 命令 |
|---|---|
| 更新特定包 | dotnet add package <name> --version <ver> |
| 更新所有包 | dotnet outdated --upgrade |
| 步骤 | 命令 |
|---|---|
| 还原 | dotnet restore |
| 构建 | dotnet build --configuration Release |
| 测试 | dotnet test |
| 字段 | 描述 |
|---|---|
| solution | 解决方案路径 |
| projects[] | 更新的项目 |
| duration | 总耗时 |
| upgrades[] | 应用的升级 |
| buildVerification | 通过 或 失败 |
| testResults | X 通过,Y 失败 |
Options:
# Upgrade scope
upgradeType: major # major | minor | patch
# Security
auditLevel: high
minimumReleaseAge: 14
# .NET specific
includePrerelease: false
targetFramework: net10.0
# Verification
runTests: true
runBuild: true
| 错误 | 原因 | 解决方案 |
|---|---|---|
| CS0246 | 缺少类型 | 搜索替代 API |
| NU1605 | 检测到降级 | 检查包约束 |
| 构建失败 | 破坏性变更 | 通过 Context7 应用迁移 |
dotnet list package --vulnerable)dotnet restore, dotnet build, dotnet test 全部通过版本: 1.1.0 最后更新: 2026-01-10
每周安装次数
77
仓库
GitHub 星标
253
首次出现
2026年3月8日
安全审计
安装于
cursor73
claude-code71
github-copilot70
codex70
kimi-cli70
opencode70
Paths: File paths (
shared/,references/,../ln-*) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root. Ifshared/is missing, fetch files via WebFetch fromhttps://raw.githubusercontent.com/levnikolaevich/claude-code-skills/master/skills/{path}.
Type: L3 Worker Category: 8XX Optimization Parent: ln-820-dependency-optimization-coordinator
Upgrades .NET NuGet packages with automatic breaking change detection and migration.
| Aspect | Details |
|---|---|
| Input | Solution/project path |
| Output | Updated .csproj files, migration report |
| Supports | .NET 6, 7, 8, 9, 10 |
Phases: Pre-flight → Find Projects → Security Audit → Check Outdated → Identify Breaking → Apply Upgrades → Restore & Build → Report
| Check | Required | Action if Missing |
|---|---|---|
| .csproj file(s) | Yes | Block upgrade |
| .sln file | No | Use csproj discovery instead |
| Git clean state | Yes | Block (need clean baseline for revert) |
Workers assume coordinator (ln-820) already verified git state and created backup.
MANDATORY READ: Load shared/references/git_worktree_fallback.md — use ln-822 row.
| Method | Command |
|---|---|
| Find .csproj | Get-ChildItem -Recurse -Filter *.csproj |
| From solution | dotnet sln list |
| Check | Command |
|---|---|
| Vulnerable packages | dotnet list package --vulnerable |
| Outdated packages | dotnet list package --outdated |
| Severity | Action |
|---|---|
| Critical | Block upgrade, report |
| High | Warn, continue |
| Moderate/Low | Log only |
| Step | Command |
|---|---|
| Install tool | dotnet tool install --global dotnet-outdated-tool |
| Check | dotnet outdated --output json |
| Package | Breaking Version | Key Changes |
|---|---|---|
| Microsoft.EntityFrameworkCore | 8 → 9 | Query changes, migration format |
| Serilog.AspNetCore | 7 → 8 | Configuration format |
| Swashbuckle.AspNetCore | 6 → 7 | Minimal API support |
| Priority | Tool | When to Use |
|---|---|---|
| 1 | mcp__context7__query-docs | First choice for library docs |
| 2 | mcp__Ref__ref_search_documentation | Official Microsoft docs |
| 3 | WebSearch | Latest info, community solutions |
| Step | Tool | Parameters |
|---|---|---|
| 1. Find library | mcp__context7__resolve-library-id | libraryName: "EntityFrameworkCore" |
| 2. Query docs | mcp__context7__query-docs | query: "EF Core 8 to 9 migration breaking changes" |
| Action | Tool | Query Example |
|---|---|---|
| Search | mcp__Ref__ref_search_documentation | "dotnet EntityFrameworkCore 9 migration guide" |
| Read | mcp__Ref__ref_read_url | URL from search results |
Use when Context7/Ref return no results:
"<package> .NET <version> breaking changes migration""<error code> <package> fix"| Priority | Package Type |
|---|---|
| 1 | SDK/Runtime (Microsoft.NET.Sdk) |
| 2 | Framework (Microsoft.AspNetCore.*) |
| 3 | EF Core (affects migrations) |
| 4 | Logging (Serilog.*) |
| 5 | Other packages |
| Action | Command |
|---|---|
| Update specific | dotnet add package <name> --version <ver> |
| Update all | dotnet outdated --upgrade |
| Step | Command |
|---|---|
| Restore | dotnet restore |
| Build | dotnet build --configuration Release |
| Test | dotnet test |
| Field | Description |
|---|---|
| solution | Solution path |
| projects[] | Updated projects |
| duration | Total time |
| upgrades[] | Applied upgrades |
| buildVerification | PASSED or FAILED |
| testResults | X passed, Y failed |
Options:
# Upgrade scope
upgradeType: major # major | minor | patch
# Security
auditLevel: high
minimumReleaseAge: 14
# .NET specific
includePrerelease: false
targetFramework: net10.0
# Verification
runTests: true
runBuild: true
| Error | Cause | Solution |
|---|---|---|
| CS0246 | Missing type | Search for replacement API |
| NU1605 | Downgrade detected | Check package constraints |
| Build fail | Breaking change | Apply migration via Context7 |
dotnet list package --vulnerable)dotnet restore, dotnet build, dotnet test all passVersion: 1.1.0 Last Updated: 2026-01-10
Weekly Installs
77
Repository
GitHub Stars
253
First Seen
Mar 8, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
cursor73
claude-code71
github-copilot70
codex70
kimi-cli70
opencode70