cpp-coding-standards

Enforce modern C++ coding standards for C++17, C++20, and C++23 projects.

Updated Mar 24, 2026
One-click install
npx skills add https://github.com/Oruga420/claude-code-skills --skill cpp-coding-standards-oruga420
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cpp-coding-standards
Source: https://github.com/Oruga420/claude-code-skills/tree/main/cpp-coding-standards
Command: npx skills add https://github.com/Oruga420/claude-code-skills --skill cpp-coding-standards-oruga420

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a concise, actionable distillation of the C++ Core Guidelines to help developers write, review, and refactor C++ code that is safer, clearer, and easier to maintain. It reduces defects caused by resource mismanagement, unsafe type usage, inconsistent APIs, and unclear ownership semantics.

Core Features & Use Cases

  • RAII & Resource Safety: Guidance to bind resource lifetimes to object lifetimes and prefer smart pointers over raw ownership.
  • Immutability & Type Safety: Rules to favor const/constexpr, strong typing, and enum class to catch errors at compile time.
  • APIs, Classes & Templates: Best practices for interfaces, Rule of Zero/Five, explicit constructors, constrained templates, and clear naming conventions.
  • Concurrency & Performance: Patterns for safe locking, avoiding data races, and making performance decisions based on measurement.
  • Use Case: Use this guide to perform a code review of a C++17/20/23 pull request and produce a prioritized checklist of violations and fixes.

Quick Start

Use the cpp-coding-standards skill to review a C++ file and produce a checklist of guideline violations with suggested corrections.

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 modern C++ coding standards during a pull request review?

RAII in C++ manages resource lifetimes by binding them to object lifetimes, ensuring safe cleanup. It replaces raw ownership with smart pointers to prevent memory leaks and mismanagement defects.

What's the best way to refactor legacy C++ code while noting embedded constraints?

The best way to refactor legacy C++ code is through selective modernization using C++17, C++20, or C++23 features. This involves updating APIs, applying strong typing, and using template concepts while respecting embedded system constraints.

Can I use C++ template concepts and constexpr to catch type errors at compile time?

Yes, you can use C++ template concepts and constexpr to catch type errors at compile time. Favoring strong typing, const immutability, and constrained templates improves correctness and maintainability across the codebase.

What concurrency locking patterns should I follow to avoid data races in C++?

To avoid data races in C++, follow safe locking patterns and standard library concurrency guidance. This ensures thread safety by enforcing correct resource management and locking discipline during parallel execution.

Does this C++ coding guidelines skill support C++23 projects?

Yes, this C++ coding guidelines skill supports C++23 projects, alongside C++17 and C++20. It provides actionable rules for architecture decisions, interface design, and the Rule of Zero/Five.