rust-refactor-helper

Installation
Summary

Safe Rust refactoring with LSP-driven impact analysis and dry-run preview.

  • Supports four refactoring actions: rename symbol, extract function, inline function, and move to module
  • Performs pre-refactor analysis using LSP operations (find references, go to definition, call hierarchy) to identify all affected code locations
  • Generates detailed impact reports showing definition location, all references categorized by file, and potential issues like documentation updates or public API changes
  • Includes dry-run mode to preview all changes before applying them, with safety checks for name conflicts, visibility changes, macro-generated code, and circular dependencies
SKILL.md

Rust Refactor Helper

Perform safe refactoring with comprehensive impact analysis.

Usage

/rust-refactor-helper <action> <target> [--dry-run]

Actions:

  • rename <old> <new> - Rename symbol
  • extract-fn <selection> - Extract to function
  • inline <fn> - Inline function
  • move <symbol> <dest> - Move to module

Examples:

  • /rust-refactor-helper rename parse_config load_config
  • /rust-refactor-helper extract-fn src/main.rs:20-35
Related skills

More from zhanghandong/rust-skills

Installs
721
GitHub Stars
1.1K
First Seen
Jan 22, 2026