coding/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.fmt, clippy, test, docs) is part of the definition of done.cargo fmt, cargo clippy, and cargo test before review.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)clone() used only to “make borrow checker errors go away”unwrap/expect in operational pathsconnect_with_timeout(...) -> io::Result<TcpStream> can use std::net normally and a Windows FFI helper only in a constrained build mode.windows-sys features, run a real target build; cargo check can pass before the linker sees missing imports or feature flags.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 hygienedata-ai
Scoped routing: Linux operator; hosts, sessions, users, services, packages, logs, containers, SSH, network paths, privilege evidence.
development
Offensive methodology for ICS/OT/SCADA environments in authorized industrial penetration testing and red team operations. Use when assessing PLCs, RTUs, HMIs, engineering workstations, historians, or field devices running Modbus, DNP3, EtherNet/IP, S7comm/S7+, Profinet, IEC 60870-5-104, BACnet, or OPC-UA. Covers passive OT network enumeration, protocol-level device interrogation, PLC coil/register read-write attacks, HMI session exploitation, historian and engineering workstation compromise, and safe escalation rules for critical infrastructure scope. Does not cover: general IT network exploitation (network-technique), physical hardware interfaces UART/JTAG/SPI (hardware-technique), wireless sensor network attacks (wireless-technique), RF/SDR signal analysis (hardware-ctf or wireless-technique), or CTF-framed ICS lab tasks (ics-ctf).
tools
Offensive methodology for authorized game security assessments, game client security research, and game-adjacent penetration testing in real-world engagements. Use when assessing game clients for cheating vulnerabilities, testing anti-cheat effectiveness, auditing game server protocols for score manipulation or economic fraud, reverse engineering game DRM or license validation, analyzing game save file protection, or assessing game mod/plugin security. Covers: process memory scanning and manipulation (Cheat Engine methodology), game binary reversing for license and DRM bypass, game network protocol analysis and packet replay, anti-cheat mechanism analysis, save file format reversing and tampering, speed hack and value injection techniques. Does NOT cover: CTF game challenges (game-ctf), game engine source code auditing (web-exploit-technique or vuln-search-technique for the backend), or general binary exploitation (pwn-ctf or reversing-technique).
development
Auth assessment: hardware/embedded methodology; UART/JTAG/SWD/SPI/I2C, firmware extraction, boot/debug paths, embedded OS evidence.