actionbook avatar

Rust Refactor Helper

This handles the tedious part of Rust refactoring by running LSP analysis before you touch any code. It finds all references, checks for name conflicts, and shows you exactly what will change across your codebase when you rename symbols, extract functions, inline code, or move things between modules. The dry run mode is the key feature here. You get a table of every file that will be touched, warnings about public API changes or documentation that might break, and a circular dependency check before committing to anything. It's basically a safety net for refactors that would otherwise require grep, manual verification, and crossing your fingers that you didn't miss an import somewhere.

skills.sh installs
3.6K
GitHub stars
1.6K
last updated
Aug 21, 2026

Install

$ npx -y skills add actionbook/rust-skills --skill rust-refactor-helper --agent claude-code

Installs into .claude/skills of the current project.

Files

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
  • /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

Sponsors

Details

Repository
github.com/actionbook/rust-skills
Categories
Code Review & Quality, Rust
First seen
May 16, 2026

More from actionbook/rust-skills

All 38
1tradermonty avatardata-quality-checkertradermonty/claude-trading-skillsValidate data quality in market analysis documents and blog articles before publication. Use when checking for price scale inconsistencies (ETF vs futures), ins3.6Kskills.sh installs
2tradermonty avatarkanchi-dividend-review-monitortradermonty/claude-trading-skillsMonitor dividend portfolios with Kanchi-style forced-review triggers (T1-T5) and convert anomalies into OK/WARN/REVIEW states without auto-selling. Use when use3.4Kskills.sh installs
3anthropics avatarbrand-reviewanthropics/knowledge-work-pluginsReview content against your brand voice, style guide, and messaging pillars, flagging deviations by severity with specific before/after fixes. Use when checking3.3Kskills.sh installs
4pytorch avatarpr-reviewpytorch/pytorchReview PyTorch pull requests for code quality, test coverage, security, and backward compatibility. Use when reviewing PRs, when asked to review code changes, o3.3Kskills.sh installs
5nicholasspisak avatarsecond-brain-lintnicholasspisak/second-brainHealth-check the wiki for contradictions, orphan pages, stale claims, and missing cross-references. Use when the user says "audit", "health check", "lint", "fin2.5Kskills.sh installs
6bytedance avatarsystematic-literature-reviewbytedance/deer-flowUse this skill when the user wants a systematic literature review, survey, or synthesis across multiple academic papers on a topic. Also covers annotated biblio2.5Kskills.sh installs