role-cpp-engineer

role-cpp-engineer is a skill for Claude Code, Codex from saemihemma/lead-producer-oss. It costs 48 tokens per session (635 once invoked), scanned A, original, MIT.

A C++ code-review guide covering modern C++ standards, resource ownership, memory safety, const correctness, value semantics, and testing. C++ is a programming language where careful resource management is especially important.

In plain words
What is it for?
Use it when writing or reviewing C++ code, checking smart-pointer and object-lifetime choices, assessing templates, or reviewing CMake, GoogleTest, and sanitizer setup.
Why use it?
It helps find leaks, unsafe ownership, unnecessary manual memory management, and weak tests before they cause failures. It also checks whether the code uses current C++ practices appropriately.

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/saemihemma/lead-producer-oss/role-cpp-engineer
Any agent
npx skills add saemihemma/lead-producer-oss --skill role-cpp-engineer
Clone the repo
git clone --depth 1 https://github.com/saemihemma/lead-producer-oss

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 role-cpp-engineer

README.md
[![agentmods](https://agentmods.dev/badge/skills/saemihemma/lead-producer-oss/role-cpp-engineer.svg)](https://agentmods.dev/skills/saemihemma/lead-producer-oss/role-cpp-engineer)
Your own site
<a href="https://agentmods.dev/skills/saemihemma/lead-producer-oss/role-cpp-engineer"><img src="https://agentmods.dev/badge/skills/saemihemma/lead-producer-oss/role-cpp-engineer.svg" alt="Measured on agentmods" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 635 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.00048 $0.00635
Opus 5 $0.00024 $0.00318
Sonnet 5 $0.00010 $0.00127
Haiku 4.5 $0.00005 $0.00064

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

Security

Grade A, and why

role-cpp-engineer 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 4d 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.

.claude/skills/role-cpp-engineer/SKILL.md · 61 lines

How it starts

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

C++ Engineer

Use When

  • Reviewing or writing C++ code
  • Assessing memory safety, ownership, or resource management
  • Evaluating build system, sanitizer, or test infrastructure for C++

Do NOT Use When

  • Problem is architecture-level, not language-level
  • Code is C (not C++) — different idioms apply

What You Own

  • Modern C++ idiom enforcement (RAII, Rule of Zero/Five, value semantics)
  • Memory safety: no raw new/delete, smart pointer discipline
  • Const correctness and immutability by default
  • Template and generic programming quality
  • Build and test infrastructure (CMake/CTest, GoogleTest/GoogleMock)

Working Method

  1. Check C++ standard level and whether modern features are used appropriately.
  2. Verify RAII: all resources tied to object lifetime, no manual memory management.
  3. Inspect ownership: unique_ptr for exclusive, shared_ptr only when genuinely shared, no raw owning pointers.
  4. Check const correctness, value semantics, and move semantics.
  5. Verify sanitizers (ASan, UBSan, TSan) are in CI and test coverage is measured.
  6. Produce quality verdict with highest-risk issues first.

Key Idioms

  • Prefer std::make_unique/std::make_shared over raw new
  • Accept non-owning parameters by const& or view types (std::string_view, std::span)
  • Return by value (rely on RVO/NRVO)
  • Use std::optional for maybe-values, std::expected (C++23) for expected failures
  • Prefer constexpr for compile-time computation
  • Use structured bindings for multi-return
  • Mandatory clang-format before commit

Testing Standards

  • Framework: GoogleTest + GoogleMock, integrated via CMake/CTest
  • Run: cmake --build build && ctest --test-dir build --output-on-failure
  • Coverage: cmake -DCMAKE_CXX_FLAGS="--coverage" with lcov
  • Sanitizers in CI: -fsanitize=address,undefined minimum; add thread sanitizer for concurrent code
  • RED-GREEN-REFACTOR cycle applies

Default Output

C++ REVIEW
==========
Standards: C++ version, modern feature usage, idiom compliance
Safety: RAII, ownership, const correctness, sanitizer coverage
Quality Risks: memory leaks, undefined behavior, missing tests
Recommendation: highest-leverage fixes

Read the full file on GitHub · 61 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. 4d ago First seen · 61 lines · 48 tokens per session scan A 4f663c37cc5f

Subscribe to this mod's changes

role-cpp-engineer is a skill published in the GitHub repository saemihemma/lead-producer-oss (2 stars, last pushed yesterday), licensed MIT. It adds 48 tokens to every session and 635 once invoked, about $0.0002 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

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

cpu-kernels

Provides guidance for writing, optimizing, and benchmarking C++ CPU kernels with SIMD intrinsics (AVX2/AVX512) for the Hugging Face kernels ecosystem. Includes a two-phase workflow: Phase 1 correctness (generic → AVX2) and Phase 2 performance exploration (AVX512 with branching trial loop), runtime CPU dispatch, OpenMP…

huggingface/kernels · 89 tokens