关于 microsoft-docs
面向 Microsoft 技术文档的研究技能,会根据文档所在位置将查询导向 Microsoft Learn 或其他指定来源。
主要功能
- 01Microsoft Learn 搜索与抓取
- 02代码示例查询
- 03Aspire 文档来源路由
- 04VS Code 与 GitHub 文档路由
- 05具体的查询编写指引
适用场景
- 01查找 Azure 或 .NET 指南
- 02检索文档中的代码示例
- 03查询 Aspire CLI 文档
- 04查阅 VS Code 或 GitHub 参考
MCP 相关
指导使用 Microsoft Learn MCP 工具搜索和抓取页面、查找代码示例;也指出何时使用 Aspire MCP Server 或 Context7。
安装
复制下面的命令,在终端中运行。
npx skills add https:/ / github.com/ microsoft/ ai-agents-for-beginners --skill microsoft-docs安装后在 Claude Code 中输入/microsoft-docs确认已加载。
详细介绍
Microsoft Docs
面向 Microsoft 技术生态系统的研究技能。涵盖 learn.microsoft.com 以及其他网站上的文档(VS Code、GitHub、Aspire、Agent Framework 仓库)。
默认:Microsoft Learn MCP
对 learn.microsoft.com 上的所有内容 都使用这些工具 — Azure、.NET、M365、Power Platform、Agent Framework、Semantic Kernel、Windows 等。这是查询绝大多数 Microsoft 文档时的主要工具。
| 工具 | 用途 |
|---|---|
microsoft_docs_search | 搜索 learn.microsoft.com — 概念、指南、教程、配置 |
microsoft_code_sample_search | 查找 Learn 文档中的可运行代码片段。传入 language(python、csharp 等)可获得最佳结果 |
microsoft_docs_fetch | 获取指定 URL 的完整页面内容(搜索摘录不够时使用) |
需要完整教程、所有配置选项,或搜索摘录被截断时,请在搜索后使用 microsoft_docs_fetch。
例外情况:何时使用其他工具
以下类别的文档位于 learn.microsoft.com 之外。请改用指定的工具。
Aspire — 使用 Aspire MCP Server(首选)或 Context7
Aspire 文档位于 aspire.dev,而不是 Learn。最佳工具取决于你的 Aspire CLI 版本:
CLI 13.2+(推荐)— Aspire MCP 服务内置了文档搜索工具:
| MCP 工具 | 说明 |
|---|---|
list_docs | 列出 aspire.dev 上所有可用的文档 |
search_docs | 对 aspire.dev 内容进行加权词法搜索 |
get_doc | 按 slug 获取指定文档 |
这些工具随 Aspire CLI 13.2 一同发布(PR #14028)。更新方法:aspire update --self --channel daily。
CLI 13.1 — MCP 服务提供集成查询功能(list_integrations、get_integration_docs),但不提供文档搜索。请改用 Context7:
| Library ID | 用途 |
|---|---|
/microsoft/aspire.dev | 首选 — 指南、集成、CLI 参考、部署 |
/microsoft/aspire | 运行时源代码 — API 内部机制、实现细节 |
/communitytoolkit/aspire | 社区集成 — Go、Java、Node.js、Ollama |
VS Code — 使用 Context7
VS Code 文档位于 code.visualstudio.com,而不是 Learn。
| Library ID | 用途 |
|---|---|
/websites/code_visualstudio | 用户文档 — 设置、功能、调试、远程开发 |
/websites/code_visualstudio_api | 扩展 API — webview、TreeView、命令、扩展点 |
GitHub — 使用 Context7
GitHub 文档位于 docs.github.com 和 cli.github.com。
| Library ID | 用途 |
|---|---|
/websites/github_en | Actions、API、仓库、安全、管理、Copilot |
/websites/cli_github | GitHub CLI(gh)命令和标志 |
Agent Framework — 使用 Learn MCP + Context7
Agent Framework 教程位于 learn.microsoft.com(使用 microsoft_docs_search),但 GitHub 仓库包含 API 级别的详细信息,通常比已发布的文档更新 — 尤其是 DevUI REST API 参考、CLI 选项和 .NET 集成。
| Library ID | 用途 |
|---|---|
/websites/learn_microsoft_en-us_agent-framework | 教程 — DevUI 指南、跟踪、工作流编排 |
/microsoft/agent-framework | API 详细信息 — DevUI REST 端点、CLI 标志、身份验证、.NET AddDevUI/MapDevUI |
DevUI 提示: 查询 Learn 网站源以获取操作指南,然后查询仓库源以了解 API 级别的具体信息(端点架构、代理配置、身份验证令牌)。
Context7 设置
对于任何 Context7 查询,请先解析 Library ID(每个会话只需一次):
- 调用
mcp_context7_resolve-library-id,并传入技术名称 - 使用返回的 Library ID 和具体查询调用
mcp_context7_query-docs
编写有效的查询
请具体说明——包含版本、意图和语言:
# ❌ Too broad
"Azure Functions"
"agent framework"
# ✅ Specific
"Azure Functions Python v2 programming model"
"Cosmos DB partition key design best practices"
"GitHub Actions workflow_dispatch inputs matrix strategy"
"Aspire AddUvicornApp Python FastAPI integration"
"DevUI serve agents tracing OpenTelemetry directory discovery"
"Agent Framework workflow conditional edges branching handoff"
请包含上下文:
- 版本(如相关,例如
.NET 8、Aspire 13、VS Code 1.96) - 任务意图(
quickstart、tutorial、overview、limits、API reference) - 语言(适用于多语言文档,例如
Python、TypeScript、C#)