cpp-rules
cpp-rules provides comprehensive C++ development standards drawn from ai-toolkit's rule library. It covers naming conventions, modern language features, memory management with smart pointers, and framework guidance for CMake, Boost, Qt, and gRPC. The rules emphasize RAII patterns, error handling strategies, concurrency practices, and design patterns to maintain code quality and security across C++ projects.
cpp-rules applies C++ coding standards covering style, patterns, security, and testing to guide code reviews and development.
AI-generated summary based on this skill's SKILL.md
Install
softspark/ai-toolkit/cpp-rules · repository language: Python
git clone https://github.com/softspark/ai-toolkit
cp -r ai-toolkit/app/skills/cpp-rules ~/.claude/skills/cpp-rulesFrequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
What C++ coding style guide does cpp-rules provide?
cpp-rules delivers comprehensive C++ development standards from ai-toolkit's rule library, covering naming conventions, code organization, and style practices. The skill guides you through PascalCase and camelCase conventions, modern formatting principles, and consistency rules to maintain professional code quality across your C++ projects.
How does cpp-rules help with modern C++ 17, 20, and 23 standards?
cpp-rules teaches modern C++ 17, 20, and 23 features and idioms to help you write cleaner, more efficient code. The skill covers contemporary language capabilities, best practices for leveraging new standards, and patterns that take advantage of recent C++ evolution while maintaining compatibility with your project's requirements.
Does cpp-rules address C++ memory management and RAII with smart pointers?
Yes, cpp-rules emphasizes RAII patterns and smart pointer usage for safe memory management. The skill provides guidance on proper resource acquisition and release, smart pointer selection, and techniques to prevent memory leaks and dangling pointers in your C++ applications.
What frameworks does cpp-rules cover for C++ development?
cpp-rules offers framework guidance for CMake, Boost, Qt, and gRPC. The skill helps you apply best practices when building with CMake, leveraging Boost libraries, developing with Qt, and implementing gRPC services, ensuring consistent standards across your entire C++ ecosystem.
How can cpp-rules help prevent C++ security issues like buffer overflow?
cpp-rules implements secure C++ practices with buffer overflow and memory safety checks. The skill guides input validation, secure coding patterns, compiler hardening flags, and defensive programming techniques to protect your applications from common vulnerabilities and exploitation vectors.
Does cpp-rules support C++ testing with GoogleTest?
cpp-rules provides guidance for writing and structuring C++ unit tests with GoogleTest and gmock. The skill covers test organization, mocking strategies, and testing best practices to help you build reliable, maintainable test suites for your C++ code.
SKILL.md
rendered from the published skill — quoted content, verbatim
C++ Rules
These rules come from app/rules/cpp/ in ai-toolkit. They cover
the project's standards for coding style, frameworks, patterns,
security, and testing in C++. Apply them when writing or
reviewing C++ code.
C++ Coding Style
Naming
- PascalCase: classes, structs, enums, type aliases, concepts.
- camelCase or snake_case: functions, methods, variables (be consistent per project).
- UPPER_SNAKE: macros, compile-time constants.
- Prefix member variables with
m_or suffix with_(pick one convention). - Namespace names: lowercase, short (
namespace io,namespace util).
Modern C++ (17/20/23)
- Use
autofor iterator types and complex template deductions. - Use
std::optional<T>instead of sentinel values or pointers for optional returns. - Use
std::variantover union types. Usestd::visitfor dispatch. - Use
std::string_viewfor non-owning string parameters. - Use structured bindings: `auto [key, value] =
(truncated - see the full file via the links below)
Read as markdown · JSON record · Browse the source repository
File tree — 1 file
app/skills/cpp-rules/SKILL.md