Skip to main content
ZICQ

Skills ZICQ category:Agent Workflows microsoft-code-reference

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.

14196 installs

Official URL:skills.sh

What this skill does

Intro in this page language first. The official description stays in its original wording; we do not rewrite SKILL.md.

What it does

Look up Microsoft API references, find working code samples, and verify SDK code is correct

When to use it

**

How agents load it

Per Agent Skills progressive disclosure: name and description load at startup (~100 tokens); the full SKILL.md body loads when the skill activates; scripts/, references/, and assets/ load only as needed. This file's sections: Microsoft Code Reference; Tools; Finding Code Samples; API Lookups; Verify method exists (include namespace for precision); Find class/interface. It includes spec-recommended sections: step-by-step instructions.

File analysis

File analysis: instruction-only skill (SKILL.md). The agent loads the full body when activated.

Microsoft Code ReferenceToolsFinding Code SamplesAPI LookupsVerify method exists (include namespace for precision)Find class/interfaceFind correct packageError TroubleshootingWhen to VerifyValidation WorkflowCLI AlternativeRun directly (no install needed)

Compatibility:Works best with Microsoft Learn MCP Server (https://learn.microsoft.com/api/mcp). Can also use the mslearn CLI as a fallback.

Source category:skills.sh agent-skill

SKILL.md & Agent activation

Official spec ↗
name
microsoft-code-reference
description
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.
compatibility
Works best with Microsoft Learn MCP Server (https://learn.microsoft.com/api/mcp). Can also use the mslearn CLI as a fallback.
  1. DiscoverThe client exposes names and descriptions to the agent.
  2. ActivateYour request or the task context selects the skill and loads its instructions.
  3. Load resourcesReferenced scripts, documentation and assets are used when needed.

Invocation syntax and available tools depend on your Agent client. Client integration guide ↗

Install this skill

Skills CLI ↗

Choose the target agent and installation scope, keep referenced package files, then verify the skill appears in the client's catalog.

Ask your Agent to install

Copy these instructions to a compatible agent and confirm the target directory matches your client.

Install the agent skill "microsoft-code-reference" into my project. The full SKILL.md and official description are at https://zicq.com/en/skills/skl-707799b72953d026-Microsoft-Code-Reference.html
Save it as .cursor/skills/microsoft-code-reference/SKILL.md or .claude/skills/microsoft-code-reference/SKILL.md and keep the frontmatter name and description exactly as-is.

Full package on GitHub ↗

Install from the terminal · Skills CLI

Requires Node.js and npx. First inspect the repository's skill list to confirm the name.

npx skills add 'https://github.com/github/awesome-copilot' --list

npx skills add 'https://github.com/github/awesome-copilot' --skill 'microsoft-code-reference'

The CLI lets you choose the agent interactively. The default scope is the project; use -g for user scope. Confirm package availability with the discovery command, then use npx skills list to inspect installed skills.

Readable layout

name: microsoft-code-reference description: 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. compatibility: Works best with Microsoft Learn MCP Server (https://learn.microsoft.com/api/mcp). Can also use the mslearn CLI as a fallback.

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:

# 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

Agent Workflows

Skill Creator

Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that exte…

Agent Workflows

Clawdhub

Use the ClawdHub CLI to search, install, update, and publish agent skills from clawdhub.com. Use when you need to fetch new skills on the fl…

Agent Workflows

Agent Team Orchestration

Orchestrate multi-agent teams with defined roles, task lifecycles, handoff protocols, and review workflows. Use when: (1) Setting up a team …

Agent Workflows

Superpowers

Spec-first, TDD, subagent-driven software development workflow. Use when: (1) building any new feature or app — triggers brainstorm → plan →…