Skip to main content
skill GitHub Copilot official · GitHub

winmd-api-search — GitHub Copilot skill: find Windows APIs

This skill finds the right Windows API for a task and returns full type details. Useful when you are building a feature and don't know which class or interface to reach for.

Install into GitHub Copilot · Skills CLI (Vercel) All methods and platforms ↓
npx skills add github/awesome-copilot --skill winmd-api-search
Open on GitHub

What winmd-api-search does

The skill reads from a local cache of WinMD metadata. The cache covers Windows Platform SDK (all Windows.* WinRT APIs), WinAppSDK and WinUI as a baseline, NuGet packages from restored projects, and .winmd files produced by class libraries at build time. On a fresh clone with no restore or build, Platform SDK and WinAppSDK coverage is still there.

Two paths. Discovery: you describe a capability in plain words (“take a picture”, “load from disk”), the skill maps that to search keywords and runs Invoke-WinMdQuery.ps1 -Action search. Lookup: when the type name is known, -Action members, -Action enums, -Action types and -Action namespaces return methods, properties, events and enumeration values directly.

Before the first query you need the cache: Update-WinMdCache.ps1 builds it under Generated Files\winmd-cache\. The generator requires .NET SDK 8.0 or later. The cache holds signatures only, no descriptions or examples, so explanations live on Microsoft Learn. If search scores come back low (below 60), the skill falls back to web documentation. Worth installing if you write Windows code in C# or C++/WinRT and keep checking signatures. For cross-platform work it adds little.

What it helps with

  • find an API for a task described in everyday words
  • get exact method signatures and properties before writing code
  • read enumeration values without opening the docs
  • list every type inside a namespace
  • build the WinMD cache across all repo projects

Example prompts for the agent

  • Find the Windows API for capturing a photo from the camera
  • Show all members of Microsoft.UI.Xaml.Controls.NavigationView
  • What values does Microsoft.UI.Xaml.Visibility have?

How to install winmd-api-search

1Skills CLI (Vercel)

npx skills add github/awesome-copilot --skill winmd-api-search

2GitHub CLI

gh skill install github/awesome-copilot winmd-api-search

3Manually: put the files in place

.github/skills/winmd-api-search/SKILL.md

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

golang-security samber Identifies Go vulnerabilities, models threats with STRIDE and DREAD, and fixes injections, secret leaks, and cryptography flaws. Claude Code CX Codex Cursor +1 42,100installs golang-design-patterns samber This skill guides idiomatic Go design for APIs, resource lifecycles, graceful shutdown, and architecture. Use it when designing or reviewing Go code. Claude Code CX Codex Cursor +1 41,900installs golang-performance samber Guides AI coding agents through profiling, memory allocation cuts, and CPU optimization in Go projects using a strict measurement-first cycle. Claude Code CX Codex Cursor +1 41,800installs golang-database samber Go database guidelines for database/sql, sqlx, and pgx. Enforces parameterized queries, context passing, and explicit connection pool handling without ORMs. Claude Code CX Codex Cursor +1 40,700installs golang-project-layout samber Skill organizes a Go project by convention: cmd/, internal/, pkg/ directories, module naming, go.work for monorepos. Asks about architecture and dependency injection approach, then scaffolds files and config. Claude Code CX Codex Cursor +1 40,300installs golang-troubleshooting samber Systematic root-cause debugging for Go code facing deadlocks, panics, and race conditions. Guides the agent to reproduce bugs before applying fixes. Claude Code CX Codex Cursor +1 39,800installs 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

Questions about winmd-api-search

How do I install winmd-api-search in GitHub Copilot?

Run npx skills add github/awesome-copilot --skill winmd-api-search or gh skill install github/awesome-copilot winmd-api-search. The skill file lands at .github/skills/winmd-api-search/SKILL.md.

What does winmd-api-search do?

It finds the right Windows API from a capability description and returns full type details: methods, properties, events, enumeration values. All from a local WinMD cache.

What do I need before using it?

.NET SDK 8.0 or later to build the cache generator, plus the cache itself created by Update-WinMdCache.ps1. Queries won't run without it.

Source text

SKILL.md · MIT
---
name: winmd-api-search
description: 'Find and explore Windows desktop APIs. Use when building features that need platform capabilities — camera, file access, notifications, UI controls, AI/ML, sensors, networking, etc. Discovers the right API for a task and retrieves full type details (methods, properties, events, enumeration values).'
license: Complete terms in LICENSE.txt
---

# WinMD API Search

This skill helps you find the right Windows API for any capability and get its full details. It searches a local cache of all WinMD metadata from:

- **Windows Platform SDK** — all `Windows.*` WinRT APIs (always available, no restore needed)
- **WinAppSDK / WinUI** — bundled as a baseline in the cache generator (always available, no restore needed)
- **NuGet packages** — any additional packages in restored projects that contain `.winmd` files
- **Project-output WinMD** — class libraries (C++/WinRT, C#) that produce `.winmd` as build output

Even on a fresh clone with no restore or build, you still get full Platform SDK + WinAppSDK coverage.

## When to Use This Skill

- User wants to build a feature and you need to find which API provides that capability
- User asks "how do I do X?" where X involves a platform feature (camera, files, notifications, sensors, AI, etc.)
- You need the exact methods, properties, events, or enumeration values of a type before writing code
- You're unsure which control, class, or interface to use for a UI or system task

## Prerequisites

- **.NET SDK 8.0 or later** — required to build the cache generator. Install from [dotnet.microsoft.com](https://dotnet.microsoft.com/download) if not available.

## Cache Setup (Required Before First Use)

All query and search commands read from a local JSON cache. **You must generate the cache before running any queries.**

```powershell
# All projects in the repo (recommended for first run)
.\.github\skills\winmd-api-search\scripts\Update-WinMdCache.ps1

# Single project
.\.github\skills\winmd-api-search\scripts\Update-WinMdCache.ps1 -ProjectDir <project-folder>
```

No project restore or build is needed for baseline coverage (Platform SDK + WinAppSDK). For additional NuGet packages, the project needs `dotnet restore` (which generates `project.assets.json`) or a `packages.config` file.

Cache is stored at `Generated Files\winmd-cache\`, deduplicated per-package+version.

### What gets indexed

| Source | When available |
|--------|----------------|
| Windows Platform SDK | Always (reads from local SDK install) |
| WinAppSDK (latest) | Always (bundled as baseline in cache generator) |
| WinAppSDK Runtime | When installed on the system (detected via `Get-AppxPackage`) |
| Project NuGet packages | After `dotnet restore` or with `packages.config` |
| Project-output `.winmd` | After project build (class libraries that produce WinMD) |

> **Note:** This cache directory should be in `.gitignore` — it's generated, not source.

## How to Use

Pick the path that matches the situation:

---

### Discover — "I don't know which API to use"

The user describes a capability in their own words. You need to find the right API.

**0. Ensure the cache exists**

If the cache hasn't been generated yet, run `Update-WinMdCache.ps1` first — see [Cache Setup](#cache-setup-required-before-first-use) above.

**1. Translate user language → search keywords**

Map the user's daily language to programming terms. Try multiple variations:

| User says | Search keywords to try (in order) |
|-----------|-----------------------------------|
| "take a picture" | `camera`, `capture`, `photo`, `MediaCapture` |
| "load from disk" | `file open`, `picker`, `FileOpen`, `StorageFile` |
| "describe what's in it" | `image description`, `Vision`, `Recognition` |
| "show a popup" | `dialog`, `flyout`, `popup`, `ContentDialog` |
| "drag and drop" | `drag`, `drop`, `DragDrop` |
| "save settings" | `settings`, `ApplicationData`, `LocalSettings` |

Start with simple everyday words. If results are weak or irrelevant, try the more technical variation.

**2. Run searches**

```powershell
.\.github\skills\winmd-api-search\scripts\Invoke-WinMdQuery.ps1 -Action search -Query "<keyword>"
```

This returns ranked namespaces with top matching types and the **JSON file path**.

If results have **low scores (below 60) or are irrelevant**, fall back to searching online documentation:

1. Use web search to find the right API on Microsoft Learn, for example:
   - `site:learn.microsoft.com/uwp/api <capability keywords>` for `Windows.*` APIs
   - `site:learn.microsoft.com/windows/windows-app-sdk/api/winrt <capability keywords>` for `Microsoft.*` WinAppSDK APIs
2. Read the documentation pages to identify which type matches the user's requirement.
3. Once you know the type name, come back and use `-Action members` or `-Action enums` to get the exact local signatures.

**3. Read the JSON to choose the right API**

Read the file at the path(s) from the top results. The JSON has all types in that namespace — full members, signatures, parameters, return types, enumeration values.

Read and decide which types and members fit the user's requirement.

**4. Look up official documentation for context**

The cache contains only signatures — no descriptions or usage guidance. For explanations, examples, and remarks, look up the type on Microsoft Learn:

| Namespace prefix | Documentation base URL |
|-----------------|----------------------|
| `Windows.*` | `https://learn.microsoft.com/uwp/api/{fully.qualified.typename}` |
| `Microsoft.*` (WinAppSDK) | `https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/{fully.qualified.typename}` |

For example, `Microsoft.UI.Xaml.Controls.NavigationView` maps to:
`https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.controls.navigationview`

**5. Use the API knowledge to answer or write code**

---

### Lookup — "I know the API, show me the details"

You already know (or suspect) the type or namespace name. Go direct:

```powershell
# Get all members of a known type
.\.github\skills\winmd-api-search\scripts\Invoke-WinMdQuery.ps1 -Action members -TypeName "Microsoft.UI.Xaml.Controls.NavigationView"

# Get enum values
.\.github\skills\winmd-api-search\scripts\Invoke-WinMdQuery.ps1 -Action enums -TypeName "Microsoft.UI.Xaml.Visibility"

# List all types in a namespace
.\.github\skills\winmd-api-search\scripts\Invoke-WinMdQuery.ps1 -Action types -Namespace "Microsoft.UI.Xaml.Controls"

# Browse namespaces
.\.github\skills\winmd-api-search\scripts\Invoke-WinMdQuery.ps1 -Action namespaces -Filter "Microsoft.UI"
```

If you need full detail beyond what `-Action members` shows, use `-Action search` to get the JSON file path, then read the JSON file directly.

---

### Other Commands

```powershell
# List cached projects
.\.github\skills\winmd-api-search\scripts\Invoke-WinMdQuery.ps1 -Action projects

# List packages for a project
.\.github\skills\winmd-api-search\scripts\Invoke-WinMdQuery.ps1 -Action packages

# Show stats
.\.github\skills\winmd-api-search\scripts\Invoke-WinMdQuery.ps1 -Action stats
```

> If only one project is cached, `-Project` is auto-selected.
> If multiple projects exist, add `-Project <name>` (use `-Action projects` to see available names).
> In scan mode, manifest names include a short hash suffix to avoid collisions; you can pass the base project name without the suffix if it's unambiguous.

## Search Scoring

The search ranks type names and member names against your query:

| Score | Match type | Example |
|-------|-----------|---------|
| 100 | Exact name | `Button` → `Button` |
| 80 | Starts with | `Navigation` → `NavigationView` |
| 60 | Contains | `Dialog` → `ContentDialog` |
| 50 | PascalCase initials | `ASB` → `AutoSuggestBox` |
| 40 | Multi-keyword AND | `navigation item` → `NavigationViewItem` |
| 20 | Fuzzy character match | `NavVw` → `NavigationView` |

Results are grouped by namespace. Higher-scored namespaces appear first.

## Troubleshooting

| Issue | Fix |
|-------|-----|
| "Cache not found" | Run `Update-WinMdCache.ps1` |
| "Multiple projects cached" | Add `-Project <name>` |
| "Namespace not found" | Use `-Action namespaces` to list available ones |
| "Type not found" | Use fully qualified name (e.g., `Microsoft.UI.Xaml.Controls.Button`) |
| Stale after NuGet update | Re-run `Update-WinMdCache.ps1` |
| Cache in git history | Add `Generated Files/` to `.gitignore` |

## References

- [Windows Platform SDK API reference](https://learn.microsoft.com/uwp/api/) — documentation for `Windows.*` namespaces
- [Windows App SDK API reference](https://learn.microsoft.com/windows/windows-app-sdk/api/winrt/) — documentation for `Microsoft.*` WinAppSDK namespaces

© 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