cpp-docs

A reference guide to C++, a compiled programming language used for applications where control over memory, speed, and system resources matters.

In plain words
What is it for?
Use it when writing or reviewing C++ code, choosing types and control structures, designing classes, handling memory ownership, and building projects with tools such as CMake, Make, GCC, Clang, or MSVC.
Why use it?
It puts language rules and practical details about compilers and build tools together, reducing the need to look across many references.

Skill for Claude CodeCodex

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/pledgeandgrow/pledge-skills/cpp
Any agent
npx skills add pledgeandgrow/pledge-skills --skill cpp
Clone the repo
git clone --depth 1 https://github.com/pledgeandgrow/pledge-skills

Made for: Claude Code, Codex.

Per session 472 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,019 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found 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 $0.00472 $0.02019
Opus 5 $0.00236 $0.01009
Sonnet 5 $0.00094 $0.00404
Haiku 4.5 $0.00047 $0.00202

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

Security

Grade A, and why

cpp-docs 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.

skills/cpp/SKILL.md · 143 lines

How it starts

The opening of the file, as written. The whole thing — 143 lines — stays where its author put it; the contents beside it link to each section on GitHub.

C++ Expert (C++26)

Official Documentation: https://en.cppreference.com/w/

Quick Reference

Topic File
Installation, compilers (GCC, Clang, MSVC), build systems (CMake, Make), compiler flags, tooling getting-started.md
Basic syntax, comments, main function, preprocessor directives, translation units, linkage basics-syntax.md
Fundamental types, type modifiers, type inference (auto, decltype), type conversion, narrowing types.md
Variables, scope, storage duration, qualifiers (const, constexpr, constinit, volatile, mutable), references variables.md
Operators (arithmetic, comparison, logical, bitwise, member access, ternary, spaceship), operator overloading operators.md
Control structures (if/else, switch, while, do-while, for, range-for, break, continue, goto) control-structures.md
Functions, overloading, default arguments, lambda expressions, constexpr/consteval/constinit, function pointers functions.md
Classes, constructors, destructors, copy/move semantics, RAII, rule of 0/3/5, access specifiers, inheritance, virtual functions, polymorphism, abstract classes, friend, nested classes classes-objects.md
Function templates, class templates, variadic templates, template specialization, CTAD, concepts templates.md
Smart pointers (unique_ptr, shared_ptr, weak_ptr), raw pointers, references, new/delete, allocators, PMR memory.md
Exceptions (try/catch/throw, noexcept, exception hierarchy, RAII and exceptions, error codes) exceptions.md
STL containers (vector, array, deque, list, forward_list, map, multimap, unordered_map, set, stack, queue, priority_queue, span, flat_map) stl-containers.md
STL algorithms (sort, find, transform, accumulate, partition, etc.), iterators, ranges, views stl-algorithms.md
Strings (string, string_view, char_traits, C strings, formatting) stl-strings.md
Utilities (pair, tuple, optional, variant, any, function, bind, reference_wrapper, source_location) stl-utilities.md
Concurrency (thread, jthread, mutex, lock_guard, unique_lock, shared_mutex, condition_variable, future/promise, async, latch, barrier, counting_semaphore, atomic, memory order, stop_token) concurrency.md
I/O (iostream, fstream, stringstream, format, print, println, file system) io.md
Chrono (duration, time_point, clock, calendar, time zone, formatting) chrono.md
Numerics (complex, random, valarray, ratio, numeric limits, math functions, special math) numerics.md
Coroutines (co_await, co_yield, co_return, task, generator, promise_type) coroutines.md
Regular expressions (std::regex, regex_match, regex_search, regex_replace, ECMAScript syntax, iterators) stl-regex.md
Modules (export, import, module interface, module partition, header units), headers modules.md
Metaprogramming (type traits, constexpr, consteval, concepts, SFINAE, fold expressions, compile-time programming) metaprogramming.md
Idioms and patterns (RAII, Rule of 0/3/5, CRTP, Pimpl, NVI, type erasure, copy-and-swap, value categories, ODR, ADL, design patterns) idioms-patterns.md
C standard library compatibility (C headers, C I/O, C memory, C strings, signals, assertions, errno, locale, wide chars) c-compat.md
Testing and benchmarking (Google Test, Catch2, doctest, Google Benchmark, mocks, fuzzing, CMake integration) testing.md
Keywords, operators, escape sequences, standard library headers, predefined macros, attributes, integer type ranks keywords-reference.md
Advanced topics (contracts, named requirements, freestanding, SIMD, reflection, evaluation order, debugging, safe reclamation, inplace_vector, hive) advanced-topics.md
C++26/23/20/17/14/11 new features and migration whats-new.md

Read the full file on GitHub · 143 lines

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 · 143 lines · 472 tokens per session scan A e6b6d5295b82

Subscribe to this mod's changes

cpp-docs is a skill published in the GitHub repository pledgeandgrow/pledge-skills (10 stars, last pushed 1mo ago), licensed MIT. It adds 472 tokens to every session and 2,019 once invoked, about $0.0024 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

cpp

Modern C++ programming patterns and idioms.

miles990/claude-software-skills · 10 tokens

readable-cpp

Readable C/C++/Rust/CUDA code rules inspired by The Art of Readable Code. Use when writing, reviewing, or refactoring C, C++, Rust, or CUDA code. Enforces short functions, flat control flow, clear naming, readable structure, and idiomatic patterns.

crazyguitar/cppcheatsheet · 63 tokens

cpp-to-dafny-translator

Translate C/C++ programs to equivalent Dafny code while preserving semantics and ensuring verification. Use when users ask to convert, translate, or port C/C++ code to Dafny, or when they need to formally verify C/C++ algorithms using Dafny's verification capabilities. Handles functions, structs, pointers, arrays…

ArabelaTso/Skills-4-SE · 96 tokens

c-cpp-to-lean4-translator

Translate C or C++ programs into equivalent Lean4 code, preserving program semantics and ensuring the generated code is well-typed, executable, and can run successfully. Use when the user asks to convert C/C++ code to Lean4, port C/C++ programs to Lean4, translate imperative code to functional Lean4, or create Lean4…

ArabelaTso/Skills-4-SE · 85 tokens

acsl-annotation-assistant

Create ACSL (ANSI/ISO C Specification Language) formal annotations for C/C++ programs. Use this skill when working with formal verification, adding function contracts (requires/ensures), loop invariants, assertions, memory safety annotations, or any ACSL specifications. Supports Frama-C verification and generates…

ArabelaTso/Skills-4-SE · 76 tokens

cpp

Comprehensive C/C++ programming reference covering everything from C11-C23 and C++11-C++23, system programming, CUDA GPU computing, debugging tools, Rust interop, and advanced topics. Use for: C/C++ questions, C/C++ interview preparation, modern language features, RAII/memory management, templates/generics, CUDA…

crazyguitar/cppcheatsheet · 107 tokens