Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Is that skill safe to install?
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
Are you the author of Cpp Patterns?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/karthikrshet-cpp-patterns)
---
name: cpp-patterns
description: "Modern C++ (17/20) patterns: RAII, smart pointers, value semantics, ranges, error handling and build hygiene with CMake."
tags: [cpp]
---
# Cpp Patterns
## When to use
- C++ code
## Procedure
1. Own resources with RAII and unique_ptr
2. Prefer value types and move semantics
3. Use std::span/string_view for non-owning views
4. Handle errors with expected/exceptions consistently
5. Enable warnings, sanitizers and clang-tidy in CMake presets
## Checklist
- [ ] No raw new/delete
- [ ] Warnings as errors in CI
## Anti-patterns
- Manual memory management
- Macros where constexpr works