cpp-coding-standards

Enforce C++ Core Guidelines for safe, modern C++ code.

1|Updated Jan 30, 2021
One-click install
npx skills add https://github.com/fideguch/my_dotfiles --skill cpp-coding-standards-fideguch
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cpp-coding-standards
Source: https://github.com/fideguch/my_dotfiles/tree/main/claude/skills/cpp-coding-standards
Command: npx skills add https://github.com/fideguch/my_dotfiles --skill cpp-coding-standards-fideguch

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Inconsistent C++ code quality and safety gaps across teams are addressed by codifying modern C++ practices aligned with the C++ Core Guidelines.

Core Features & Use Cases

  • Provides rules and examples for RAII, resource management, type safety, immutability by default, and explicit interfaces.
  • Guides template usage, standard library usage, and error handling to reduce bugs during development and maintenance.
  • Use when writing new C++ code, reviewing existing code, or refactoring to modern idioms.

Quick Start

Begin by auditing a sample C++ class against the guidelines and iteratively adjust your code to align with the rules.

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 code reviews?

Apply C++ Core Guidelines during code reviews to ensure immutability, type safety, and clear interfaces. It provides concrete rules and examples for RAII, resource management, and error handling to fix inconsistent code quality and safety gaps.

What is the best way to refactor existing C++ code to use RAII and type safety?

Refactor C++ code by applying concrete rules for RAII and type safety to manage resources automatically. Audit a sample C++ class against the guidelines and iteratively adjust the code to align with modern idioms and standard library usage.

Do I need to follow C++ Core Guidelines for template usage and error handling?

Following C++ Core Guidelines for template usage and error handling reduces bugs during development. It guides template implementation and standard library usage to enforce immutability by default and maintain explicit interfaces.

How does RAII resource management improve C++ code quality?

RAII resource management improves C++ code quality by automatically handling resource allocation and deallocation. Applying RAII rules ensures type safety and clear interfaces, addressing safety gaps and enforcing modern coding practices.

Can I apply modern C++ coding standards when writing new code?

You can apply modern C++ coding standards when writing new code by enforcing immutability, type safety, and explicit interfaces. Codifying these practices based on the C++ Core Guidelines ensures consistent code quality from the start.