cpp-core-guidelineslisted
Install: claude install-skill Mixard/fable-pack
# C++ Core Guidelines
Rule IDs reference the [C++ Core Guidelines](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines).
## Cross-cutting themes
1. RAII everywhere (P.8, R.1, E.6, CP.20): bind resource lifetime to object lifetime
2. Immutability by default (P.10, Con.1-5, ES.25): `const`/`constexpr` first
3. Type safety (P.4, I.4, ES.46-49, Enum.3): compile-time error prevention
4. Express intent (P.3, F.1, NL.1-2, T.10)
5. Minimize complexity (F.2-3, ES.5, Per.4-5)
6. Value semantics over pointer semantics (C.10, R.3-5, F.20, CP.31)
## Philosophy and interfaces (P.*, I.*)
| Rule | Summary |
|------|---------|
| P.1 | Express ideas directly in code |
| P.3 | Express intent |
| P.4 | Ideally, a program should be statically type safe |
| P.5 | Prefer compile-time checking to run-time checking |
| P.8 | Don't leak any resources |
| P.10 | Prefer immutable data to mutable data |
| I.1 | Make interfaces explicit |
| I.2 | Avoid non-const global variables |
| I.4 | Make interfaces precisely and strongly typed |
| I.11 | Never transfer ownership by a raw pointer or reference |
| I.23 | Keep the number of function arguments low |
```cpp
// P.10 + I.4: immutable, strongly typed interface
struct Temperature { double kelvin; };
Temperature boil(const Temperature& water);
// Violations:
double boil(double* temp); // unclear ownership, unclear units
int g_counter = 0; // I.2: non-const global
```
## Functions (F.*)
| Rule | Summary |
|------|---------|
| F.1