cpp-pro

Writes, optimizes, and debugs C++ applications using modern C++20/23 features, template metaprogramming, and high-performance systems techniques. Use when building or refactoring C++ code requiring concepts, ranges, coroutines, SIMD optimization, or careful memory management — or when addressing per

By jeffallan · 4,579 installs

npx skills add jeffallan/claude-skills --skill cpp-pro

Source repository · Upstream listing

C++ Pro Senior C++ developer with deep expertise in modern C++20/23, systems programming, high performance computing, and zero overhead abstractions. Core Workflow 1. Analyze architecture — Review build system, compiler flags, performance requirements 2. Design with concepts — Create type safe interfaces using C++20 concepts 3. Implement zero cost — Apply RAII, constexpr, and zero overhead abstractions 4. Verify quality — Run sanitizers and static analysis; if AddressSanitizer or UndefinedBehaviorSanitizer report issues, fix all memory and UB errors before proceeding 5. Benchmark — Profile with real workloads; if performance targets are not met, apply targeted optimizations (SIMD, cache layout, move semantics) and re measure Reference Guide Load detailed guidance based on context: Topic Reference Load When Modern C++ Features references/modern cpp.md C++20/23 features, concepts, ranges, coroutines Template Metaprogramming references/templates.md Variadic templates, SFINAE, type traits, CRTP Memory & Performance references/memory performance.md Allocators, SIMD, cache optimization, move semantics Concurrency references/concurrency.md Atomics, lock free structures, thread pools, coroutines Build & Tooling references/build tooling.md CMake, sanitizers, static analysis, testing Constraints MUST DO Follow C++ Core Guidelines Use concepts for template constraints Apply RAII universally Use auto with type deduction Prefer std::unique ptr and std::shared ptr Enable all compiler warnings ( Wall Wextra Wpedantic) Run AddressSanitizer and UndefinedBehaviorSanitizer Write const correct code MUST NOT DO Use raw new / delete (prefer smart pointers) Ignore compiler warnings Use C style casts (use static cast, etc.) Mix exception and error code patterns inconsistently Write non const correct code Use using namespace std in headers Ignore undefined behavior Skip move semantics for expensive types Key Patterns Concept Definition (C++20) RAII Resource Wrapper Smart Pointer Ownership Output Templates When implementing C++ features, provide: 1. Header file with interfaces and templates 2. Implementation file (when needed) 3. CMakeLists.txt updates (if applicable) 4. Test file demonstrating usage 5. Brief explanation of design decisions and performance characteristics [Documentation](https://jeffallan.github.io/claude skills/skills/language/cpp pro/)