Rust Sanitizers Miri
Analyzes Rust code using Miri sanitizers to detect undefined behavior, memory errors, and data races at runtime.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add rust-sanitizers-miri npx -- -y @trustedskills/rust-sanitizers-miri
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"rust-sanitizers-miri": {
"command": "npx",
"args": [
"-y",
"@trustedskills/rust-sanitizers-miri"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
This skill leverages Rust's sanitizers and Miri to detect undefined behavior in your code. It helps identify memory errors like use-after-free, buffer overflows, and data races during testing or development. Miri is a lightweight interpreter that executes Rust code and detects common issues at runtime without requiring full compilation.
When to use it
- Debugging complex memory bugs: When traditional debugging methods fail to pinpoint the root cause of crashes or unexpected behavior.
- Improving code safety: As part of a continuous integration pipeline to proactively catch potential errors before deployment.
- Analyzing unstable crates: When working with third-party libraries where you suspect memory unsafety issues.
- Learning Rust's memory model: To gain a deeper understanding of how Rust manages memory and identify common pitfalls.
Key capabilities
- Utilizes AddressSanitizer (ASan) for detecting memory errors.
- Employs MemorySanitizer (MSan) to find uninitialized reads.
- Integrates with Miri, a lightweight interpreter for runtime checks.
- Provides detailed error reports and stack traces.
Example prompts
- "Run my Rust project using ASan and report any memory errors."
- "Analyze this code snippet with Miri to check for undefined behavior."
- "Can you help me understand the Miri output for this failing test?"
Tips & gotchas
- Requires a Rust development environment. Sanitizers significantly increase compile times, so use them primarily during testing or debugging.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🌐 Community
Passed automated security scans.