From systems-programming
Guides memory-safe programming with RAII, ownership, smart pointers, and resource management across Rust, C++, and C. Useful for writing safe systems code or preventing memory bugs.
How this skill is triggered — by the user, by Claude, or both
Slash command
/systems-programming:memory-safety-patternsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Cross-language patterns for memory-safe programming including RAII, ownership, smart pointers, and resource management.
Cross-language patterns for memory-safe programming including RAII, ownership, smart pointers, and resource management.
| Bug Type | Description | Prevention |
|---|---|---|
| Use-after-free | Access freed memory | Ownership, RAII |
| Double-free | Free same memory twice | Smart pointers |
| Memory leak | Never free memory | RAII, GC |
| Buffer overflow | Write past buffer end | Bounds checking |
| Dangling pointer | Pointer to freed memory | Lifetime tracking |
| Data race | Concurrent unsynchronized access | Ownership, Sync |
Manual (C) → Smart Pointers (C++) → Ownership (Rust) → GC (Go, Java)
Less safe More safe
More control Less control
Detailed pattern documentation lives in references/details.md. Read that file when the navigation tier above is insufficient.
unsafe carelessly - In Rust, minimize it# AddressSanitizer (Clang/GCC)
clang++ -fsanitize=address -g source.cpp
# Valgrind
valgrind --leak-check=full ./program
# Rust Miri (undefined behavior detector)
cargo +nightly miri run
# ThreadSanitizer
clang++ -fsanitize=thread -g source.cpp
npx claudepluginhub p/dxas90-systems-programming-plugins-systems-programming4plugins reuse this skill
First indexed Jun 3, 2026
Guides memory-safe programming with RAII, ownership, smart pointers, and resource management across Rust, C++, and C. Useful for writing safe systems code or preventing memory bugs.
Implements memory-safe programming with RAII, ownership, smart pointers, and resource management across Rust, C++, and C. Use when writing safe systems code or preventing memory bugs.
Guides memory-safe programming across languages with RAII, ownership, smart pointers, and resource management patterns.