rust-refactor-helper

Refactor Rust code with LSP-assisted impact analysis for rename, extract, inline, and move actions.

3|Updated Mar 22, 2026
One-click install
npx skills add https://github.com/0xharryriddle/codex-field-kit --skill rust-refactor-helper-0xharryriddle
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rust-refactor-helper
Source: https://github.com/0xharryriddle/codex-field-kit/tree/main/archive/upstream/chasebuild-agent-skills/rust/skills/rust-refactor-helper
Command: npx skills add https://github.com/0xharryriddle/codex-field-kit --skill rust-refactor-helper-0xharryriddle

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps safely refactor Rust code by performing LSP-assisted impact analysis, reducing risk when renaming symbols, extracting functions, or moving code across modules.

Core Features & Use Cases

  • Safe refactoring with pre-change impact analysis
  • Actions supported: rename, extract-fn, inline, move
  • Real-world use: large Rust codebases needing safe reorganization

Quick Start

Run the rust-refactor-helper on a target file to analyze and apply safe refactor changes.

Frequently Asked Questions about rust-refactor-helper

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

FAQPage Schema
How do I safely rename symbols and move code across modules in a large Rust codebase?

To safely rename Rust symbols or move code across modules, use LSP-assisted impact analysis to evaluate references and dependencies before applying edits. This ensures reliable changes by calculating structural constraints during the refactoring process.

What is LSP-assisted impact analysis for Rust refactoring?

LSP-assisted impact analysis for Rust refactoring evaluates references and module dependencies before modifying code. It uses the Language Server Protocol to calculate structural constraints, ensuring safe execution of actions like renaming symbols, extracting functions, or inlining code.

How do I extract functions or inline code in Rust without breaking dependencies?

Extracting functions or inlining Rust code without breaking dependencies requires pre-change impact analysis. By using LSP alongside tools like Grep and Glob to map references, you can enforce structural constraints and apply edits safely.

Can I use rust-refactor-helper on unstable or incomplete Rust project structures?

Rust refactoring with LSP-assisted impact analysis requires a stable project structure to produce reliable changes. Unstable or incomplete structures prevent accurate dependency analysis, meaning you should establish structural stability before attempting actions like renaming or moving code.

What's the best way to reorganize a large Rust codebase safely?

The best way to reorganize a large Rust codebase safely is using LSP-assisted impact analysis to guide actions like move and rename. This method enforces allowed tools and dependency tracking to ensure references are considered before applying edits.

What limitations exist when refactoring Rust code with LSP and impact analysis?

Limitations of Rust refactoring with LSP include the strict requirement for a stable project structure and reliance on allowed tools like Read, Glob, Grep, and Edit. Without structural stability, dependency analysis cannot produce reliable code changes.