rmc-rename-symbol

Preview rust-analyzer symbol rename edits and file moves without writing.

29|5|Updated Nov 24, 2025
One-click install
npx skills add https://github.com/molaco/rust-code-mcp --skill rmc-rename-symbol
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rmc-rename-symbol
Source: https://github.com/molaco/rust-code-mcp/tree/main/skills/rmc-rename-symbol
Command: npx skills add https://github.com/molaco/rust-code-mcp --skill rmc-rename-symbol

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents risky Rust refactors by letting you preview the exact set of byte-precise edits and required file moves before applying a symbol rename.

Core Features & Use Cases

  • Dry-run rename preview: Produces the precise edits and file_moves rust-analyzer would apply, without modifying disk.
  • Refactor legality probe: Tells you whether the rename is possible and why it might be refused (e.g., conflicts, keyword/non-identifier tokens, foreign/no-source boundaries, macro limitations).
  • Exact reference inventory for one symbol: Helps you enumerate all rename-target references at definition precision (excluding doc/comment name occurrences).

Quick Start

Ask for a rename preview by providing the symbol’s exact short name and the new name, along with the Cargo project root directory, to get the exact edit set and any required file moves.

Frequently Asked Questions about rmc-rename-symbol

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

FAQPage Schema
How do I preview a Rust symbol rename before applying it?

Preview a Rust symbol rename by providing the exact short name, new name, and Cargo project root to generate the precise byte-level edits and file moves without modifying disk.

Can I check if a Rust rename refactor is legal before making changes?

Yes, a refactor legality probe determines if a Rust rename is possible and returns a reason for refusal, identifying conflicts, keyword tokens, foreign boundaries, or macro limitations.

How can I enumerate all exact references for a Rust symbol rename?

Generate an exact reference inventory for one Rust symbol to enumerate all rename-target references at definition precision, deliberately excluding doc and comment name occurrences.

Does rust-analyzer preview file moves required for module renames?

Yes, the rename preview returns required file_moves alongside exact reference edits, allowing you to analyze module rename impact and determine whether a rename crosses crate boundaries.

Why would a Rust rename refactor be refused?

A Rust rename refactor is refused when it encounters naming conflicts, non-identifier tokens, foreign or no-source boundaries, and macro limitations, returning a specific reason without applying changes.