C++ Core Guidelines
Overview
Use this skill to apply modern C++ guidance derived from the ISO C++ Core Guidelines. Prefer safer, clearer, statically checkable C++ without sacrificing zero-overhead design.
Workflow
- Identify the task shape: new design, implementation, refactor, modernization, review, or bug fix.
- Read
references/core-guidelines-condensed.mdwhen the task touches C++ behavior, APIs, ownership, templates, concurrency, performance, or code review. - Apply the guidelines pragmatically:
- Prefer explicit interfaces, strong types, invariants, RAII, standard-library facilities, and compile-time checking.
- Preserve project conventions when they conflict only cosmetically.
- Treat raw ownership, unchecked bounds, data races, invalid lifetimes, implicit global state, naked allocation, C casts, and macro-based code as high-priority risks.
- When reviewing, lead with concrete bugs and maintenance risks, not style preferences. Reference the relevant Core Guidelines family, such as
Rfor resources,Ffor functions, orCPfor concurrency. - When changing code, keep edits scoped, add regression tests for behavior changes, and prefer mechanical/tool-enforceable improvements.
Resource
references/core-guidelines-condensed.md: condensed concept map and review checklist covering the guideline families: philosophy, interfaces, functions, classes, enums, resources, expressions/statements, performance, concurrency, errors, constants, templates, C interop, source files, standard library, architecture, profiles, GSL, and naming/layout.