What problem does it solve? Rust codebases accumulate structural debt—long functions, primitive obsession, scattered error handling, and misplaced responsibilities—that makes future changes risky and slow. This Skill reviews Rust code against Fowler's refactoring principles adapted to Rust idioms, validates each candidate with concrete evidence, and produces a prioritized, behavior-preserving refactoring plan instead of style-driven nitpicks. ## Core Features & Use Cases - Evidence-based smell detection: Combines a heuristic Python scanner, compiler/Clippy signals, Git change-history analysis, and semantic design review to find real maintenance costs rather than metric violations. - Rust-adapted Fowler catalog: Maps classic refactorings to idiomatic Rust forms—enums over dynamic dispatch, newtypes for validated primitives, typed Result<T, E> errors, and split-phase type-driven design. - Small-step migration plans: Every accepted finding includes a Fowler move name, target shape, independently verifiable steps, compatibility risks (semver, unsafe, FFI, async), and rollback boundaries. - Use Case: Ask for a refactoring assessment of a Rust module before a feature change; receive a prioritized report with exact file/line evidence, impact/confidence/risk labels, and an expand-migrate-contract sequence for any public API changes. ## Quick Start Ask the agent to review a Rust module or working diff for refactoring opportunities and produce a prioritized behavior-preserving plan without editing code.