This one walks you through running AddressSanitizer, ThreadSanitizer, and Miri on Rust code to catch memory safety bugs and undefined behavior that the compiler misses. You'll need nightly for most of it, plus the -Zbuild-std flag to instrument the standard library properly. The Miri coverage is especially solid: it explains how to detect dangling pointers, invalid enum discriminants, uninitialized reads, and Stacked Borrows violations with concrete code examples. The sanitizer output interpretation section is genuinely helpful when you're staring at a wall of ASan stack traces. If you write unsafe Rust or maintain FFI bindings, you'll want this in your rotation before merging.

skills.sh installs
604
GitHub stars
279
last updated
Aug 21, 2026

Install

$ npx -y skills add mohitmishra786/low-level-dev-skills --skill rust-sanitizers-miri --agent claude-code

Installs into .claude/skills of the current project.

Files

Rust Sanitizers and Miri

Purpose

Guide agents through runtime safety validation for Rust: ASan/TSan/MSan/UBSan via RUSTFLAGS, Miri for compile-time UB detection in unsafe code, and interpreting sanitizer reports.

Triggers

  • "How do I run AddressSanitizer on Rust code?"
  • "How do I use Miri to check my unsafe Rust?"
  • "How do I run ThreadSanitizer on a Rust program?"
  • "My unsafe Rust might have UB — how do I detect it?"
  • "How do I interpret a Rust ASan report?"
  • "Can I run Rust sanitizers on stable?"

Workflow

1. Sanitizers in Rust (nightly required)

Rust sanitizers require nightly and a compatible platform:

# Install nightly
rustup toolchain install nightly
rustup component add rust-src --toolchain nightly

# AddressSanitizer (Linux, macOS)
RUSTFLAGS="-Z sanitizer=address" \
    cargo +nightly test -Zbuild-std \
    --target x86_64-unknown-linux-gnu

# ThreadSanitizer (Linux)
RUSTFLAGS="-Z sanitizer=thread" \
    cargo +nightly test -Zbuild-std \
    --target x86_64-unknown-linux-gnu

Sponsors

Details

Repository
github.com/mohitmishra786/low-level-dev-skills
Category
Rust
First seen
Jun 3, 2026

More from mohitmishra786/low-level-dev-skills

All 54

Recommended

More Rust
1manutej avatarrust-systems-programmingmanutej/luxor-claude-marketplaceComplete guide for Rust systems programming including ownership, borrowing, concurrency, async programming, unsafe code, and performance optimization488skills.sh installs
2zzci avatarpma-rustzzci/skillsProduction-grade Rust acceptance baseline for PMA-managed Rust services and CLIs. Use with /pma when creating, reviewing, or upgrading Rust workspaces, Axum/Tok372skills.sh installs
3dchuk avatarintegrating-tauri-rust-frontendsdchuk/claude-code-tauri-skillsGuides the user through integrating Rust-based WASM frontend frameworks with Tauri v2, covering Leptos and Trunk setup, WASM compilation configuration, Cargo.to248skills.sh installs
4actionbook avatarunsafe-checkeractionbook/rust-skillsCRITICAL: Use for unsafe Rust code review and FFI. Triggers on: unsafe, raw pointer, FFI, extern, transmute, *mut, *const, union, #[repr(C)], libc, std::ffi, Ma3.5Kskills.sh installs
5zhanghandong avatarunsafe-checkerzhanghandong/rust-skillsunsafe checker726skills.sh installs
6trailofbits avatarcargo-fuzztrailofbits/skillscargo-fuzz is the de facto fuzzing tool for Rust projects using Cargo. Use for fuzzing Rust code with libFuzzer backend.5.7Kskills.sh installs