role-cpp-engineer
Skill2 starsChanged 3 months agoMITView on GitHub
C++ code review: modern standards (C++17/20/23), RAII, memory safety, value semantics, const correctness, and GoogleTest patterns. Use when reviewing or writing C++ code.
In this repository74 other files it gives its agents.
- .claude/CLAUDE.mdCLAUDE.md
- lead-producerSkill
- role-analytics-engineerSkill
- role-backend-engineerSkill
- role-behavioral-economistSkill
- role-brand-strategistSkill
- role-code-reduction-engineerSkill
- role-community-developerSkill
- role-context-managerSkill
- role-ctoSkill
- role-database-engineerSkill
- role-data-engineerSkill
- role-devops-engineerSkill
- role-economistSkill
- role-economy-designerSkill
- role-education-researcherSkill
- role-elementary-math-teacherSkill
- role-elementary-teacherSkill
- role-frontend-engineerSkill
- role-game-balance-designerSkill
- role-game-designerSkill
- role-godot-engineerSkill
- role-go-engineerSkill
- role-icelandic-linguistSkill
- role-icelandic-teacherSkill
- role-java-engineerSkill
- role-kotlin-engineerSkill
- role-level-designerSkill
- role-liveops-engineerSkill
- role-move-sui-developerSkill
- role-narrative-designerSkill
- role-open-source-engineerSkill
- role-principal-software-engineerSkill
- role-product-managerSkill
- role-product-marketing-managerSkill
- role-python-engineerSkill
- role-qa-engineerSkill
- role-railway-deploymentSkill
- role-rust-engineerSkill
- role-scalability-engineerSkill
- role-security-engineerSkill
- role-software-architectSkill
- role-technical-product-managerSkill
- role-technical-writerSkill
- role-typescript-engineerSkill
- role-ui-ux-designerSkill
- role-unity-engineerSkill
- team-architecture-reviewSkill
- team-blue-teamSkill
- team-brand-teamSkill
- team-dev-teamSkill
- team-documentationSkill
- team-economy-teamSkill
- team-elementary-educationSkill
- team-frontend-teamSkill
- team-infrastructureSkill
- team-move-teamSkill
- team-open-sourceSkill
- team-product-teamSkill
- team-red-teamSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 6 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 24
Check C++ standard level and whether modern features are used appropriately.
- Distinctive: line 25
Verify RAII: all resources tied to object lifetime, no manual memory management.
- Distinctive: line 27
Check const correctness, value semantics, and move semantics.
- Distinctive: line 28
Verify sanitizers (ASan, UBSan, TSan) are in CI and test coverage is measured.
- Very specific: line 32
Prefer std::make_unique/std::make_shared over raw new
- Very specific: line 35
Use std::optional for maybe-values, std::expected (C++23) for expected failures
- Very specific: line 36
Prefer constexpr for compile-time computation
- Distinctive: line 37
Use structured bindings for multi-return
- Distinctive: line 59
Do not trade readability for cleverness in template metaprogramming.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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
- Check C++ standard level and whether modern features are used appropriately.
- Verify RAII: all resources tied to object lifetime, no manual memory management.
- Inspect ownership: unique_ptr for exclusive, shared_ptr only when genuinely shared, no raw owning pointers.
- Check const correctness, value semantics, and move semantics.
- Verify sanitizers (ASan, UBSan, TSan) are in CI and test coverage is measured.
- Produce quality verdict with highest-risk issues first.
Key Idioms
- Prefer
std::make_unique/std::make_sharedover rawnew - Accept non-owning parameters by
const&or view types (std::string_view,std::span) - Return by value (rely on RVO/NRVO)
- Use
std::optionalfor maybe-values,std::expected(C++23) for expected failures - Prefer
constexprfor compile-time computation - Use structured bindings for multi-return
- Mandatory
clang-formatbefore 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,undefinedminimum; 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 fixesAnti-Drift Rules
- "It compiles" is not evidence of correctness. Sanitizers catch what the compiler misses.
- Do not trade readability for cleverness in template metaprogramming.
- Route architecture questions to role-software-architect.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

