
Cpp Pro
Get modern C++ guidance—RAII, smart pointers, move semantics, and STL algorithms—while implementing performance-sensitive backend or systems code.
Overview
Cpp Pro is an agent skill for the Build phase that writes idiomatic modern C++ using RAII, smart pointers, STL algorithms, and performance-aware patterns.
Install
npx skills add https://github.com/sickn33/antigravity-awesome-skills --skill cpp-proWhat is this skill?
- Covers C++11 through C++23 features with const correctness and constexpr usage
- RAII-first approach with unique_ptr and shared_ptr instead of manual heap management
- Rule of Zero/Three/Five, move semantics, and perfect forwarding patterns
- Template metaprogramming, concepts, and STL algorithms over raw loops
- Concurrency with std::thread and atomics plus profiling with perf and VTune
- Explicitly spans C++11/14/17/20/23 feature guidance
- Lists seven focus areas including concurrency and exception safety
- Recommends profiling with perf and VTune in the approach section
Adoption & trust: 432 installs on skills.sh; 40.1k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You are shipping C++ that manually manages memory, ignores move semantics, or loops where STL algorithms and RAII would be safer and faster.
Who is it for?
Indie developers implementing or refactoring C++11+ backends, native tools, or performance-critical components with agent assistance.
Skip if: Tasks unrelated to C++ code, or greenfield apps better served by Rust/Go unless you are committed to a C++ stack.
When should I use this skill?
Working on cpp pro tasks, modern C++ implementation, or needing best-practice checklists for C++ code.
What do I get? / Deliverables
You receive modern, const-correct C++ with clear ownership, exception-safety intent, and profiling hooks when performance matters.
- Modern idiomatic C++ source or patches
- Ownership and exception-safety notes
- Verification steps aligned to stated constraints
Recommended Skills
Journey fit
Cpp-pro is shelved under Build backend because it guides implementation of C++ modules, services, and native components during product construction. Backend fits systems-level C++ services, native extensions, and algorithmic cores rather than visual UI work.
How it compares
Use for hands-on modern C++ implementation—not high-level architecture-only brainstorming without code.
Common Questions / FAQ
Who is cpp-pro for?
Solo builders and small teams writing or reviewing C++ who want agent output aligned with contemporary standards and safety rules.
When should I use cpp-pro?
During Build backend work when authoring templates, smart-pointer ownership, concurrent code, or when optimizing hot paths with perf/VTune guidance.
Is cpp-pro safe to install?
Review the Security Audits panel on this page; the skill advises on code patterns and may suggest shell profiling tools you should run only in trusted environments.
SKILL.md
READMESKILL.md - Cpp Pro
## Use this skill when - Working on cpp pro tasks or workflows - Needing guidance, best practices, or checklists for cpp pro ## Do not use this skill when - The task is unrelated to cpp pro - You need a different domain or tool outside this scope ## Instructions - Clarify goals, constraints, and required inputs. - Apply relevant best practices and validate outcomes. - Provide actionable steps and verification. - If detailed examples are required, open `resources/implementation-playbook.md`. You are a C++ programming expert specializing in modern C++ and high-performance software. ## Focus Areas - Modern C++ (C++11/14/17/20/23) features - RAII and smart pointers (unique_ptr, shared_ptr) - Template metaprogramming and concepts - Move semantics and perfect forwarding - STL algorithms and containers - Concurrency with std::thread and atomics - Exception safety guarantees ## Approach 1. Prefer stack allocation and RAII over manual memory management 2. Use smart pointers when heap allocation is necessary 3. Follow the Rule of Zero/Three/Five 4. Use const correctness and constexpr where applicable 5. Leverage STL algorithms over raw loops 6. Profile with tools like perf and VTune ## Output - Modern C++ code following best practices - CMakeLists.txt with appropriate C++ standard - Header files with proper include guards or #pragma once - Unit tests using Google Test or Catch2 - AddressSanitizer/ThreadSanitizer clean output - Performance benchmarks using Google Benchmark - Clear documentation of template interfaces Follow C++ Core Guidelines. Prefer compile-time errors over runtime errors. ## Limitations - Use this skill only when the task clearly matches the scope described above. - Do not treat the output as a substitute for environment-specific validation, testing, or expert review. - Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing. # Build Systems and Tooling ## Modern CMake ```cmake cmake_minimum_required(VERSION 3.20) project(MyProject VERSION 1.0.0 LANGUAGES CXX) # Set C++ standard set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) # Export compile commands for tools set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # Compiler warnings if(MSVC) add_compile_options(/W4 /WX) else() add_compile_options(-Wall -Wextra -Wpedantic -Werror) endif() # Create library target add_library(mylib src/mylib.cpp include/mylib.h ) target_include_directories(mylib PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<INSTALL_INTERFACE:include> PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src ) target_compile_features(mylib PUBLIC cxx_std_20) # Create executable add_executable(myapp src/main.cpp) target_link_libraries(myapp PRIVATE mylib) # Dependencies with FetchContent include(FetchContent) FetchContent_Declare( fmt GIT_REPOSITORY https://github.com/fmtlib/fmt.git GIT_TAG 10.1.1 ) FetchContent_MakeAvailable(fmt) target_link_libraries(mylib PUBLIC fmt::fmt) # Testing enable_testing() add_subdirectory(tests) # Install rules include(GNUInstallDirs) install(TARGETS mylib myapp EXPORT MyProjectTargets LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ) ``` ## Sanitizers ```cmake # AddressSanitizer (ASan) - memory errors set(CMAKE_CXX_FLAGS_ASAN "-g -O1 -fsanitize=address -fno-omit-frame-pointer" CACHE STRING "Flags for ASan build" ) # UndefinedBehaviorSanitizer (UBSan) set(CMAKE_CXX_FLAGS_UBSAN "-g -O1 -fsanitize=undefined -fno-omit-frame-po