wil-raii
Enforces RAII patterns for Windows resource management using the Windows Implementation Library.
Install
mkdir -p .claude/skills/wil-raii && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/15871" && unzip -o skill.zip -d .claude/skills/wil-raii && rm skill.zipInstalls to .claude/skills/wil-raii
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Windows Implementation Library (WIL) RAII patterns for managing Windows resources. Use when creating, managing, or cleaning up Windows handles like HICON, HWND, HBITMAP, HDC, COM objects, or any GDI resources.Key capabilities
- →Manage HICON resources with `wil::unique_hicon`
- →Manage HWND resources with `wil::unique_hwnd`
- →Manage COM objects with `wil::com_ptr<T>`
- →Handle GDI selections with `wil::SelectObject`
- →Ensure cleanup with `wil::scope_exit`
How it works
The skill provides WIL RAII wrappers and patterns to automatically manage and clean up Windows resources like handles and COM objects.
Inputs & outputs
When to use wil-raii
- →Manage HICON or HWND
- →Clean up COM objects
- →Implement safe GDI resource management
- →Ensure auto-cleanup on exit
About wil-raii
Provides standard patterns and wrappers for cleaning up Windows handles and GDI resources. It prohibits manual cleanup, requiring the use of specific wrappers.
Windows Implementation Library (WIL) RAII patterns for managing Windows resources. Use when creating, managing, or cleaning up Windows handles like HICON, HWND, HBITMAP, HDC, COM objects, or any GDI resources.
When not to use it
- →When performing manual resource cleanup
- →When using `goto` for cleanup patterns
- →When destroying an owned HWND via `.get()`
Limitations
- →Manual resource cleanup is prohibited
- →`goto` cleanup patterns are forbidden
- →Destroying an owned HWND via `.get()` is prohibited
How it compares
This skill enforces RAII wrappers for all Windows resources, eliminating manual cleanup and `goto` patterns common in traditional Win32 programming.
Compared to similar skills
wil-raii side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| wil-raii (this skill) | 0 | 6mo | No flags | Advanced |
| static-analysis | 5 | 9mo | No flags | Advanced |
| memory-safety-patterns | 4 | 7mo | No flags | Advanced |
| gdb-cli | 0 | 7mo | Review | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by RedSalamanders
View all by RedSalamanders →You might also like
static-analysis
gmh5225
Expertise in LLVM-based static analysis including dataflow analysis, pointer analysis, taint tracking, and program verification. Use this skill when implementing security scanners, bug finders, code quality tools, or performing program analysis research.
memory-safety-patterns
sickn33
Implement memory-safe programming with RAII, ownership, smart pointers, and resource management across Rust, C++, and C. Use when writing safe systems code, managing resources, or preventing memory bugs.
gdb-cli
Anhvu1107
ALWAYS use this when the request matches GDB CLI: GDB debugging assistant for AI agents - analyze core dumps, debug live processes, investigate crashes and deadlocks with source code correlation
HexCore Binary Analysis
diegosouzapw
Skill para analise de binarios com ferramentas HexCore integradas ao editor
reverse-engineering-tools
gmh5225
Guide for reverse engineering tools and techniques used in game security research. Use this skill when working with debuggers, disassemblers, memory analysis tools, binary analysis, or decompilers for game security research.
ghidra
mitsuhiko
Reverse engineer binaries using Ghidra's headless analyzer. Decompile executables, extract functions, strings, symbols, and analyze call graphs without GUI.