microsoft-code-reference

Verify Microsoft SDK code against official documentation and find working code samples.

Updated May 12, 2026
One-click install
npx skills add https://github.com/sohamda/apex-try-out-demo-repo --skill microsoft-code-reference-sohamda
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: microsoft-code-reference
Source: https://github.com/sohamda/apex-try-out-demo-repo/tree/main/.archive/_archived_skills/microsoft-code-reference
Command: npx skills add https://github.com/sohamda/apex-try-out-demo-repo --skill microsoft-code-reference-sohamda

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @microsoft/learn-cli.

What problem does it solve? AI-generated code for Microsoft SDKs often contains hallucinated methods, wrong signatures, or deprecated patterns. This Skill verifies SDK code against live official Microsoft documentation before you ship it. ## Core Features & Use Cases - API Verification: Confirm that methods, classes, and packages actually exist using microsoft_docs_search and microsoft_docs_fetch. - Code Sample Discovery: Find official, working code samples in C#, Python, JavaScript, and other languages with microsoft_code_sample_search. - Error Troubleshooting: Diagnose method-not-found, wrong-signature, deprecation, and RBAC permission errors by comparing against known-good samples. - Use Case: Before generating Azure Blob Storage upload code, verify that BlobClient.UploadAsync exists in Azure.Storage.Blobs, fetch its overloads, and pull a working managed-identity sample. ## Quick Start Verify that the BlobClient UploadAsync method exists in Azure.Storage.Blobs and show me a working Python sample for uploading a file with managed identity.

Frequently Asked Questions about microsoft-code-reference

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I verify an Azure SDK method exists before using it?▼

Use microsoft_docs_search with the class name, method name, and namespace, such as "BlobClient UploadAsync Azure.Storage.Blobs". For methods with multiple overloads, follow up with microsoft_docs_fetch on the result URL to see full signatures.

How to find official Microsoft code samples for Azure SDKs?▼

Use microsoft_code_sample_search with a task description and language, for example query "upload blob managed identity" with language "python". It returns official working examples you can compare against your own implementation.

Can I use this without the Microsoft Learn MCP server?▼

Yes, the mslearn CLI is a fallback. Run npx @microsoft/learn-cli search "your query" or install it globally with npm install -g @microsoft/learn-cli, then use mslearn search, code-search, and fetch commands.

Why does my Azure SDK code fail with method not found errors?▼

This usually happens when mixing SDK versions, such as v11 CloudBlobClient versus v12 BlobServiceClient, or when a method name was hallucinated. Search the class and namespace in Microsoft docs to confirm the correct method and package.

When should I not use this code verification approach?▼

Do not use it for conceptual documentation questions, Bicep or Terraform module lookups, or skill creation tasks. It is scoped to verifying Microsoft SDK code, packages, and samples rather than general architecture guidance.