programming/rust-patterns/SKILL.md
Idiomatic Rust patterns and best practices for readable, safe, maintainable Rust: ownership, borrowing, API design, enums/traits, error handling, iterators, module layout, and tooling. Use when writing or reviewing `.rs` code, refactoring crates, porting non-idiomatic code into Rust, or designing Rust APIs.
npx skillsauth add aeondave/malskill rust-patternsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill is for day-to-day idiomatic Rust: clear ownership, small APIs, and code that feels native to the language instead of a direct port from somewhere else.
If the task is primarily profiling/benchmarking, use rust-performance. If the task is primarily test design or test repair, use rust-testing.
.rs modules, libraries, CLIs, or servicesResult for fallible work; reserve panic!, unwrap, and expect for tests or truly impossible states.cargo fmt and cargo clippy; style should not be negotiated by hand.clone() used only to silence the borrow checker unless the clone is cheap and intentional&str, &[T], &Path, impl AsRef<Path>) instead of forcing ownership?; production code does not rely on stray unwrappub, pub(crate), private helpers, selective pub use)Load on demand:
references/ownership-and-borrowing.md — use when signatures, lifetimes, moves, or borrow-checker friction are centralreferences/api-design.md — use when shaping public types, traits, builders, and module boundariesreferences/errors-and-results.md — use when designing recoverable errors or cleaning up panic-prone codereferences/collections-and-iterators.md — use when choosing collections or refactoring loops into clearer iterator codereferences/tooling-and-docs.md — use when reviewing formatting, clippy, rustdoc, features, and crate hygienedevelopment
White-box auditing methodology for AI-generated ('vibe-coded') applications. Focuses on modern stack misconfigurations (Supabase, Next.js, Vercel).
development
Hybrid AI/Deterministic SAST methodology for discovering zero-day vulnerabilities in source code. Orchestrates structural search with AI-driven data flow and sink validation.
development
Auth assessment: hardware/embedded methodology; UART/JTAG/SWD/SPI/I2C, firmware extraction, boot/debug paths, embedded OS evidence.
devops
Container methodology: Identifying containerization limits, Docker/K8s misconfigurations, and executing escapes to the host node.