cpp-pro
Write idiomatic C++ code with modern features, RAII, smart pointers, and STL algorithms. Handles templates, move semantics, and performance optimization. Use PROACTIVELY for C++ refactoring, memory safety, or complex C++ patterns.
Author
Category
Development ToolsInstall
Download and extract to your skills directory
Copy command and send to OpenClaw for auto-install:
cpp-pro - Modern C++ Programming Intelligent Assistant
Skill Overview
cpp-pro is a professional modern C++ programming assistant focused on producing idiomatic code that conforms to the C++ Core Guidelines. It helps developers write safe and efficient C++ programs using RAII, smart pointers, and STL algorithms.
Applicable Scenarios
Core Features
std::unique_ptr and std::shared_ptr for memory management, follow the Rule of Zero/Three/Five, ensure exception safety, and avoid memory leaks.Frequently Asked Questions
Which C++ standards does cpp-pro support?
cpp-pro supports C++11, C++14, C++17, C++20, and C++23. The generated code will automatically select an appropriate C++ standard based on task requirements and configure the corresponding compilation options in CMakeLists.txt (such as CMAKE_CXX_STANDARD). The default preference is C++17 or C++20 to take advantage of the best language features.
How do I use cpp-pro for C++ code refactoring?
Provide the C++ code snippet that needs refactoring and describe the refactoring goals (for example, "replace raw pointers with smart pointers", "use STL algorithms instead of loops", or "upgrade to C++20"). cpp-pro will analyze the code issues, apply modern C++ best practices, and explain the reasons for each change. For complex projects, it's recommended to refactor module by module.
Can cpp-pro generate C++ code with tests?
Yes. Projects generated by cpp-pro include full test framework support, with a choice of Google Test or Catch2 for unit tests. For performance-critical code, Google Benchmark will be generated for benchmarking. All code is validated with AddressSanitizer and ThreadSanitizer to ensure no memory errors or data races.