PluginBench
Agent
opus
Active

cpp-pro

via wshobson/agents

Write idiomatic modern C++ with RAII, smart pointers, templates, and performance optimization.

What is cpp-pro?

Expert C++ agent for modern C++ (C++11–C++23) code, focusing on memory safety, performance, and best practices. Use it for refactoring legacy C++, implementing complex patterns, optimizing hot paths, or ensuring exception safety and concurrency correctness.

  • Write modern C++ code with RAII, smart pointers, and move semantics
  • Apply template metaprogramming, concepts, and perfect forwarding
  • Optimize with STL algorithms, const correctness, and constexpr
  • Generate CMakeLists.txt, unit tests (Google Test/Catch2), and benchmarks
  • Ensure AddressSanitizer/ThreadSanitizer compliance and exception safety
  • Profile and optimize performance using perf and VTune
Agent definition (reference)

Source of truth, from the repository.

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.

Related agents

CScsharp-pro logo

Modern C# expert for enterprise .NET development with advanced features and performance optimization.

inherit
40k
via wshobson/agents

AI-powered customer support specialist automating conversations, ticketing, and omnichannel experiences.

haiku
40k
via wshobson/agents

Build scalable data pipelines, warehouses, and real-time streaming architectures with modern data stack tools.

opus
40k
via wshobson/agents

Expert backend architect for scalable APIs, microservices, and distributed systems design.

inherit
40k
via wshobson/agents

Expert data scientist for advanced analytics, machine learning, statistical modeling, and data-driven business insights.

inherit
40k
via wshobson/agents

Expert backend security coding for input validation, authentication, and API protection.

sonnet
40k
via wshobson/agents