cpp-coding-standards

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

Updated Sep 13, 2025
One-click install
npx skills add https://github.com/llmh333/employee_management_spring --skill cpp-coding-standards-llmh333
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cpp-coding-standards
Source: https://github.com/llmh333/employee_management_spring/tree/main/.gemini/skills/cpp-coding-standards
Command: npx skills add https://github.com/llmh333/employee_management_spring --skill cpp-coding-standards-llmh333

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves inconsistent or unsafe C++ code practices by providing a single, modern set of rules for writing, reviewing, and refactoring C++ in line with the C++ Core Guidelines.

Core Features & Use Cases

  • RAII-first resource safety: Ensures resources are managed automatically and prevents leaks.
  • Immutability and type safety: Encourages const/constexpr and strong typing to reduce errors at compile time.
  • Maintainable interfaces and logic: Promotes clear function design, low complexity, and readable naming.

Use cases: onboarding a team to consistent C++ practices, performing code reviews, and refactoring legacy code toward safer patterns (e.g., smart pointers, Rule of Zero/Five, scoped locks).

Quick Start

Ask the AI: "Review this C++ code and list the violations of the C++ Core Guidelines referenced by the cpp-coding-standards skill, grouped by category, with concrete corrected examples."

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?

Refactor legacy C++ toward modern safe patterns by replacing manual resource management with RAII and smart pointers, applying the Rule of Zero or Five, enforcing scoped locking for concurrency, and adding custom exception types for robust error handling.

What is the best way to ensure exception safety and resource management in modern C++?

Ensure exception safety and resource management in modern C++ by applying RAII everywhere so resources are tied to object lifetimes, utilizing smart pointers to prevent leaks, and implementing custom exception types to handle errors safely without resource loss.

Does modern C++ coding standards require standards-based template constraints?

Yes, modern C++ coding standards require standards-based template constraints to enforce strong typing and reduce errors at compile time. Applying these constraints ensures idiomatic template design and maintains type safety across general-purpose C++ development.

How do I refactor legacy C++ toward safer patterns like RAII and scoped locks?

Refactor legacy C++ toward modern safe patterns by replacing manual resource management with RAII and smart pointers, applying the Rule of Zero or Five, enforcing scoped locking for concurrency, and adding custom exception types for robust error handling.