What problem does it solve? Writing unsafe Rust without introducing undefined behavior is difficult: raw pointer dereferences, transmute misuse, data races, and uninitialized memory reads can silently corrupt programs. This Skill provides structured guidance on the five unsafe superpowers, safe abstraction patterns, and Miri-based verification so AI agents and developers produce correct unsafe code. ## Core Features & Use Cases - Unsafe Operation Reference: Covers all five unsafe capabilities (raw pointer dereference, unsafe fn calls, mutable static access, unsafe trait impls, union field access) with risk levels and typical scenarios. - Safe Encapsulation Patterns: Shows how to minimize unsafe scope, write SAFETY comments, and wrap unsafe internals behind safe public APIs, including a full MyVec implementation with alloc/dealloc/grow logic. - UB Detection with Miri: Documents Miri installation, execution, detectable issues (use-after-free, data races, Stacked Borrows violations), and its limitations, plus a 10-item common UB checklist. - Use Case: When implementing a custom data structure or FFI binding in Rust, load this Skill to get correct Pin-based self-referential struct patterns, transmute alternatives (bytemuck, zerocopy), and a review checklist ensuring every unsafe block passes cargo +nightly miri test. ## Quick Start Ask the AI to review or write unsafe Rust code using the rust-unsafe-guide skill, for example to implement a custom Vec with proper SAFETY comments and Miri verification.