This Claude skill provides a comprehensive and systematic workflow for diagnosing and resolving Rust programming errors. It covers the entire debugging lifecycle, from fixing complex compilation and borrow checker issues to troubleshooting runtime panics and logic errors using industry-standard tools like Cargo, rust-lldb, and Valgrind.
Use Cases
Resolving Rust compilation errors: Efficiently diagnose and fix common compiler issues such as borrow checker conflicts (E0502), trait implementation errors (E0277), and ownership violations (E0382).
Diagnosing failed tests: Identify failing test cases in Rust suites, analyze detailed output using non-capture modes, and resolve issues related to parallel execution or assertion failures.
Troubleshooting runtime panics: Utilize RUST_BACKTRACE and debuggers like rust-lldb to pinpoint the root cause of crashes, such as 'unwrap()' on None values or array index out of bounds.
Logic and performance optimization: Implement structured logging and tracing to inspect program state and use tools like Valgrind or Miri to detect memory leaks and undefined behavior.
name
Debugging and Troubleshooting
description
Systematic error diagnosis and debugging workflow for Rust code. Use when code isn't working, tests fail, or runtime errors occur.