What problem does it solve?
This Skill helps developers ensure Mojo code adheres to memory safety rules, including ownership, borrowing, and lifetime management, preventing common memory-related bugs like use-after-move or dangling references. It automates memory safety checks, reducing manual debugging.
Core Features & Use Cases:
- Ownership Guidance: Explains and validates the use of
owned, borrowed, and inout parameters for safe memory handling.
- Common Issue Detection: Highlights patterns that lead to use-after-move, lifetime issues, and mutable aliasing, guiding developers to robust solutions.
- Use Case: During a code review of a performance-critical Mojo module, use this skill to verify memory safety. It will help you identify potential use-after-move errors or dangling references, ensuring robust and bug-free code.
Quick Start:
Use the mojo-memory-check skill to review the Mojo code in 'src/my_module.mojo' for memory safety issues.