effective-cpp

effective-cpp is a skill for Claude Code, Codex from catiicode/claude-code-awesome-skills. It costs 205 tokens per session (3,546 once invoked), scanned A, original, MIT.

A reference guide for writing, reviewing, refactoring, and debugging C++ code, including advice on classes, memory ownership, inheritance, templates, and modern C++ features.

In plain words
What is it for?
Use it during C++ implementation and code review, especially for resource management, class design, move operations, templates, concurrency, performance, and exception handling.
Why use it?
It helps identify code that may leak memory, crash, behave incorrectly, or be harder to maintain. The guidance is organized by the seriousness of the risk.

Skill for Claude CodeCodex

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

Good fit Use it during C++ implementation and code review, especially for resource management, class design, move operations, templates, concurrency, performance, and exception handling.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/catiicode/claude-code-awesome-skills/effective-cpp
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.

Any agent
npx skills add catiicode/claude-code-awesome-skills --skill effective-cpp
Clone the repo
git clone --depth 1 https://github.com/catiicode/claude-code-awesome-skills

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 effective-cpp

README.md
[![agentmods](https://agentmods.dev/badge/skills/catiicode/claude-code-awesome-skills/effective-cpp/github.svg)](https://agentmods.dev/skills/catiicode/claude-code-awesome-skills/effective-cpp)
Your own site
<a href="https://agentmods.dev/skills/catiicode/claude-code-awesome-skills/effective-cpp"><img src="https://agentmods.dev/badge/skills/catiicode/claude-code-awesome-skills/effective-cpp/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for effective-cpp

Your own site · 80×15
<a href="https://agentmods.dev/skills/catiicode/claude-code-awesome-skills/effective-cpp"><img src="https://agentmods.dev/badge/skills/catiicode/claude-code-awesome-skills/effective-cpp.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 205 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,546 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00205 $0.03546
Opus 5.5 $0.00082 $0.01418
Sonnet 5.5 $0.00041 $0.00709
Haiku 4.5 $0.00020 $0.00355

Measured 1mo ago against content hash 74287b167e48, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

effective-cpp 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 1mo 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.

effective-cpp/SKILL.md · 206 lines

How it starts

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

Effective C++ Development Guide

Best practices from Scott Meyers' three books, organized by priority for practical C++ development.

Sources: [EC] Effective C++ (55 Items) | [MEC] More Effective C++ (35 Items) | [EMC] Effective Modern C++ (42 Items)

Priority: IRON RULE (UB/crash/leak) > STRONG (correctness/maintainability) > GOOD (quality improvement)

C++ Baseline: C++11

Deep-dive references — read when working on a specific topic:


Iron Rules — Violating These Causes UB, Crashes, or Leaks

# Rule Key Point
1 RAII [EC-13, MEC-9, MEC-10] Every resource owned by an object whose destructor releases it. No manual cleanup. Smart pointer members in constructors prevent partial-construction leaks.
2 Match new/delete forms [EC-16] new→delete, new[]→delete[]. Mismatch = UB. Prefer containers over raw arrays.
3 Virtual destructor for polymorphic bases [EC-7] Deleting derived via base pointer with non-virtual dtor = UB. Has virtual functions → needs virtual dtor.
4 No exceptions from destructors [EC-8, MEC-11] Second exception during stack unwinding → std::terminate(). Wrap throws in try/catch. Provide separate close() for error handling.
5 No virtual calls in ctors/dtors [EC-9] During base construction, dynamic type IS the base. Virtual calls resolve to base version, never derived. Pass info via ctor args.
6 No redefining non-virtual functions or default params [EC-36, EC-37] Both are statically bound. Redefining creates confusing behavior depending on pointer type. Use NVI for defaults.
7 No polymorphic arrays [MEC-3] sizeof(Base) ≠ sizeof(Derived) breaks pointer arithmetic. Use vector<unique_ptr<Base>>.
8 Smart pointer ownership [EMC-18–21] unique_ptr (default) / shared_ptr (truly shared) / weak_ptr (observer). Never two shared_ptr from same raw pointer. Use make_unique/make_shared. Store new-ed objects in smart pointers immediately [EC-17].
9 Correct copying [EC-11, EC-12, EMC-17] Self-assignment safety (copy-and-swap). Copy ALL parts (members + base). Rule of Five: declare any special member → declare all five.
10 std::move/forward correctness [EMC-23, EMC-25] move = unconditional rvalue cast. forward = conditional (universal refs). Apply on LAST use only. Never move const (silently copies). Never move return values (inhibits RVO).
11 atomic ≠ volatile [EMC-40] std::atomic = thread safety. volatile = no optimization (hardware I/O). volatile provides ZERO thread safety in C++.
12 Exception safety basics [EC-29, MEC-13] Catch by reference (never by value — slicing). Catch derived before base (first-fit matching). Every function: at least basic guarantee.

Read the full file on GitHub · 206 lines

Files

What ships with it

9 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago First seen · 206 lines · 205 tokens per session scan A 74287b167e48

Subscribe to this mod's changes

effective-cpp is a skill published in the GitHub repository catiicode/claude-code-awesome-skills (1 stars, last pushed 7mo ago), licensed MIT. It adds 205 tokens to every session and 3,546 once invoked, about $0.0008 per session on Opus 5.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-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 performance…

Jeffallan/claude-skills · 79 tokens

memory-safety-patterns

Implement memory-safe programming with RAII, ownership, smart pointers, and resource management across Rust, C++, and C. Use when writing safe systems code, managing resources, or preventing memory bugs.

rmyndharis/antigravity-skills · 45 tokens

re-cpp-abi

A tool for examining compiled modern C++ programs when the original source code is unavailable. It helps recover class information, virtual function tables, exception paths, and readable names from a binary file.

dslsdzc/rev-skills · 69 tokens

cuda-c-optimization

A guide for improving CUDA C programs, which run computations on NVIDIA GPUs. It covers GPU memory access, thread-block sizing, numerical stability, and debugging.

mindspore-ai/akg · 20 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 · 0 tokens

agent-cpp-expert

Specialist subagent: C and C++ development, modern C++ (C++17/20/23), CMake, systems programming, and memory management specialist. Use when writing C/C++ code, debugging memory issues, or building systems-level software. Trigger phrases: C++, C language, CMake, modern C++, systems programming, memory management…

travisjneuman/.claude · 88 tokens