Isurwars/Correlation / .agents/skills/cpp-standards
cpp-standards
UnverifiedEnforce modern C++23 standards, RAII resource management, immutability by default, and memory locality. Use when writing, refactoring, or reviewing modern C++ code.
Modern C++ Standards (C++23)
This skill enforces high-performance, modern C++ (C++23) coding standards across the workspace.
Core Operational Directives
- RAII Management (R.1, R.11): No naked
new/deleteormalloc/free. Manage all resources via RAII containers (std::unique_ptr,std::shared_ptr, custom RAII handles). - Const & Immutability (Con.1, Con.2, ES.25): Default to
constfor variables andconstfor member functions. Useconstexprfor values computable at compile time. - Type & Conversion Safety (P.4, ES.46, ES.48): Zero implicit narrowing conversions (
-Werror=float-conversion,-Werror=implicit-float-conversion,-Werror=shorten-64-to-32, MSVC/we4244 /we4267 /we4305). Wrapdoubleliterals targetingreal_tinstatic_cast<real_t>(...), castsize_ttoAtomIDexplicitly, use[](unsigned char chr) { return static_cast<char>(std::tolower(chr)); }instd::ranges::transform, and qualifystd::sqrt/std::cos/std::sin/std::atan2in C++/CUDA code. Prohibit C-style casts; usestatic_cast,std::bit_cast, or explicit constructors. - Parameter Passing (F.16, F.20): Pass cheap types by value, large objects by
const&, and sink parameters by value (withstd::move). Return structs instead of using output parameters. - Class Design (C.20, C.21, C.35, C.46): Enforce Rule of Zero or Rule of Five. Mark single-argument constructors
explicit. Base class destructors must be public virtual or protected non-virtual. - Concurrency & OpenMP Safety (CP.2, CP.20, CP.44): Loop variables in OpenMP constructs must be thread-private. Use
std::scoped_lockfor multi-mutex locking and always name lock guards. - Zero Suppression Policy: Strictly prohibit
NOLINT,NOLINTNEXTLINE,NOLINTBEGIN, and inline suppression comments. Resolve all linter diagnostics structurally.
Extended Reference
For deep guideline breakdowns, parameter matrices, and anti-pattern examples, consult the internal reference:
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |