lang-cpp

Standardize C and C++ code against Google C++ conventions with C++20 practices.

Updated Mar 19, 2026
One-click install
npx skills add https://github.com/dragoscirjan/opencode-config --skill lang-cpp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lang-cpp
Source: https://github.com/dragoscirjan/opencode-config/tree/main/skills/lang-cpp
Command: npx skills add https://github.com/dragoscirjan/opencode-config --skill lang-cpp

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill gives C and C++ work a consistent set of style, safety, and tooling rules so code reviews, refactors, and new implementations stay aligned across a project.

Core Features & Use Cases

  • Style Guidance: Follows the Google C++ Style Guide for naming, layout, and code structure.
  • Modern C++ Practices: Encourages C++20 or newer patterns, explicit const usage, smart pointers, and RAII-based design.
  • Tooling Expectations: Reinforces use of clang-format, clang-tidy, CMake, GoogleTest, and Catch2 for maintainable development workflows.
  • Use Case: Use it when drafting a new library, reviewing a pull request, or cleaning up legacy code that needs safer memory handling and stricter compiler settings.

Quick Start

Apply the lang-cpp skill to review or write C++ code so it follows the configured style, memory-safety, and build-tooling standards.

Frequently Asked Questions about lang-cpp

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

FAQPage Schema
How do I standardize C++ code to follow Google C++ conventions?

Standardize C++ code by applying consistent style, safety, and tooling rules based on the Google C++ Style Guide for naming, layout, and structure. This ensures code reviews, refactors, and new implementations stay aligned across a project.

What modern C++ practices should I use for safer memory management?

Safer memory management requires modern C++20 practices, explicit const usage, smart pointers, and RAII-based design. Compiler warnings must be treated as errors, alongside sanitizer-aware validation for robust code.

How do I configure CMake and clang-format for a C++20 project?

Configure CMake and clang-format to align tooling expectations for maintainable development workflows. This standardizes build configuration and code formatting alongside clang-tidy integration for automated style enforcement.

Does this approach work with GoogleTest and Catch2 for C++ testing?

Yes, this approach works with GoogleTest and Catch2 for testing workflows. It applies standard rules to test code where style, build configuration, and refactoring decisions must align with the overall C++ conventions.

When should I apply strict C++ coding standards to legacy code?

Apply strict C++ coding standards to legacy code when cleaning up projects that need safer memory handling and stricter compiler settings. This enforces RAII memory management and sanitizer-aware validation during refactoring.

Why use clang-tidy alongside clang-format for C++ development?

Use clang-tidy alongside clang-format to reinforce tooling alignment for maintainable development workflows. While clang-format handles style, clang-tidy provides static analysis to enforce modern C++20 practices and safety rules.