m15-anti-pattern/SKILL.md
Common C++ Anti-Patterns. Triggers: global variables, new/delete, C-style cast, macros, void*.
npx skillsauth add 13eholder/modern-cpp-skills m15-anti-patternInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Is this C or C++?
malloc, free, (int)x, void*.std::vector, std::unique_ptr, static_cast, templates.| Issue | Design Question |
| -------------------- | --------------------------------- |
| Hard to refactor | Are you using Macros? |
| Leak | Are you using new? |
| UB | Are you using reinterpret_cast? |
Can I delete this new?
make_unique.Can I remove this macro?
constexpr or templates.| Anti-Pattern | Modern Fix |
| ------------------ | ------------------------- |
| new T | make_unique<T> |
| T* ownership | unique_ptr<T> |
| (T)ptr | static_cast<T>(ptr) |
| #define | constexpr |
data-ai
C++ Mental Models: Pointer vs Reference, Initialization, Undefined Behavior.
data-ai
Mastering C++ Domain Errors: Exception Hierarchies, System Errors, and Expected.
data-ai
Mastering C++ Lifecycle: RAII, Destructors, Static Initialization, Rule of 5.
tools
Mastering C++ Ecosystem: CMake, vcpkg, Conan, Sanitizers, Tooling.