cpp-coding-standards

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

7|Updated Apr 7, 2026
One-click install
npx skills add https://github.com/chenziyang110/spec-kit-plus --skill cpp-coding-standards-chenziyang110
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cpp-coding-standards
Source: https://github.com/chenziyang110/spec-kit-plus/tree/main/templates/passive-skills/cpp-coding-standards
Command: npx skills add https://github.com/chenziyang110/spec-kit-plus --skill cpp-coding-standards-chenziyang110

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps teams write, review, and refactor C++ code consistently by turning the C++ Core Guidelines into actionable, repeatable standards that reduce bugs and safety risks.

Core Features & Use Cases

  • Modern C++ Core Guidelines compliance: Covers RAII, immutability by default, strong typing, and minimizing complexity.
  • Safer interfaces and resource management: Promotes const-correct APIs, precise ownership semantics, and avoidance of raw new/delete.
  • Consistent style across codebases: Provides rules for functions, classes, templates, error handling, naming, and performance considerations.
  • Use Case: When inheriting a legacy C++ service, apply these standards during incremental refactors to modernize code, clarify ownership, and make behavior more predictable.

Quick Start

Ask your AI assistant to apply these C++ coding standards to the provided files and produce a prioritized list of rule violations with concrete before-and-after suggestions.

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 during a code review?

To enforce C++ Core Guidelines during a code review, apply automated checks for RAII, const-correctness, strong typing, and precise ownership semantics to generate a prioritized list of rule violations with before-and-after suggestions.

What is the best way to modernize legacy C++ code safely?

Modernizing legacy C++ code safely requires applying guideline-driven constraints incrementally, replacing raw new/delete with RAII, enforcing immutability by default, and clarifying ownership semantics to make behavior more predictable.

How do I refactor existing C++ modules to improve type safety and resource management?

Refactoring C++ modules for type safety and resource management involves applying modern C++ standards to interfaces, functions, and classes, ensuring const-correct APIs, avoiding raw new/delete, and enforcing precise ownership semantics.

Can I use coding standards to check C++ template and error handling practices?

Yes, you can use coding standards to check C++ template and error handling practices by validating them against rules for complexity discipline, exception practices, naming conventions, and strong typing.

What are the limitations of applying modern C++ standards to an inherited codebase?

A limitation of applying modern C++ standards is that inherited codebases often require incremental refactoring rather than immediate full compliance, especially when updating complex ownership semantics and minimizing legacy interface complexity.