Microsoft .NET Team Experiments with Packaging AI Agent Skills in NuGet
Microsoft demonstrates distributing SKILL.md files via NuGet to give AI coding agents version-specific API guidance, though manual import is required and model benefits vary.
The Microsoft .NET team has published experimental results demonstrating how to encapsulate AI Agent Skills within NuGet packages. This approach allows library developers to provide corresponding usage guidelines when releasing new versions, helping AI programming agents better understand how to use new APIs and reducing errors caused by reliance on outdated model training data.
Agent Skills is a mechanism that provides operational instructions to AI agents via SKILL.md files, which document applicable scenarios, execution steps, and related knowledge. Previously, these skills were primarily distributed through Git repositories or skill marketplaces. Microsoft's experiment uses NuGet as a carrier, enabling different versions of libraries to carry their own applicable documentation. When a .NET project executes dotnet restore, NuGet downloads dependencies to the local cache, including any embedded SKILL.md files.
However, downloading a package does not mean the AI agent will automatically use the skills contained within it. Agents must still discover and read these files themselves, or use accompanying tools to find and import them. Microsoft showcased two auxiliary tools: dotnet-inspect, which checks for skills included in NuGet packages or project dependencies, listing names, locations, and descriptions; and dotnet-package-skills, which scans project packages and copies skills to the .agents/skills directory for inclusion in version control.
Microsoft demonstrated this using the Markout library, which includes five skills covering output formats and content composition. Test results showed varying impacts on AI models of different capabilities: for powerful models already capable of completing most development tasks, adding skills resulted in limited performance improvement; for weaker models, they might fail to consistently follow the skill guidelines. Additionally, poorly designed skill content could increase token consumption, requiring maintainers to evaluate actual benefits.