microsoft-code-reference

Verifies Microsoft API methods and finds official code samples via Microsoft Learn.

Updated Jul 21, 2026
One-click install
npx skills add https://github.com/afonsoft/gamehub --skill microsoft-code-reference-afonsoft
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: microsoft-code-reference
Source: https://github.com/afonsoft/gamehub/tree/main/.claude/skills/microsoft-code-reference
Command: npx skills add https://github.com/afonsoft/gamehub --skill microsoft-code-reference-afonsoft

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @microsoft/learn-cli.

What problem does it solve? When writing code against Azure SDKs, .NET libraries, or Microsoft APIs, it is easy to use hallucinated method names, wrong signatures, or deprecated patterns. This Skill queries official Microsoft Learn documentation to confirm that methods, classes, and packages actually exist before you write or debug code. ## Core Features & Use Cases - API Verification: Look up methods, classes, and namespaces (e.g., BlobClient.UploadAsync in Azure.Storage.Blobs) to confirm signatures and overloads. - Official Code Samples: Retrieve working examples in C#, Python, or JavaScript for tasks like uploading blobs or authenticating with managed identity. - Error Troubleshooting: Diagnose method-not-found errors, deprecated v11-to-v12 SDK migrations, RBAC permission failures, and authentication issues. - Use Case: Before writing Azure Blob Storage upload code, verify the correct v12 method and fetch a working sample instead of guessing from memory. ## Quick Start Ask the assistant to verify the correct Azure SDK method and find an official code sample for uploading a file to blob storage in C#.

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, fetch the full documentation page to see complete signatures and parameters.

How to find official Azure code samples in Python or C#?▼

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 samples showing complete setup and initialization context.

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

Yes, the mslearn CLI works as a fallback. Run it directly with npx @microsoft/learn-cli search "..." or install it globally via npm. Commands like mslearn search, code-search, and fetch map to the MCP tools.

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

This usually happens when mixing SDK versions, such as v11 CloudBlobClient versus v12 BlobServiceClient, or using hallucinated method names. Search the class and namespace to confirm the method exists and check migration docs for deprecated patterns.

When should I verify Microsoft API code instead of writing it directly?▼

Verify when a method name seems too convenient, when mixing SDK versions, when a package name does not follow conventions like Azure.* for .NET or azure-* for Python, or when using an API for the first time.