cpp-coding-standards

Enforce C++ Core Guidelines for writing, reviewing, and refactoring C++ code.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers write cleaner, safer, and more maintainable C++ code by enforcing modern coding standards derived from the C++ Core Guidelines.

Core Features & Use Cases

  • Guideline Enforcement: Provides rules and examples for C++17/20/23, covering areas like RAII, type safety, immutability, and error handling.
  • Code Review Aid: Acts as a reference for developers during code reviews to ensure consistency and adherence to best practices.
  • Use Case: When refactoring a legacy C++ module, use this Skill to identify areas where modern C++ features like enum class, smart pointers, and constexpr can be applied to improve safety and clarity.

Quick Start

Review the provided C++ code snippet against the C++ Core Guidelines for potential improvements.

Frequently Asked Questions about cpp-coding-standards

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

FAQPage Schema
How do I apply modern C++ coding standards during a code review?

To apply modern C++ coding standards during code review, check the code against the C++ Core Guidelines for RAII, type safety, and immutability to ensure safe resource management and consistency.

What are the best practices for refactoring legacy C++ code to use modern features?

Refactoring legacy C++ code involves identifying areas to apply modern features like enum class, smart pointers, and constexpr, improving safety and clarity based on C++17/20/23 guidelines.

How does RAII help with efficient resource management in C++?

RAII in C++ binds resource lifetimes to object scopes, ensuring efficient resource management and safe cleanup by automatically releasing resources when objects go out of scope.

Can I use C++20 and C++23 features while following C++ Core Guidelines?

Yes, C++ Core Guidelines explicitly address C++17, C++20, and C++23 features, providing rules and examples to safely integrate modern language capabilities into your development workflow.

What are common C++ anti-patterns to avoid for better type safety?

Common C++ anti-patterns that reduce type safety include unchecked pointer arithmetic and improper resource handling, which can be mitigated by following modern principles like immutability and RAII.

Why should I enforce immutability in my C++ codebase?

Enforcing immutability in C++ codebase prevents unintended side effects, ensuring safer concurrent execution and more maintainable code structures as outlined by modern C++ Core Guidelines.