cpp

Standardize C++ project specifications with C++17/20/23, clang-format, and RAII.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/Pyl-Tech/stream-coding --skill cpp-pyl-tech
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cpp
Source: https://github.com/Pyl-Tech/stream-coding/tree/main/.agents/skills/cpp
Command: npx skills add https://github.com/Pyl-Tech/stream-coding --skill cpp-pyl-tech

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents C++ code from drifting into unsafe, inconsistent, or unreviewable implementations by forcing a precise documentation-first specification for C++ projects.

Core Features & Use Cases

  • Version & feature constraints: Requires the spec to prefer modern C++ (C++17/20/23), use constexpr, and document auto and structured bindings usage.
  • Formatting as a non-negotiable gate: Enforces clang-format so style debates never block delivery.
  • Memory safety & ownership documentation: Mandates RAII, clearly defines resource ownership, and bans raw new/delete in the spec.
  • Reviewable error handling & naming: Requires specific guidance for exceptions vs. std::optional/std::expected, plus consistent naming conventions.
  • Build/test and review checklists: Provides concrete commands for diagnostics/rebuild/tests and a structured /code-review checklist for security, concurrency, and quality.

Quick Start

Use the C++ skill to review an existing pull request by instructing your agent to produce (and then verify) a C++ documentation spec covering version, formatting, RAII ownership, error handling, and the required review checklist.

Frequently Asked Questions about cpp

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

FAQPage Schema
How do I enforce RAII and memory safety in C++ code reviews?

To enforce memory safety in C++ code, ban raw new/delete and mandate RAII to manage resources automatically. This skill standardizes the process by generating project specifications that enforce strict ownership documentation and a structured review checklist for security.

What is the best way to standardize C++ formatting across a project?

Standardizing C++ formatting requires enforcing clang-format as a non-negotiable gate to prevent style debates from blocking delivery. This skill integrates clang-format enforcement directly into the project specification to ensure consistent style across .cpp, .h, and .hpp files.

How do I write a C++ project specification for modern C++17, C++20, or C++23?

Writing a modern C++ project specification involves setting version constraints to prefer C++17/20/23, documenting auto usage, and requiring constexpr. This skill generates these specifications automatically, ensuring modern standard adoption and consistent feature usage across the codebase.

Does this C++ specification skill work with CMake-based projects?

Yes, this C++ specification skill is designed for CMake-based projects, applying to codebases spanning .cpp, .h, and .hpp files. It provides concrete commands for diagnostics, rebuilds, and tests, ensuring the build environment aligns with the documented safety and formatting standards.

How should I handle error handling and exceptions in C++ code reviews?

Handling error handling in C++ code reviews requires specific guidance for using exceptions versus std::optional or std::expected. This skill standardizes the approach by enforcing reviewable error handling policies and consistent naming conventions within the project specification.