memory-safety-patterns
Cross-language patterns for memory safety, covering RAII, ownership, smart pointers, and resource management.
Install
npx skills add https://github.com/wshobson/agents --skill memory-safety-patternsStats
| Total installs | 4,062 |
| Weekly installs | 4.0K |
| GitHub stars | 32.4K |
| First seen | Jan 20, 2026 |
| Source | @wshobson/agents |
Summary
- Covers six core memory bug categories (use-after-free, double-free, leaks, buffer overflow, dangling pointers, data races) with language-specific prevention strategies
- Provides RAII patterns in C++ with destructors, lock guards, and transactions; smart pointer guidance (unique_ptr, shared_ptr, weak_ptr) with custom deleters
- Implements Rust ownership, borrowing, lifetimes, and interior mutability (Cell, RefCell, Rc, Arc) with compile-time safety guarantees
- Includes safe C patterns using goto cleanup, opaque pointers with create/destroy pairs, and GCC cleanup attributes
- Demonstrates bounds checking via containers and spans in C++, and iterators in Rust; thread-safe patterns using atomics, mutexes, and RwLock across languages
Tags
Related skills
| Skill | Installs | vs memory-safety-patterns |
|---|---|---|
| changelog-automation | 4,606 | +544 |
| debugging-strategies | 4,689 | +627 |
| code-review-expert | 4,728 | +666 |
| react-state-management | 4,849 | +787 |
| web-quality-audit | 3,610 | -452 |
FAQ
- How many installs does memory-safety-patterns have?
- memory-safety-patterns has 4,062 total installs and 4.0K installs this week.
- Where is memory-safety-patterns hosted?
- memory-safety-patterns is published by @wshobson/agents at https://github.com/wshobson/agents.
- How many GitHub stars does memory-safety-patterns have?
- memory-safety-patterns has 32.4K GitHub stars.
- When was memory-safety-patterns first indexed?
- OrangeBot.AI first indexed memory-safety-patterns on Jan 20, 2026.
- How do I install memory-safety-patterns?
- Run: npx skills add https://github.com/wshobson/agents --skill memory-safety-patterns