What problem does it solve?
This Skill provides a structured, best-practice-driven approach to writing, reviewing, and refactoring modern C++ code (C++17/20), including a pre-commit checklist to enforce quality.
Core Features & Use Cases
- Rule of Zero: Let the compiler generate all special members and compose from types that manage their own resources.
- Rule of Five: If you manage a raw resource directly, define (or delete) all five special members to ensure proper ownership semantics.
- RAII + const correctness: Prefer RAII patterns and const correctness to improve safety and clarity.
- Concepts and templates: Use C++20 concepts to constrain templates and improve readability.
- Pre-Commit Checklist: A practical checklist to ensure safe, robust code before commits.
- Common pitfalls: Guidance to avoid common mistakes in C++ design and implementation.
Quick Start
Apply these patterns to a current C++ project to guide writing, reviewing, and refactoring.