microsoft-code-reference
Look up Microsoft API references, find working code samples, and verify SDK code is correct. Use when working with Azure SDKs, .NET libraries, or Microsoft APIs—to find the right method, check parameters, get working examples, or troubleshoot errors. Catches hallucinated methods, wrong signatures, and deprecated patterns by querying official docs.
Best use case
microsoft-code-reference is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Look up Microsoft API references, find working code samples, and verify SDK code is correct. Use when working with Azure SDKs, .NET libraries, or Microsoft APIs—to find the right method, check parameters, get working examples, or troubleshoot errors. Catches hallucinated methods, wrong signatures, and deprecated patterns by querying official docs.
Teams using microsoft-code-reference should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/microsoft-code-reference/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How microsoft-code-reference Compares
| Feature / Agent | microsoft-code-reference | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Look up Microsoft API references, find working code samples, and verify SDK code is correct. Use when working with Azure SDKs, .NET libraries, or Microsoft APIs—to find the right method, check parameters, get working examples, or troubleshoot errors. Catches hallucinated methods, wrong signatures, and deprecated patterns by querying official docs.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Microsoft Code Reference ## Tools | Need | Tool | Example | |------|------|---------| | API method/class lookup | `microsoft_docs_search` | `"BlobClient UploadAsync Azure.Storage.Blobs"` | | Working code sample | `microsoft_code_sample_search` | `query: "upload blob managed identity", language: "python"` | | Full API reference | `microsoft_docs_fetch` | Fetch URL from `microsoft_docs_search` (for overloads, full signatures) | ## Finding Code Samples Use `microsoft_code_sample_search` to get official, working examples: ``` microsoft_code_sample_search(query: "upload file to blob storage", language: "csharp") microsoft_code_sample_search(query: "authenticate with managed identity", language: "python") microsoft_code_sample_search(query: "send message service bus", language: "javascript") ``` **When to use:** - Before writing code—find a working pattern to follow - After errors—compare your code against a known-good sample - Unsure of initialization/setup—samples show complete context ## API Lookups ``` # Verify method exists (include namespace for precision) "BlobClient UploadAsync Azure.Storage.Blobs" "GraphServiceClient Users Microsoft.Graph" # Find class/interface "DefaultAzureCredential class Azure.Identity" # Find correct package "Azure Blob Storage NuGet package" "azure-storage-blob pip package" ``` Fetch full page when method has multiple overloads or you need complete parameter details. ## Error Troubleshooting Use `microsoft_code_sample_search` to find working code samples and compare with your implementation. For specific errors, use `microsoft_docs_search` and `microsoft_docs_fetch`: | Error Type | Query | |------------|-------| | Method not found | `"[ClassName] methods [Namespace]"` | | Type not found | `"[TypeName] NuGet package namespace"` | | Wrong signature | `"[ClassName] [MethodName] overloads"` → fetch full page | | Deprecated warning | `"[OldType] migration v12"` | | Auth failure | `"DefaultAzureCredential troubleshooting"` | | 403 Forbidden | `"[ServiceName] RBAC permissions"` | ## When to Verify Always verify when: - Method name seems "too convenient" (`UploadFile` vs actual `Upload`) - Mixing SDK versions (v11 `CloudBlobClient` vs v12 `BlobServiceClient`) - Package name doesn't follow conventions (`Azure.*` for .NET, `azure-*` for Python) - Using an API for the first time ## Validation Workflow Before generating code using Microsoft SDKs, verify it's correct: 1. **Confirm method or package exists** — `microsoft_docs_search(query: "[ClassName] [MethodName] [Namespace]")` 2. **Fetch full details** (for overloads/complex params) — `microsoft_docs_fetch(url: "...")` 3. **Find working sample** — `microsoft_code_sample_search(query: "[task]", language: "[lang]")` For simple lookups, step 1 alone may suffice. For complex API usage, complete all three steps. ## CLI Alternative If the Learn MCP server is not available, use the `mslearn` CLI from a terminal or shell (for example, Bash, PowerShell, or cmd) instead: ```sh # Run directly (no install needed) npx @microsoft/learn-cli search "BlobClient UploadAsync Azure.Storage.Blobs" # Or install globally, then run npm install -g @microsoft/learn-cli mslearn search "BlobClient UploadAsync Azure.Storage.Blobs" ``` | 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 "..."` | Pass `--json` to `search` or `code-search` to get raw JSON output for further processing.
Related Skills
exa-reference-architecture
Implement Exa reference architecture for search pipelines, RAG, and content discovery. Use when designing new Exa integrations, reviewing project structure, or establishing architecture standards for neural search applications. Trigger with phrases like "exa architecture", "exa project structure", "exa RAG pipeline", "exa reference design", "exa search pipeline".
evernote-reference-architecture
Reference architecture for Evernote integrations. Use when designing system architecture, planning integrations, or building scalable Evernote applications. Trigger with phrases like "evernote architecture", "design evernote system", "evernote integration pattern", "evernote scale".
elevenlabs-reference-architecture
Implement ElevenLabs reference architecture for production TTS/voice applications. Use when designing new ElevenLabs integrations, reviewing project structure, or building a scalable audio generation service. Trigger: "elevenlabs architecture", "elevenlabs project structure", "how to organize elevenlabs", "TTS service architecture", "elevenlabs design patterns", "voice API architecture".
documenso-reference-architecture
Implement Documenso reference architecture with best-practice project layout. Use when designing new Documenso integrations, reviewing project structure, or establishing architecture standards for document signing applications. Trigger with phrases like "documenso architecture", "documenso best practices", "documenso project structure", "how to organize documenso".
deepgram-reference-architecture
Implement Deepgram reference architecture for scalable transcription systems. Use when designing transcription pipelines, building production architectures, or planning Deepgram integration at scale. Trigger: "deepgram architecture", "transcription pipeline", "deepgram system design", "deepgram at scale", "enterprise deepgram", "deepgram queue".
databricks-reference-architecture
Implement Databricks reference architecture with best-practice project layout. Use when designing new Databricks projects, reviewing architecture, or establishing standards for Databricks applications. Trigger with phrases like "databricks architecture", "databricks best practices", "databricks project structure", "how to organize databricks", "databricks layout".
customerio-reference-architecture
Implement Customer.io enterprise reference architecture. Use when designing integration layers, event-driven architectures, or enterprise-grade Customer.io setups. Trigger: "customer.io architecture", "customer.io design", "customer.io enterprise", "customer.io integration pattern".
cursor-reference-architecture
Reference architecture for Cursor IDE projects: directory structure, rules organization, indexing strategy, and team configuration patterns. Triggers on "cursor architecture", "cursor project structure", "cursor best practices", "cursor file structure".
coreweave-reference-architecture
Reference architecture for CoreWeave GPU cloud deployments. Use when designing ML infrastructure, planning multi-model serving, or establishing CoreWeave deployment standards. Trigger with phrases like "coreweave architecture", "coreweave design", "coreweave infrastructure", "coreweave best practices".
configuration-reference-generator
Configuration Reference Generator - Auto-activating skill for Technical Documentation. Triggers on: configuration reference generator, configuration reference generator Part of the Technical Documentation skill category.
cohere-reference-architecture
Implement Cohere reference architecture with layered project layout for RAG and agents. Use when designing new Cohere integrations, reviewing project structure, or establishing architecture standards for Cohere API v2 applications. Trigger with phrases like "cohere architecture", "cohere project structure", "cohere layout", "organize cohere app", "cohere design pattern".
coderabbit-reference-architecture
Implement CodeRabbit reference architecture with production-grade .coderabbit.yaml configuration. Use when designing review configuration for a new project, establishing team standards, or building a comprehensive review setup from scratch. Trigger with phrases like "coderabbit architecture", "coderabbit best practices", "coderabbit project structure", "coderabbit reference config", "coderabbit full setup".