New to Claude Skills? Learn how to install them →

davila7 on GitHub

C++ Pro

Free

Master modern C++ with best practices and performance optimization.

Get this skill

Free · Opens the source repo

What C++ Pro does

C++ Pro is designed for developers looking to enhance their C++ programming skills, particularly in modern C++ standards from C++11 to C++23. This skill provides guidance on idiomatic C++ code, focusing on features such as RAII (Resource Acquisition Is Initialization), smart pointers, and STL (Standard Template Library) algorithms. It emphasizes the importance of memory management, performance optimization, and the use of templates, move semantics, and concurrency features.

By following best practices outlined in the skill, users can write cleaner, more efficient, and safer C++ code. The skill encourages the use of stack allocation and smart pointers, ensuring that memory is managed effectively and reducing the risk of leaks. It also promotes the use of STL algorithms over traditional loops, which can lead to more readable and maintainable code.

C++ Pro is ideal for both novice and experienced C++ developers who want to deepen their understanding of modern C++ features and practices. Whether you are working on a new project or maintaining an existing codebase, this skill provides actionable steps, checklists, and validation techniques to improve your workflow and code quality. For detailed examples and implementation strategies, users can refer to the resources provided within the skill.

When to use it

Use this skill when you are working on C++ projects that require modern features and performance optimization.

When not to use it

Avoid this skill for tasks unrelated to C++ programming or when needing guidance in a different programming domain.

What you can build with it

Writing Modern C++ Code

Use C++ Pro to guide you in writing idiomatic C++ code that leverages modern features and best practices.

Performance Optimization

When optimizing your C++ applications, this skill provides actionable steps to enhance performance and memory usage.

Learning C++ Best Practices

If you're new to C++, this skill serves as a comprehensive resource for learning best practices in modern C++ programming.

How to install C++ Pro

View source

1. Install with the skills CLI

npx skills add davila7/claude-code-templates/cpp-pro --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by davila7

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.

Frequently asked questions about C++ Pro

Similar skills