首页›.NET Blog›文章

Delivering Skills in NuGet packages

Richard Lander · 2026年11月3日

AI 摘要 AI 生成,可能有误

本文介绍了通过 NuGet 包交付 Anthropic 风格的智能体技能(即带有 YAML 头部的 SKILL.md Markdown 文件),作为传统 git 仓库分发方式的替代方案。由于技能与包的二进制文件共同存放,这可确保每个版本都附带量身定制的完美指引,即使是比模型训练数据更新的 API 也不例外。作者构建了 dotnet-inspect 和 dotnet-package-skills 等工具来发现、检查和安装包内技能,下一步计划提供 NuGet MCP 支持。主要经验包括:包技能遵循与传统技能相同的格式和评估实践;维护者必须对有效性和效率进行测试(主要针对前沿模型,因为仅用廉价模型进行测试是一种反模式);未来的重点是维护者指南。

Agent skills were introduced by Anthropic in 2025 and have quickly become commonplace for AI-driven development. dotnet/skills and Impeccable skills are good examples. Agent skills are typically distributed via git repos. We’ve been working on skill delivery via NuGet packages and found that the approach can be effective. The common thread is that repos and packages are units of development that can be used as distribution vehicles for skills.

Skills solve two main problems: fill in gaps in model knowledge and can prescribe “our way” of approaching a task. New NuGet packages will always be ahead of model training and can benefit from just-in-time skill delivery.

Here’s a quick demo using the markout package, whch contains a set of skills:

继续阅读全文

为了尊重作者,这里只展示开头几段。你可以去原文阅读,或者在 HorizonReader 里读:划线做笔记、让 AI 帮忙。

更多来自 .NET Blog

Build a .NET decision agent with Microsoft Agent Framework and Foundry

AI 摘要The article walks through building a .NET agent that uses the Microsoft-Decision-1.1 decision model to route support tickets to the appropriate team, demonstrating that agents don't require conversational models to be useful. It shows how to implement the decision logic inside a Microsoft Agent Framework AIAgent, return structured results as typed C# records, and expose the agent through the Foundry Responses protocol. The same implementation can run locally with Azure CLI credentials or be hosted in Foundry using managed identity.

Introducing DocumentExtractionClient (preview): Extract documents in .NET

AI 摘要Microsoft has introduced a preview of DocumentExtractionClient in Microsoft.Extensions.DocumentExtraction, a unified .NET API that extracts structured content (headings, paragraphs, tables, figures, and sources) from PDFs, scans, images, and Office files. Starter providers in the .NET AI Community Toolkit—including PdfPig, vision language models via IChatClient, Azure Content Understanding, Azure AI Document Intelligence, and Mistral OCR—are interchangeable, so code can swap providers without rewrites, following the familiar IChatClient pattern with support for middleware and custom providers. Extracted documents can feed into Microsoft.Extensions.DataIngestion pipelines to power context engineering, agentic workflows, and retrieval-augmented generation (RAG), with single-file C# samples available in a GitHub repository.

Run local models in your .NET apps with Llama on Windows

AI 摘要Llama on Windows is a free, open-source system tray app built by the Hugging Face and llama.cpp teams that lets you find, download, and chat with open AI models running locally on your PC. It manages a llama.cpp server on localhost that exposes an OpenAI-compatible API, so .NET apps can call local models using the familiar OpenAI client libraries and Microsoft.Extensions.AI's IChatClient, with no API key required. The article walks through installing Llama, downloading a model, and building a .NET 11 file-based chat app with streaming responses and tool calling.

AI is Changing the Cross-Platform Decision Matrix

AI 摘要The author ran an experiment using AI coding agents to rebuild the iOS and Android UIs of a .NET MAUI app with platform-specific UIs over a shared C# library, to assess how AI agents change the cross-platform technology decision. The agent-driven rewrite took under four hours of human time, and the platform UI versions outperformed .NET MAUI at runtime (roughly 50% faster startup on Android, 35% on iOS, and smaller packages), though adding a feature to two UIs cost about 1.4x the worker model time of the single MAUI version. The key finding is that AI agents make building a second UI cheap, but owning and verifying it still carries real costs—the coordinating agent consumed more model time than both implementation workers combined.

Introducing staged publishing on NuGet.org

AI 摘要NuGet.org has introduced staged publishing, a feature that lets package publishers upload packages privately for validation—such as malware scanning and signature checks—before an authorized maintainer explicitly promotes them to the public feed. Unlike unlisted packages, staged packages are completely unavailable to consumers, and publishers can organize related packages into staging groups for release-level review, with promotion requiring a signed-in authorized user with two-factor authentication. The feature is opt-in, supported in the .NET 11 RC2 SDK via a new stage push CLI command, and is recommended for security fixes awaiting coordinated disclosure, feature releases, and large updates, ideally combined with Trusted Publishing and staging-only credentials so compromised pipeline credentials cannot publish directly.