Microsoft Skill Creator
Create hybrid skills for Microsoft technologies that store essential knowledge locally while enabling dynamic Learn MCP lookups for deeper details.
About Skills
Skills are modular packages that extend agent capabilities with specialized knowledge and workflows. A skill transforms a general-purpose agent into a specialized one for a specific domain.
Skill Structure
CODEBLOCK0
Key Principles
- - Frontmatter is critical:
name and description determine when the skill triggers—be clear and comprehensive - Concise is key: Only include what agents don't already know; context window is shared
- No duplication: Information lives in SKILL.md OR reference files, not both
Learn MCP Tools
| Tool | Purpose | When to Use |
|---|
| INLINECODE2 | Search official docs | First pass discovery, finding topics |
| INLINECODE3 |
Get full page content | Deep dive into important pages |
|
microsoft_code_sample_search | Find code examples | Get implementation patterns |
CLI Alternative
If the Learn MCP server is not available, use the mslearn CLI from the command line instead:
CODEBLOCK1
| MCP Tool | CLI Command |
|---|
| INLINECODE6 | INLINECODE7 |
| INLINECODE8 |
mslearn code-search "..." --language ... |
|
microsoft_docs_fetch(url: "...") |
mslearn fetch "..." |
Generated skills should include this same CLI fallback table so agents can use either path.
Creation Process
Step 1: Investigate the Topic
Build deep understanding using Learn MCP tools in three phases:
Phase 1 - Scope Discovery:
CODEBLOCK2
Phase 2 - Core Content:
CODEBLOCK3
Phase 3 - Depth:
CODEBLOCK4
Investigation Checklist
After investigating, verify:
- - [ ] Can explain what the technology does in one paragraph
- [ ] Identified 3-5 key concepts
- [ ] Have working code for basic usage
- [ ] Know the most common API patterns
- [ ] Have search queries for deeper topics
Step 2: Clarify with User
Present findings and ask:
- 1. "I found these key areas: [list]. Which are most important?"
- "What tasks will agents primarily perform with this skill?"
- "Which programming language should code samples prioritize?"
Step 3: Generate the Skill
Use the appropriate template from skill-templates.md:
| Technology Type | Template |
|---|
| Client library, NuGet/npm package | SDK/Library |
| Azure resource |
Azure Service |
| App development framework | Framework/Platform |
| REST API, protocol | API/Protocol |
Generated Skill Structure
CODEBLOCK5
Step 4: Balance Local vs Dynamic Content
Store locally when:
- - Foundational (needed for any task)
- Frequently accessed
- Stable (won't change)
- Hard to find via search
Keep dynamic when:
- - Exhaustive reference (too large)
- Version-specific
- Situational (specific tasks only)
- Well-indexed (easy to search)
Content Guidelines
| Content Type | Local | Dynamic |
|---|
| Core concepts (3-5) | ✅ Full | |
| Hello world code |
✅ Full | |
| Common patterns (3-5) | ✅ Full | |
| Top API methods | Signature + example | Full docs via fetch |
| Best practices | Top 5 bullets | Search for more |
| Troubleshooting | | Search queries |
| Full API reference | | Doc links |
Step 5: Validate
- 1. Review: Is local content sufficient for common tasks?
- Test: Do suggested search queries return useful results?
- Verify: Do code samples run without errors?
Common Investigation Patterns
For SDKs/Libraries
CODEBLOCK6
For Azure Services
CODEBLOCK7
For Frameworks/Platforms
CODEBLOCK8
Example: Creating a "Semantic Kernel" Skill
Investigation
CODEBLOCK9
Generated Skill
CODEBLOCK10
Generated SKILL.md
CODEBLOCK11
Microsoft Skill Creator
为Microsoft技术创建混合技能,将关键知识本地存储,同时支持动态的Learn MCP查询以获取更详细信息。
关于技能
技能是模块化包,通过专业知识和工作流扩展代理能力。一个技能可以将通用代理转变为特定领域的专业代理。
技能结构
skill-name/
├── SKILL.md (必需) # 前置元数据(名称、描述)+ 指令
├── references/ # 按需加载到上下文中的文档
├── sample_codes/ # 可运行的代码示例
└── assets/ # 输出中使用的文件(模板等)
关键原则
- - 前置元数据至关重要:name 和 description 决定技能何时触发——需清晰且全面
- 简洁是关键:只包含代理尚不了解的内容;上下文窗口是共享的
- 避免重复:信息要么放在SKILL.md中,要么放在引用文件中,不可两者兼有
Learn MCP工具
| 工具 | 用途 | 使用时机 |
|---|
| microsoftdocssearch | 搜索官方文档 | 初步发现,查找主题 |
| microsoftdocsfetch |
获取完整页面内容 | 深入阅读重要页面 |
| microsoft
codesample_search | 查找代码示例 | 获取实现模式 |
CLI替代方案
如果Learn MCP服务器不可用,可使用命令行中的 mslearn CLI 替代:
sh
直接运行(无需安装)
npx @microsoft/learn-cli search semantic kernel overview
或全局安装后运行
npm install -g @microsoft/learn-cli
mslearn search semantic kernel overview
| MCP工具 | CLI命令 |
|---|
| microsoftdocssearch(query: ...) | mslearn search ... |
| microsoftcodesample_search(query: ..., language: ...) |
mslearn code-search ... --language ... |
| microsoft
docsfetch(url: ...) | mslearn fetch ... |
生成的技能应包含相同的CLI回退表,以便代理可以使用任一方式。
创建流程
步骤1:调研主题
使用Learn MCP工具分三个阶段建立深入理解:
阶段1 - 范围发现:
microsoftdocssearch(query={technology} overview what is)
microsoftdocssearch(query={technology} concepts architecture)
microsoftdocssearch(query={technology} getting started tutorial)
阶段2 - 核心内容:
microsoftdocsfetch(url=...) # 获取阶段1中的页面
microsoftcodesample_search(query={technology}, language={lang})
阶段3 - 深入:
microsoftdocssearch(query={technology} best practices)
microsoftdocssearch(query={technology} troubleshooting errors)
调研检查清单
调研后,验证:
- - [ ] 能用一段话解释该技术的功能
- [ ] 已识别3-5个关键概念
- [ ] 有基本用法的可运行代码
- [ ] 了解最常见的API模式
- [ ] 有用于深入主题的搜索查询
步骤2:与用户确认
展示调研结果并询问:
- 1. 我发现了这些关键领域:[列表]。哪些最重要?
- 代理主要使用此技能执行哪些任务?
- 代码示例应优先使用哪种编程语言?
步骤3:生成技能
使用 skill-templates.md 中的相应模板:
| 技术类型 | 模板 |
|---|
| 客户端库,NuGet/npm包 | SDK/库 |
| Azure资源 |
Azure服务 |
| 应用开发框架 | 框架/平台 |
| REST API,协议 | API/协议 |
生成的技能结构
{skill-name}/
├── SKILL.md # 核心知识 + Learn MCP指南
├── references/ # 详细的本地文档(如需要)
└── sample_codes/ # 可运行的代码示例
├── getting-started/
└── common-patterns/
步骤4:平衡本地与动态内容
本地存储时机:
- - 基础性内容(任何任务都需要)
- 频繁访问的内容
- 稳定不变的内容
- 难以通过搜索找到的内容
保持动态时机:
- - 详尽参考(内容过大)
- 版本特定内容
- 情境性内容(仅特定任务需要)
- 索引良好的内容(易于搜索)
内容指南
| 内容类型 | 本地 | 动态 |
|---|
| 核心概念(3-5个) | ✅ 完整 | |
| Hello world代码 |
✅ 完整 | |
| 常见模式(3-5个) | ✅ 完整 | |
| 顶级API方法 | 签名+示例 | 通过fetch获取完整文档 |
| 最佳实践 | 前5条要点 | 搜索更多 |
| 故障排除 | | 搜索查询 |
| 完整API参考 | | 文档链接 |
步骤5:验证
- 1. 审查:本地内容是否足以处理常见任务?
- 测试:建议的搜索查询是否返回有用结果?
- 验证:代码示例是否能无错误运行?
常见调研模式
针对SDK/库
{name} overview → 用途、架构
{name} getting started quickstart → 设置步骤
{name} API reference → 核心类/方法
{name} samples examples → 代码模式
{name} best practices performance → 优化
针对Azure服务
{service} overview features → 功能
{service} quickstart {language} → 设置代码
{service} REST API reference → 端点
{service} SDK {language} → 客户端库
{service} pricing limits quotas → 约束
针对框架/平台
{framework} architecture concepts → 心智模型
{framework} project structure → 约定
{framework} tutorial walkthrough → 端到端流程
{framework} configuration options → 自定义
示例:创建Semantic Kernel技能
调研
microsoftdocssearch(query=semantic kernel overview)
microsoftdocssearch(query=semantic kernel plugins functions)
microsoftcodesample_search(query=semantic kernel, language=csharp)
microsoftdocsfetch(url=https://learn.microsoft.com/semantic-kernel/overview/)
生成的技能
semantic-kernel/
├── SKILL.md
└── sample_codes/
├── getting-started/
│ └── hello-kernel.cs
└── common-patterns/
├── chat-completion.cs
└── function-calling.cs
生成的SKILL.md
markdown
name: semantic-kernel
description: 使用Microsoft Semantic Kernel构建AI代理。适用于在.NET或Python中构建具有插件、规划器和记忆功能的LLM驱动应用。
Semantic Kernel
用于将LLM集成到应用程序中的编排SDK,支持插件、规划器和记忆功能。
关键概念
- - Kernel:管理AI服务和插件的中央编排器
- 插件:AI可调用的函数集合
- 规划器:对插件函数进行排序以实现目标
- 记忆:用于RAG模式的向量存储集成
快速入门
参见 getting-started/hello-kernel.cs
了解更多
| 主题 | 查找方式 |
|---|
| 插件开发 | microsoftdocssearch(query=semantic kernel plugins custom functions) |
| 规划器 |
microsoft
docssearch(query=semantic kernel planner) |
| 记忆 | microsoft
docsfetch(url=https://learn.microsoft.com/en-us/semantic-kernel/frameworks/agent/agent-memory) |
CLI替代方案
如果Learn MCP服务器不可用,可使用 mslearn CLI 替代:
| MCP工具 | CLI命令 |
|---|
| microsoftdocssearch(query: ...) | mslearn search ... |
| microsoftcodesample_search(query: ..., language: ...) |
mslearn code-search ... --language ... |
| microsoft
docsfetch(url: ...) | mslearn fetch ... |
直接使用 npx @microsoft/learn-cli 运行,或使用 npm install -g @microsoft/learn-cli 全局安装。