cpp-coding-standards

Enforces C++ Core Guidelines when writing, reviewing, or refactoring modern C++ code.

Updated Mar 18, 2026
One-click install
npx skills add https://github.com/freedom909/real-estate-saas --skill cpp-coding-standards-freedom909
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: cpp-coding-standards
Source: https://github.com/freedom909/real-estate-saas/tree/main/.trae/skills/cpp-coding-standards
Command: npx skills add https://github.com/freedom909/real-estate-saas --skill cpp-coding-standards-freedom909

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? C++ codebases often accumulate unsafe patterns like raw new/delete, plain enums, C-style casts, and unconstrained templates. This Skill provides a consolidated, rule-referenced checklist from the C++ Core Guidelines so code reviews and refactors consistently enforce type safety, resource safety, and immutability. ## Core Features & Use Cases - Rule-Referenced Standards: Covers the major C++ Core Guidelines sections (P, I, F, C, R, ES, E, Con, CP, T, SL, Enum, SF, NL, Per) with DO/DON'T code examples for each. - Modern C++ Enforcement: Targets C++17/20/23 practices including RAII, smart pointers, concepts, scoped enums, constexpr, and std::scoped_lock. - Review Checklist: Ships a quick-reference checklist for verifying completed C++ work against key rules. - Use Case: When reviewing a pull request that introduces a new class hierarchy, apply the standards to catch missing virtual destructors (C.35), non-explicit single-argument constructors (C.46), and Rule of Five violations (C.21). ## Quick Start Review this C++ file against the C++ Core Guidelines and list every violation with its rule number and a corrected version.

Frequently Asked Questions about cpp-coding-standards

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce C++ Core Guidelines in code reviews?▼

Apply the rule-referenced checklist covering sections like R.11 (no raw new/delete), C.46 (explicit constructors), and Enum.3 (enum class). Each violation maps to a specific guideline number with a corrected code example.

What C++ coding standards cover modern C++20 features?▼

The C++ Core Guidelines cover C++20 features including concepts for constraining templates (T.10, T.11), std::scoped_lock for multi-mutex locking (CP.21), and constexpr compile-time computation (Per.11, Con.5).

When should I use unique_ptr vs shared_ptr in C++?▼

Prefer unique_ptr by default for exclusive ownership (R.21). Use shared_ptr only when ownership is genuinely shared, and create it with make_shared (R.22). Raw pointers should represent non-owning observers only (R.3).

Does this apply to legacy C or embedded C++ codebases?▼

The standards target modern C++17/20/23 and are not suited for legacy C codebases that cannot adopt modern features. Embedded or bare-metal contexts should adapt guidelines selectively where hardware constraints conflict.

Why avoid std::endl and plain enums in C++?▼

std::endl forces a stream flush, hurting performance; use '\n' instead (SL.io.50). Plain enums leak names into enclosing scope and allow implicit conversions; enum class provides scoping and type safety (Enum.3).