Skip to main content
skill GitHub Copilot official · GitHub

microsoft-code-reference — GitHub Copilot skill: install

Checks Microsoft APIs and SDK code against official docs, finds working samples, and helps debug Azure and .NET issues.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add github/awesome-copilot --skill microsoft-code-reference -a claude-code
Open on GitHub

What microsoft-code-reference does

This skill looks up Microsoft API methods, classes, packages, and parameters through Microsoft Learn. It helps verify that a call exists, check its signature, and find a working example for Azure SDKs, .NET libraries, or Microsoft Graph.

It defines the microsoft_docs_search, microsoft_code_sample_search, and microsoft_docs_fetch tools. For a complex case, the workflow checks the API, fetches the full reference page, then compares the implementation with an official sample. When the Microsoft Learn MCP Server is unavailable, mslearn can be used through npx or a global install.

Install it when an agent writes Microsoft SDK code and mixes up versions, methods, or packages. It adds little value to projects that do not use Microsoft APIs.

What it helps with

  • verify that a Microsoft SDK method exists
  • find a working Azure file upload example
  • check an overloaded API signature
  • troubleshoot an auth or 403 error
  • choose a package for .NET or Python

Example prompts for the agent

  • Check `BlobClient UploadAsync Azure.Storage.Blobs` and find a working C# example.
  • Compare this code with the official API and verify the parameters for `GraphServiceClient Users Microsoft.Graph`.
  • Find the cause of this `DefaultAzureCredential` auth error and show a correct example.

How to install microsoft-code-reference

1Skills CLI (Vercel)

npx skills add github/awesome-copilot --skill microsoft-code-reference -a claude-code

2Manually: put the files in place

~/.claude/skills/microsoft-code-reference/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/microsoft-code-reference/

From the same set554

The whole set →
git-commit official github This skill reviews Git changes, stages related files, and creates Conventional Commits. Use it when you want an agent to make one commit or split work into separate commits. GitHub Copilot 47,165installs excalidraw-diagram-generator official github Turn a plain-language description into an Excalidraw diagram. Useful for mapping processes, system structure, and relationships between entities. GitHub Copilot 31,639installs multi-stage-dockerfile official github This skill guides GitHub Copilot in writing multi-stage Dockerfiles for different languages and frameworks. Use it when the final runtime image should contain fewer build dependencies. GitHub Copilot 29,688installs documentation-writer official github Skill that turns the agent into a technical writer following the Diátaxis framework: tutorials, how-to guides, reference, and explanation. Proposes structure before writing. GitHub Copilot 27,757installs prd official github Turns a feature idea into a structured PRD with user stories, technical requirements, and risks. Use it when planning a software feature or an AI-powered one. GitHub Copilot 24,035installs refactor official github This skill reshapes existing code without changing its external behavior. Use it for gradual cleanup of large functions, duplication, weak types, and code smells. GitHub Copilot 22,321installs java-springboot official github Gives GitHub Copilot Spring Boot development practices, from project layout to tests and security. Use it when writing or reviewing Java application code. GitHub Copilot 21,272installs create-readme official github This skill reviews a project and creates a structured README.md. Use it when the repository needs clear documentation based on its actual files and code. GitHub Copilot 19,081installs

Similar

redis-patterns affaan-m Production Redis patterns covering caching strategies, distributed locks, sliding window rate limits, and Streams. Claude Code CX Codex Cursor +1 4,700installs hexagonal-architecture affaan-m Guides you in structuring Ports and Adapters systems across TypeScript, Java, Kotlin, and Go. Helps isolate domain logic when code gets tangled with I/O. Claude Code CX Codex Cursor +1 4,700installs build-mcpb official Anthropic Packages a local MCP server with Node or Python so users can install it without setting up a runtime first. Claude Code 6,229installs gemini-interactions-api official google This skill guides Gemini Interactions API usage on Gemini Enterprise Agent Platform for stateful chats, background tasks, streaming, and function calling. Claude Code Gemini CLI CX Codex 10,434installs nextjs-app-router-patterns Seth Hobson This skill covers Next.js App Router patterns for rendering, routing, and data fetching. Use it when starting an App Router project or moving from Pages Router. Claude Code CX Codex Cursor 32,529installs mcp-builder official anthropics This skill walks through building an MCP server in TypeScript or Python, from reading the protocol spec to writing tests and evaluation questions. Claude Code Claude.ai 130,949installs google-agents-cli-adk-code official Google A reference skill for building ADK agents with tools, callbacks, state, and workflows. Use it when an agent project needs concrete API patterns or code examples. Claude Code CX Codex Cursor +1 511,400installs lark-im larksuite This skill lets an agent work with Lark IM messages, chats, files, and interactive cards. Use it when coding tasks need access to team conversations. Claude Code CX Codex Cursor +1 472,300installs

Questions about microsoft-code-reference

How do I install microsoft-code-reference in GitHub Copilot?

Run npx skills add github/awesome-copilot --skill microsoft-code-reference, gh skill install github/awesome-copilot microsoft-code-reference, or place the file at .github/skills/microsoft-code-reference/SKILL.md.

What does microsoft-code-reference do?

The skill searches Microsoft API references, official code samples, and full method signatures. It helps catch made-up methods, wrong parameters, and deprecated patterns.

What does microsoft-code-reference need to work?

It works best with the Microsoft Learn MCP Server. When that server is unavailable, the skill can use the mslearn CLI with mslearn search, mslearn code-search, and mslearn fetch.

Source text

SKILL.md · MIT
---
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:

```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.

© github · MIT · github/awesome-copilot

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor