cpp-pro

cpp-pro is a skill for Claude Code, Codex from hainamchung/agent-assistant. It costs 33 tokens per session (410 once invoked), scanned A, a copy of cpp-pro, MIT.

A guide to modern C++ programming, including memory-safe resource handling, standard library tools, templates, and concurrency.

In plain words
What is it for?
It is for designing and optimizing C++ code, using smart pointers and standard algorithms, and working with templates, threads, and atomics.
Why use it?
It helps developers write C++ that is easier to maintain and less likely to leak resources or mishandle errors.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/hainamchung/agent-assistant/cpp-pro
Any agent
npx skills add hainamchung/agent-assistant --skill cpp-pro
Clone the repo
git clone --depth 1 https://github.com/hainamchung/agent-assistant

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cpp-pro

README.md
[![agentmods](https://agentmods.dev/badge/skills/hainamchung/agent-assistant/cpp-pro.svg)](https://agentmods.dev/skills/hainamchung/agent-assistant/cpp-pro)
Your own site
<a href="https://agentmods.dev/skills/hainamchung/agent-assistant/cpp-pro"><img src="https://agentmods.dev/badge/skills/hainamchung/agent-assistant/cpp-pro.svg" alt="Measured on agentmods" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 410 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 92% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00033 $0.00410
Opus 5 $0.00016 $0.00205
Sonnet 5 $0.00007 $0.00082
Haiku 4.5 $0.00003 $0.00041

Measured 2d ago against content hash ad8193b76227, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

cpp-pro scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

92% identical to cpp-pro — 11 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/cpp-pro/SKILL.md · 58 lines

What it actually says

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.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 58 lines · 33 tokens per session scan A ad8193b76227

Subscribe to this mod's changes

cpp-pro is a skill published in the GitHub repository hainamchung/agent-assistant (54 stars, last pushed 3mo ago), licensed MIT. It adds 33 tokens to every session and 410 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 92% identical to cpp-pro, differing in 11 lines, and is treated as a copy.

Related

Other skills, from other repositories

zoom-meeting-sdk-unreal

Zoom Meeting SDK for Unreal Engine wrapper integrations. Use when building Unreal projects that embed Zoom meetings with C++ and Blueprint wrappers, including wrapper-to-SDK mapping concerns.

anthropics/knowledge-work-plugins · 41 tokens

new-cpp-lint

Create a new C++ lint rule, test it, run it across the codebase, and selectively apply fixes. Usage - /new-cpp-lint.

FastLED/FastLED · 41 tokens

doca-argp

Use this skill for hands-on DOCA Arg Parser CLI work on a shipped sample or new DOCA-using app — adding / removing / renaming flags; wiring docaargpinit → register params → docaargpstart → docaargpdestroy in order; picking a parameter type from the full public enum (DOCAARGPTYPESTRING, INT, BOOLEAN, DEVICE, DEVICEREP…

NVIDIA/skills · 267 tokens

ax-cpp-gen

Use when writing C++ code with axllm for AxGen programs, forward calls, indexed multi-sampling, result pickers, streaming, tools, assertions, traces, usage, and output parsing.

ax-llm/ax · 48 tokens

add-uint-support

Add unsigned integer (uint) type support to PyTorch operators by updating ATDISPATCH macros. Use when adding support for uint16, uint32, uint64 types to operators, kernels, or when user mentions enabling unsigned types, barebones unsigned types, or uint support.

pytorch/pytorch · 60 tokens

cuda-index-width

Choose 32-bit vs 64-bit index math in PyTorch CUDA kernels. Use when fixing large-tensor indexing overflows, deciding whether to use int64t, canUse32BitIndexMath, CUDAKERNELLOOPTYPE, or ATDISPATCHINDEXTYPES, and when considering binary-size or performance impact of index-type templating.

pytorch/pytorch · 71 tokens