A .NET 10 tool that analyzes NuGet package upgrades between two versions, fetches release notes from GitHub, and generates a GitHub Copilot skill with migration instructions, breakdown docs, and Roslyn-based code transformation scripts.
Given a NuGet package name and two version numbers, this tool runs a 5-phase AI pipeline:
- Discovery — Finds the package's source repository on GitHub and lists all release tags between the two versions
- Analyze — Fetches and analyzes release notes for each version in chunks, extracting breaking changes, renames, and deprecations
- Compile — Merges and deduplicates findings into a unified migration guide
- Generate — Produces a SKILL.md, focused breakdown markdown docs, and a Roslyn migration script
- Review — Cross-references all output against source evidence, fixes hallucinations or missing items
The tool writes a complete Copilot skill to .copilot/skills/<package>-migration/ in the target repository:
.copilot/skills/microsoft-agents-ai-openai-migration/
├── SKILL.md # Main skill file with YAML frontmatter
├── breaking-changes.md # Detailed breaking changes with code examples
├── api-renames.md # Type, method, and namespace renames
├── dependency-changes.md # Package reference updates
├── new-features.md # New APIs and patterns to adopt
├── deprecations.md # Deprecated APIs and replacements
└── scripts/
└── migrate.csx # Roslyn-based automated migration script
Working/validation artifacts are written to output/<package>/validation/ (gitignored).
- .NET 10 SDK
- A GitHub Copilot subscription (used via the GitHub Copilot SDK)
dotnet-script(to run the generated migration scripts)
dotnet tool install -g dotnet-scriptdnx PackageUpdateSkillOr install manually:
dotnet pack PackageUpdateSkill
dotnet tool install --global --add-source ./PackageUpdateSkill/nupkg PackageUpdateSkillLinux / macOS:
curl -fsSL https://raw.githubusercontent.com/seiggy/package-update-skill/master/install.sh | shOr set a specific version and install directory:
VERSION=v0.1.0 INSTALL_DIR=~/.local/bin curl -fsSL https://raw.githubusercontent.com/seiggy/package-update-skill/master/install.sh | shWindows (PowerShell):
# Download latest release for Windows x64
$release = Invoke-RestMethod "https://api.github.com/repos/seiggy/package-update-skill/releases/latest"
$asset = $release.assets | Where-Object { $_.name -match "win-x64.zip" }
Invoke-WebRequest $asset.browser_download_url -OutFile package-update-skill.zip
Expand-Archive package-update-skill.zip -DestinationPath "$env:LOCALAPPDATA\Programs\package-update-skill"
# Add to PATH in your profilePre-built AOT native binaries are attached to each GitHub Release:
| Platform | Asset |
|---|---|
| Linux x64 | package-update-skill-linux-x64.tar.gz |
| Linux ARM64 | package-update-skill-linux-arm64.tar.gz |
| macOS ARM64 (Apple Silicon) | package-update-skill-osx-arm64.tar.gz |
| Windows x64 | package-update-skill-win-x64.zip |
| Windows ARM64 | package-update-skill-win-arm64.zip |
package-update-skill <PackageName> <FromVersion> <ToVersion> [--model <model>] [--dir <repoDir>]| Flag | Default | Description |
|---|---|---|
--model <model> |
gpt-5 |
LLM model to use (e.g., gpt-5, claude-opus-4.6, gpt-5.2-codex) |
--dir <repoDir> |
Current directory | Repository root where .copilot/skills/ will be created |
--paranoid |
Off | Scans external content for prompt injection attempts, adds defensive prompts, generates a security report |
--debug |
Off | Retains intermediate output/validation files after completion (normally cleaned up) |
| Variable | Required | Description |
|---|---|---|
GITHUB_TOKEN |
Optional | GitHub PAT — falls back to Copilot SDK auth |
# Analyze a package upgrade and write the skill to the current repo
package-update-skill Microsoft.Agents.AI.OpenAI 1.0.0-preview.251007.1 1.0.0-preview.260209.1
# Use a specific model and target a different repo
package-update-skill Newtonsoft.Json 12.0.3 13.0.3 --model claude-opus-4.6 --dir /path/to/my-project
# Run via dnx without installing
dnx PackageUpdateSkill Microsoft.Agents.AI.OpenAI 1.0.0-preview.251007.1 1.0.0-preview.260209.1flowchart LR
D["🔍 Discovery\nNuGet README\nGitHub tags"]
A["📝 Analyze\n(chunked)\nGitHub release notes"]
C["🔗 Compile\nMerge &\ndeduplicate"]
G["⚙️ Generate\nSKILL.md\nBreakdown docs\nmigrate.csx"]
R["✅ Review\nCross-ref vs evidence\nFix issues"]
D --> A --> C --> G --> R
Each phase runs as an isolated Copilot SDK session with only the tools it needs. The tool uses:
- GitHub Copilot SDK — LLM inference + built-in GitHub tools (repo search, releases, file contents)
- NuGet MCP Server (
dotnet tool exec NuGet.Mcp.Server) — package metadata and README - Microsoft.CodeAnalysis.CSharp (Roslyn) — powers the generated migration scripts
This tool ingests untrusted external content (NuGet READMEs, GitHub release notes) and feeds it to an LLM that generates executable code (migrate.csx). This creates a prompt injection attack surface.
The --paranoid flag enables a defense-in-depth approach with two complementary validation layers:
Layer 1: Regex Fast-Pass (free, instant)
- Scans for 25+ known injection patterns:
ignore previous instructions,<|im_start|>,[SYSTEM], role hijacking markers, etc. - Catches obvious, unobfuscated attacks immediately
- Zero latency cost — runs before any LLM calls
Layer 2: LLM Semantic Analysis (deep, thorough)
- Uses the Copilot SDK to run a dedicated security-analyst session
- Content is wrapped in
<untrusted>tags and analyzed for 7 attack categories:- Direct Override — attempts to change LLM role/instructions
- Token Boundary — fake control tokens (
<|im_start|>,[INST],<<SYS>>) - Role Hijacking — identity assumption, safety removal
- Obfuscated Attacks — Unicode homoglyphs, zero-width chars, base64, ROT13, word splitting
- Indirect Injection — instructions targeting downstream LLM behavior
- Data Exfiltration — attempts to leak env vars, tokens, or send data to external URLs
- Code Injection — reverse shells, credential theft, process spawning disguised as migration code
- Validator sessions have all tools denied (pure text analysis, no file/network access)
- Separate
ValidateGeneratedScriptAsyncmethod specifically reviews.csxfiles for malicious code patterns
- Input validation — Package names and versions are validated against strict patterns; path traversal is blocked
- Content sandboxing — External content is wrapped in
<untrusted-content>delimiters with explicit instructions to the LLM to extract only factual data - Anti-injection prompts — All phases include defensive language instructing the LLM to ignore embedded instructions
- Review phase — Phase 5 cross-references output against source evidence to catch hallucinations
- Security report — When
--paranoidis used, asecurity-report.mdis generated in the validation directory with all findings from both layers
- Always review
migrate.csxbefore running — it executes arbitrary code on your machine - Use
--paranoidfor unfamiliar packages — especially community packages you haven't vetted - Check PR links — every change in the output should trace to a real GitHub PR
- Diff validation artifacts — compare
validation/compiled-summary.mdagainst the generated skill