winmd-api-search
Skill này làm gì
Công cụ này giúp bạn tìm đúng các hàm Windows (API) để thêm tính năng vào chương trình, như dùng camera hoặc lưu tệp. Nó lấy toàn bộ chi tiết của các hàm này.
Khi nào nên dùng
- ✓Khi bạn muốn xây dựng một tính năng mới và chưa biết dùng hàm nào.
- ✓Khi bạn hỏi “làm thế nào để làm X?” và X liên quan đến thứ gì đó của hệ thống (camera, tệp, v.v.).
- ✓Khi bạn cần chi tiết chính xác của một hàm trước khi viết mã.
Liên kết skill
https://github.com/github/awesome-copilot/blob/main/skills/winmd-api-search/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Làm thế nào để chụp ảnh bằng ứng dụng này?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Công cụ tìm kiếm trong cơ sở dữ liệu cục bộ có thông tin về các hàm Windows. Nó chuyển yêu cầu của bạn thành thuật ngữ kỹ thuật, tìm hàm phù hợp nhất và hiển thị chi tiết của nó.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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
.winmdfiles - Project-output WinMD — class libraries (C++/WinRT, C#) that produce
.winmdas 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 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.
# 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 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
.\.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:
- Use web search to find the right API on Microsoft Learn, for example:
site:learn.microsoft.com/uwp/api <capability keywords>forWindows.*APIssite:learn.microsoft.com/windows/windows-app-sdk/api/winrt <capability keywords>forMicrosoft.*WinAppSDK APIs
- Read the documentation pages to identify which type matches the user's requirement.
- Once you know the type name, come back and use
-Action membersor-Action enumsto get the exact local signatures.
…
Câu hỏi thường gặp
Tôi có cần cài đặt gì trước khi dùng không?
Có, bạn cần tạo một “cache” (tệp thông tin) bằng cách chạy một script cụ thể trước lần dùng đầu tiên.
API là gì?
API (Application Programming Interface) giống như các lệnh hoặc công cụ mà lập trình viên dùng để khiến hệ điều hành (như Windows) thực hiện các tác vụ cụ thể, chẳng hạn truy cập camera hoặc hiển thị thông báo.
Điều gì xảy ra nếu công cụ không tìm thấy API?
Nếu công cụ không tìm được kết quả phù hợp trong dữ liệu cục bộ, nó gợi ý tìm kiếm trong tài liệu trực tuyến chính thức của Microsoft.
Chi tiết
Mô tả gốc của tác giả
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).
repo: github/awesome-copilot
Độ phổ biến
- Sao GitHub
- 40k
- Vị trí xếp hạng
- #7478
- Giấy phép
- MIT
- Cập nhật
- 15/10/2026
Bình luận
- …
Thêm skill từ kho mã này
acquire-codebase-knowledge
40kGiúp agent của bạn hiểu và ghi tài liệu cho một dự án mã nguồn có sẵn. Hữu ích khi đón thành viên mới hoặc nắm tổng quan về kiến trúc.
acreadiness-assess
40kGiúp agent của bạn đánh giá mức độ sẵn sàng cho AI của dự án và tạo báo cáo. Hữu ích để biết dự án đã sẵn sàng dùng công cụ AI đến đâu.
acreadiness-generate-instructions
40kGiúp agent của bạn tạo hướng dẫn cho công cụ AI dựa trên kết quả đánh giá. Hữu ích để cải thiện cách AI làm việc với mã và khắc phục các khoảng trống.
acreadiness-policy
40kGiúp agent của bạn xác định hoặc áp dụng chính sách đánh giá dự án bằng AI. Hữu ích để chuẩn hóa cách đánh giá dự án và đảm bảo tuân thủ.
Skill tương tự
diffs
394kGiúp agent của bạn tạo một diff có thể chia sẻ về các chỉnh sửa, dưới dạng liên kết xem hoặc file ảnh, thay vì một bản tóm tắt viết tay.
coding-agent
394kGiúp agent của bạn giao một việc lập trình lớn cho Codex, Claude Code hoặc OpenCode chạy nền, rồi theo dõi tiến độ của nó.
gh-issues
394kGiúp agent của bạn tìm issue trên GitHub, chọn những issue cần xử lý và mở pull request với bản sửa, kể cả theo dõi nhận xét đánh giá.