Create hybrid skills for Microsoft technologies that store essential knowledge locally while enabling dynamic Learn MCP lookups for deeper details.
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-name/
├── SKILL.md (required) # Frontmatter (name, description) + instructions
├── references/ # Documentation loaded into context as needed
├── sample_codes/ # Working code examples
└── assets/ # Files used in output (templates, etc.)
- 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
| Tool | Purpose | When to Use |
|---|
microsoft_docs_search
| Search official docs | First pass discovery, finding topics |
microsoft_docs_fetch
| Get full page content | Deep dive into important pages |
microsoft_code_sample_search
| Find code examples | Get implementation patterns |
If the Learn MCP server is not available, use the mslearn CLI from a terminal or shell (for example, Bash, PowerShell, or cmd) instead:
Version note: The pinned version below (@1.2.3) has been reviewed and recorded in CHANGELOG.md. Before upgrading, re-run the security review and update all occurrences in this file and in references/skill-templates.md atomically.
# Run directly (no install needed)
npx @microsoft/learn-cli@1.2.3 search "semantic kernel overview"
# Or install globally, then run
npm install -g --ignore-scripts @microsoft/learn-cli@1.2.3
mslearn search "semantic kernel overview"
| MCP Tool | CLI Command |
|---|
microsoft_docs_search(query: "...")
| mslearn search "..."
|
microsoft_code_sample_search(query: "...", language: "...")
| 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.
Build deep understanding using Learn MCP tools in three phases:
Phase 1 - Scope Discovery:
microsoft_docs_search(query="{technology} overview what is")
microsoft_docs_search(query="{technology} concepts architecture")
microsoft_docs_search(query="{technology} getting started tutorial")
Phase 2 - Core Content:
URL safety rule (enforced before every fetch): Only pass a URL to microsoft_docs_fetch if its scheme is https and its host is exactly learn.microsoft.com. Discard any URL from search results that does not satisfy both conditions and do not fetch it.
microsoft_docs_fetch(url="...") # Fetch only validated learn.microsoft.com pages from Phase 1
microsoft_code_sample_search(query="{technology}", language="{lang}")
Phase 3 - Depth:
microsoft_docs_search(query="{technology} best practices")
microsoft_docs_search(query="{technology} troubleshooting errors")
After investigating, verify:
Present findings and ask:
- "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?"
Skill-name safety rule (enforced before creating any files): The value supplied for {skill-name} must match the pattern ^[a-zA-Z0-9][a-zA-Z0-9_-]{0,63}$. It must not contain /, \, ., or any whitespace. If the user-provided name does not match, ask the user to provide a valid name before proceeding. Never construct a file path from an unsanitized input.
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 |
{skill-name}/
├── SKILL.md # Core knowledge + Learn MCP guidance
├── references/ # Detailed local documentation (if needed)
└── sample_codes/ # Working code examples
├── getting-started/
└── common-patterns/
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 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 |
- Review: Is local content sufficient for common tasks?
- Test: Do suggested search queries return useful results?
- Verify: Do code samples run without errors?
"{name} overview" → purpose, architecture
"{name} getting started quickstart" → setup steps
"{name} API reference" → core classes/methods
"{name} samples examples" → code patterns
"{name} best practices performance" → optimization
"{service} overview features" → capabilities
"{service} quickstart {language}" → setup code
"{service} REST API reference" → endpoints
"{service} SDK {language}" → client library
"{service} pricing limits quotas" → constraints
"{framework} architecture concepts" → mental model
"{framework} project structure" → conventions
"{framework} tutorial walkthrough" → end-to-end flow
"{framework} configuration options" → customization
microsoft_docs_search(query="semantic kernel overview")
microsoft_docs_search(query="semantic kernel plugins functions")
microsoft_code_sample_search(query="semantic kernel", language="csharp")
microsoft_docs_fetch(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
---
name: semantic-kernel
description: Build AI agents with Microsoft Semantic Kernel. Use for LLM-powered apps with plugins, planners, and memory in .NET or Python.
---
# Semantic Kernel
Orchestration SDK for integrating LLMs into applications with plugins, planners, and memory.
## Key Concepts
- **Kernel**: Central orchestrator managing AI services and plugins
- **Plugins**: Collections of functions the AI can call
- **Planner**: Sequences plugin functions to achieve goals
- **Memory**: Vector store integration for RAG patterns
## Quick Start
See [getting-started/hello-kernel.cs](sample_codes/getting-started/hello-kernel.cs)
## Learn More
| Topic | How to Find |
|-------|-------------|
| Plugin development | `microsoft_docs_search(query="semantic kernel plugins custom functions")` |
| Planners | `microsoft_docs_search(query="semantic kernel planner")` |
| Memory | `microsoft_docs_fetch(url="https://learn.microsoft.com/en-us/semantic-kernel/frameworks/agent/agent-memory")` |
## CLI Alternative
If the Learn MCP server is not available, use the `mslearn` CLI instead:
| MCP Tool | CLI Command |
|----------|-------------|
| `microsoft_docs_search(query: "...")` | `mslearn search "..."` |
| `microsoft_code_sample_search(query: "...", language: "...")` | `mslearn code-search "..." --language ...` |
| `microsoft_docs_fetch(url: "...")` | `mslearn fetch "..."` |
Run directly with `npx @microsoft/learn-cli@1.2.3 <command>` or install globally with `npm install -g --ignore-scripts @microsoft/learn-cli@1.2.3`.