
Rust Refactor Helper
Safe Rust refactoring that scans LSP references and previews impact before rename, extract, inline, or move.
- skills.sh installs
- 3.7K
- GitHub stars
- 1.6K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers four actions: rename a symbol, extract a function, inline a function, and move a symbol to another module
- Runs LSP
findReferences,hover, andincomingCallsbefore edits, and groups every affected site by file - Enforces a
--dry-runpreview showing conflicts, macro-generated uses, and re-exports before any Edit is applied - Pairs with rust-code-navigator, rust-call-graph, rust-symbol-analyzer, and rust-trait-explorer for navigation and structure
Install
$ npx -y skills add actionbook/rust-skills --skill rust-refactor-helper -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Rust Refactor Helper
Perform safe refactoring with comprehensive impact analysis.
Usage
/rust-refactor-helper <action> <target> [--dry-run]
Actions:
rename <old> <new>- Rename symbolextract-fn <selection>- Extract to functioninline <fn>- Inline functionmove <symbol> <dest>- Move to module
Examples:
/rust-refactor-helper rename parse_config load_config/rust-refactor-helper extract-fn src/main.rs:20-35/rust-refactor-helper move UserService src/services/
LSP Operations Used
Pre-Refactor Analysis
# Find all references before renaming
LSP(
operation: "findReferences",
filePath: "src/lib.rs",
line: 25,
character: 8
)
# Get symbol info
LSP(
operation: "hover",
filePath: "src/lib.rs",
line: 25,
character: 8
)
# Check call hierarchy for move operations
LSP(
operation: "incomingCalls",
filePath: "src/lib.rs",
line: 25,
character: 8
)
Refactoring Workflows
1. Rename Symbol
Details
- Repository
- github.com/actionbook/rust-skills
- Categories
- Rust, Code Review & Quality
- First seen
- May 16, 2026
More from actionbook/rust-skills
All 38- M03 Mutability3.7K
- M12 Lifecycle3.6K
- M09 Domain3.6K
- M14 Mental Model3.6K
- M13 Domain Error3.6K
- M11 Ecosystem3.6K
- Unsafe Checker3.6K
- Rust Code Navigator3.6K
- Rust Trait Explorer3.5K
- Rust Call Graph3.5K
- Rust Symbol Analyzer3.5K
- Domain Web3.5K
- Domain Cli3.5K
- Rust Learner3.4K
- Rust Skill Creator3.4K
- Rust Deps Visualizer3.3K
- Meta Cognition Parallel3.3K
- Rust Daily3.3K
- Domain Embedded3.2K
- Domain Cloud Native3.2K
- Domain Fintech3.1K
- Domain Ml3.1K
- Domain Iot3K
- Rust Router3K
Similar to Rust Refactor Helper
More Rust
rust-code-navigatoractionbook/rust-skills3.6K installsNavigate Rust codebases with LSP to jump to definitions, find references, and inspect types.
rust-symbol-analyzeractionbook/rust-skills3.5K installsStructured Rust project analysis that lists modules, structs, traits, functions, and enums from LSP symbols.
Refactor Safelytirth8205/code-review-graph345 installsPlans refactors from the dependency graph and applies renames only after previewing the edit list.
rust-refactorpproenca/dot-skills331 installsDecision frameworks and six transformation patterns for simplifying, splitting, and migrating working Rust code.
lsp-code-analysislsp-client/lsp-skill958 installsSemantic code navigation, symbol search, refactoring previews, and file outlines for exploring unfamiliar codebases via LSP.
gitnexus-refactoringabhigyanpatwari/gitnexus1.8K installsSemantic, plan-gated rename and refactoring workflow that binds repository identity before any file writes.