microsoft-code-referen…
Find working code samples, verify API signatures, and fix Microsoft SDK errors using official…
Create agent skills for Microsoft technologies using official documentation. Use whenever the user wants to build, generate, or scaffold a skill for any Microsoft technology (Azure, .NET, M365, VS Code, Bicep, etc.)—even phrased casually like "make a skill for Cosmos DB."
$ npx -y skills add MicrosoftDocs/mcp --skill microsoft-skill-creator --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/microsoft-skill-creatorContext preview
The summary Claude sees to decide when to auto-load this skill.
Create agent skills for Microsoft technologies using official documentation. Use whenever the user wants to build, generate, or scaffold a skill for any Microsoft technology (Azure, .NET, M365, VS Code, Bicep, etc.)—even phrased casually like "make a skill for Cosmos DB."
name: microsoft-skill-creator description: Create agent skills for Microsoft technologies using official documentation. Use whenever the user wants to build, generate, or scaffold a skill for any Microsoft technology (Azure, .NET, M365, VS Code, Bicep, etc.)—even phrased casually like "make a skill for Cosmos DB." Investigates the topic via official docs, then generates a hybrid skill with essential knowledge stored locally and dynamic lookups for depth. context: fork compatibility: Primarily uses the Microsoft Learn MCP Server (https://learn.microsoft.com/api/mcp); if that is unavailable, fall back to the mslearn CLI (`npx @microsoft/learn-cli`).
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.)
| 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 the command line instead:
# Run directly (no install needed) npx @microsoft/learn-cli search "semantic kernel overview" # Or install globally, then run npm install -g @microsoft/learn-cli 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:**
microsoft_docs_fetch(url="...") # Fetch 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: 1. "I found these key areas: [list]. Which are most important?" 2. "What tasks will agents primarily perform with this skill?" 3. "Which programming language should code samples prioritize?"
Use the appropriate template from [skill-templates.md](references/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:**
**Keep dynamic when:**
| 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 |
1. Review: Is local content sufficient for common tasks? 2. Test: Do suggested search queries return useful results? 3. 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 {langStop AI Hallucinations. Give your AI assistant (Claude, Cursor, Copilot, Codex, ...) direct access to the latest official Microsoft documentation. ✨ Free. One-click install. No key needed.
Repo: MicrosoftDocs/mcp
Find working code samples, verify API signatures, and fix Microsoft SDK errors using official…
Understand Microsoft technologies by querying official documentation. Use whenever the user…