What problem does it solve?
This Skill identifies potential issues in C++ code targeting Windows, ensuring memory safety, threading, Win32 API misuse, COM lifetimes, ETW, named pipe security, and MSVC-specific pitfalls.
Core Features & Use Cases
- Memory Safety: Flags issues with smart-pointer ownership, HANDLE lifetimes, use-after-move, and string lifetime crossing API boundaries.
- Threading: Checks for mutex held across blocking I/O, lock ordering, shared state without synchronization, and thread lifecycle management.
- Win32 API: Verifies return-value checks, Named pipe DACLs, impersonation token leaks, and GetLastError usage.
- COM: Ensures HRESULT checks, AddRef/Release pairing, CoInitialize/CoUninitialize symmetry, and proper provider registration and GUID matching.
- ETW: Validates provider registration unregistration, GUID mismatches, and event size limits.
- Service Lifecycle: Checks for service stop hangs and start ordering.
- MSVC-specific: Identifies issues with
__cpuid, pointer truncation on ARM64, and warnings-as-errors interactions.
- Use Case: When you want to ensure that your C++ code targeting Windows is free from common pitfalls and adheres to best practices.
Quick Start
Run the cpp-windows-review skill on your Windows C++ codebase.