refactor-rust

Identify Rust code smells and generate a prioritized refactoring plan.

5|Updated Dec 4, 2024
One-click install
npx skills add https://github.com/mimul/axum-rusty --skill refactor-rust-mimul
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactor-rust
Source: https://github.com/mimul/axum-rusty/tree/main/.claude/skills/refactor-rust
Command: npx skills add https://github.com/mimul/axum-rusty --skill refactor-rust-mimul

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The Refactor Rust skill identifies code smells and domain misalignments in a Rust codebase and plans safe, incremental refactors that preserve behavior.

Core Features & Use Cases

  • Analyze Rust code using the REFACTOR_RUST.md catalog (R-R-01 to R-R-08) to surface domain-driven improvements.
  • Propose Before/After refactor plans with concrete code changes and validation steps.
  • Generate an actionable workplan, including scope, risk, and verification steps, ready for human approval.

Quick Start

Run the /refactor-rust command on a Rust project to generate a prioritized plan and apply changes only after human approval.

Frequently Asked Questions about refactor-rust

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I identify code smells and plan refactoring in a Rust codebase?

Rust refactoring analyzes code using the REFACTOR_RUST.md catalog to identify domain misalignments and code smells, then generates a prioritized workplan with Before/After proposals and validation steps for safe, incremental changes.

What is domain-driven refactoring and how does it apply to Rust projects?

Domain-driven refactoring aligns Rust code structures with business domains by surfacing misalignments and proposing structural changes. It enforces safety, tests, and security considerations while negotiating human approval before applying any changes to the codebase.

How do I safely apply incremental refactors to Rust code without breaking behavior?

To safely apply incremental refactors, the tool generates a workplan detailing scope, risk, and verification steps. It enforces test and security validations and requires human approval before executing any proposed code changes to preserve behavior.

Does Rust refactoring require a specific catalog or structure to analyze code?

Rust refactoring applies across projects employing the REFACTOR_RUST.md catalog, specifically rules R-R-01 through R-R-08. This catalog standardizes how code smells and domain misalignments are identified and prioritized for improvement.

Can I review proposed Rust code changes before the refactoring plan is executed?

Yes, the refactoring process negotiates human approval before applying changes. It outputs concrete Before/After refactor proposals and a prioritized workplan detailing scope, risk, and verification steps, ensuring you maintain full control over code modifications.