m01-ownership
CommunityMaster C++ ownership with move semantics & RAII.
Author13eholder
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Ownership and lifetime decisions in C++ are error-prone; this skill guides proper use of RAII, smart pointers, and non-owning references to prevent common defects.
Core Features & Use Cases
- Guidance on when to transfer ownership vs share ownership, including usage of std::unique_ptr, std::shared_ptr, raw pointers, and references.
- Best practices to avoid common pitfalls such as double frees, use-after-free, and memory leaks through clear lifetime management.
- Real-world scenarios spanning small utilities to large codebases to standardize ownership patterns.
Quick Start
Ask the AI to review a resource ownership scenario and propose the appropriate ownership strategy using RAII and smart pointers.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: m01-ownership Download link: https://github.com/13eholder/Modern-Cpp-Skills/archive/main.zip#m01-ownership Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.