cpp
Skill266 starsChanged 10 months agoApache-2.0View on GitHub
Guidelines for modern C++ development with C++17/20 standards, memory safety, and performance optimization
3 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- mordechai30/cpp_skillsedited, first seen Sep 29, 2026
- nimadorostkar/Claude-Skills-collectiontheir own version, first seen Jul 14, 2026
- margelo/react-native-skillstheir own version, first seen Jun 5, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- mordechai30/cpp_skills★ 067% same
Wrote their own version · 2
- margelo/react-native-skills★ 173same name
- nimadorostkar/Claude-Skills-collection★ 28same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository264 other files it gives its agents.
- accessibility-a11ySkill
- alpine-jsSkill
- analytics-data-analysisSkill
- android-developmentSkill
- angular-developmentSkill
- angularSkill
- anime-jsSkill
- anthropic-claude-developmentSkill
- api-developmentSkill
- apollo-graphqlSkill
- aspnet-coreSkill
- astroSkill
- auth0-authenticationSkill
- autogen-developmentSkill
- automl-hyperparameter-optimizationSkill
- aws-developmentSkill
- azureSkill
- backend-developmentSkill
- bash-scriptingSkill
- beautifulsoup-parsingSkill
- bitbucket-workflowSkill
- blazorSkill
- blender-python-addonSkill
- blockchainSkill
- bootstrapSkill
- business-central-developmentSkill
- cheerio-parsingSkill
- chrome-extension-developmentSkill
- ci-cd-best-practicesSkill
- clean-architectureSkill
- clean-codeSkill
- clerk-authenticationSkill
- cloudflare-developmentSkill
- computer-vision-opencvSkill
- convexSkill
- c-sharpSkill
- cssSkill
- cypressSkill
- data-analysis-jupyterSkill
- data-analystSkill
- data-jupyter-pythonSkill
- deep-learning-pythonSkill
- deep-learning-pytorchSkill
- deep-learningSkill
- deno-typescriptSkill
- design-systemsSkill
- devopsSkill
- django-pythonSkill
- django-rest-api-developmentSkill
- dockerSkill
- dotnetSkill
- drizzle-ormSkill
- drupal-developmentSkill
- elasticsearch-best-practicesSkill
- electron-developmentSkill
- elixirSkill
- embedded-stm32Skill
- esbuild-bundlerSkill
- ethereumSkill
- expo-react-native-javascript-best-practicesSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
58 rules. 0 are common, 31 are distinctive, and 27 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
31
Distinctive
This author's own choices. Worth a look.
27
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Write clean, modern C++ code following C++17/20 standards
- Distinctive: line 13
Use meaningful variable and function names
- Distinctive: line 14
Follow the Single Responsibility Principle
- Distinctive: line 15
Prefer composition over inheritance
- Distinctive: line 16
Keep functions small and focused
- Distinctive: line 20
Use PascalCase for classes and structs
- Distinctive: line 21
Use camelCase for functions, variables, and methods
- Very specific: line 22
Use SCREAMING_SNAKE_CASE for constants and macros
- Distinctive: line 23
Use snake_case for namespaces
- Very specific: line 29
Use std::unique_ptr for exclusive ownership
- Very specific: line 30
Use std::shared_ptr only when shared ownership is required
- Very specific: line 31
Use std::weak_ptr to break circular references
- Distinctive: line 32
Avoid raw owning pointers
- Distinctive: line 35
Use RAII for all resource management
- Distinctive: line 37
Ensure exception safety through RAII
- Distinctive: line 38
Use scope guards for cleanup operations
- Distinctive: line 41
Prefer stack allocation over heap allocation
- Very specific: line 42
Use std::make_unique and std::make_shared
- Very specific: line 43
Avoid new and delete in application code
- Distinctive: line 44
Use containers instead of raw arrays
- Distinctive: line 49
Use structured bindings for tuple unpacking
- Very specific: line 50
Use std::optional for values that may not exist
- Very specific: line 51
Use std::variant for type-safe unions
- Very specific: line 52
Use if constexpr for compile-time conditionals
- Very specific: line 53
Use std::string_view for non-owning string references
- Distinctive: line 56
Use concepts for template constraints
- Distinctive: line 57
Use ranges for cleaner algorithms
- Very specific: line 58
Use std::span for non-owning array views
- Distinctive: line 59
Use coroutines for asynchronous operations
- Distinctive: line 60
Use modules for faster compilation (when supported)
- Distinctive: line 64
Use exceptions for error handling
- Very specific: line 66
Use noexcept for functions that don't throw
- Very specific: line 72
Use const and constexpr liberally
- Very specific: line 73
Prefer move semantics with std::move
- Very specific: line 74
Use perfect forwarding with std::forward
- Very specific: line 77
Use inline for small frequently-called functions
- Very specific: line 82
Use std::array instead of C-style arrays
- Very specific: line 83
Use std::vector with bounds checking
- Very specific: line 84
Prefer std::string over C-style strings
- Very specific: line 85
Use std::span for array views
- Very specific: line 88
Avoid C-style casts; use static_cast, dynamic_cast, etc.
- Very specific: line 89
Use enum class instead of plain enums
- Very specific: line 90
Use nullptr instead of NULL
- Very specific: line 95
Use std::thread and std::jthread for threading
- Very specific: line 96
Use std::mutex and std::lock_guard for synchronization
- Very specific: line 97
Use std::atomic for lock-free operations
- Very specific: line 98
Prefer std::async for simple async operations
- Distinctive: line 99
Use condition variables for thread coordination
- Distinctive: line 103
Write unit tests with Google Test or Catch2
- Distinctive: line 104
Use mocking frameworks like Google Mock
- Distinctive: line 105
Test edge cases and error conditions
- Distinctive: line 106
Use sanitizers (ASan, UBSan, TSan) during testing
- Distinctive: line 111
Use Doxygen-style comments for documentation
- Distinctive: line 112
Document public APIs thoroughly
- Distinctive: line 114
Keep documentation up to date with code changes
- Distinctive: line 115
Document thread safety requirements
- Distinctive: line 119
Use CMake for cross-platform builds
- Distinctive: line 121
Use package managers (vcpkg, Conan) for dependencies
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
C++ Development Guidelines
You are an expert in modern C++ development with deep knowledge of C++17/20 standards, memory management, and high-performance programming.
Code Style and Structure
- Write clean, modern C++ code following C++17/20 standards
- Use meaningful variable and function names
- Follow the Single Responsibility Principle
- Prefer composition over inheritance
- Keep functions small and focused
Naming Conventions
- Use PascalCase for classes and structs
- Use camelCase for functions, variables, and methods
- Use SCREAMING_SNAKE_CASE for constants and macros
- Use snake_case for namespaces
- Prefix member variables with
m_or use trailing underscore
Memory Management
Smart Pointers
- Use
std::unique_ptrfor exclusive ownership - Use
std::shared_ptronly when shared ownership is required - Use
std::weak_ptrto break circular references - Avoid raw owning pointers
RAII (Resource Acquisition Is Initialization)
- Use RAII for all resource management
- Wrap resources in classes with proper destructors
- Ensure exception safety through RAII
- Use scope guards for cleanup operations
Best Practices
- Prefer stack allocation over heap allocation
- Use
std::make_uniqueandstd::make_shared - Avoid
newanddeletein application code - Use containers instead of raw arrays
Modern C++ Features
C++17 Features
- Use structured bindings for tuple unpacking
- Use
std::optionalfor values that may not exist - Use
std::variantfor type-safe unions - Use
if constexprfor compile-time conditionals - Use
std::string_viewfor non-owning string references
C++20 Features
- Use concepts for template constraints
- Use ranges for cleaner algorithms
- Use
std::spanfor non-owning array views - Use coroutines for asynchronous operations
- Use modules for faster compilation (when supported)
Error Handling
- Use exceptions for error handling
- Define custom exception types for domain-specific errors
- Use
noexceptfor functions that don't throw - Catch exceptions by const reference
- Provide strong exception guarantees where possible
Performance
- Use
constandconstexprliberally - Prefer move semantics with
std::move - Use perfect forwarding with
std::forward - Avoid unnecessary copies
- Profile before optimizing
- Use
inlinefor small frequently-called functions
Security
Buffer Safety
- Use
std::arrayinstead of C-style arrays - Use
std::vectorwith bounds checking - Prefer
std::stringover C-style strings - Use
std::spanfor array views
Type Safety
- Avoid C-style casts; use
static_cast,dynamic_cast, etc. - Use
enum classinstead of plain enums - Use
nullptrinstead ofNULL - Enable compiler warnings and treat them as errors
Concurrency
- Use
std::threadandstd::jthreadfor threading - Use
std::mutexandstd::lock_guardfor synchronization - Use
std::atomicfor lock-free operations - Prefer
std::asyncfor simple async operations - Use condition variables for thread coordination
Testing
- Write unit tests with Google Test or Catch2
- Use mocking frameworks like Google Mock
- Test edge cases and error conditions
- Use sanitizers (ASan, UBSan, TSan) during testing
- Implement continuous integration testing
Documentation
- Use Doxygen-style comments for documentation
- Document public APIs thoroughly
- Include usage examples in documentation
- Keep documentation up to date with code changes
- Document thread safety requirements
Build System
- Use CMake for cross-platform builds
- Organize code into logical modules
- Use package managers (vcpkg, Conan) for dependencies
- Enable compiler warnings and static analysis
- Configure proper debug and release builds
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.

