safe-refactor

Rename symbols workspace-wide with reference analysis and structural validation.

3|Updated May 29, 2026
One-click install
npx skills add https://github.com/anortham/miller --skill safe-refactor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: safe-refactor
Source: https://github.com/anortham/miller/tree/main/.claude/skills/safe-refactor
Command: npx skills add https://github.com/anortham/miller --skill safe-refactor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill performs safe code refactoring using workspace-wide symbol renaming and rigorous impact analysis to prevent breaking changes.

Core Features & Use Cases

  • Workspace-wide rename_symbol with dry-run previews
  • fast_refs for impact analysis
  • get_symbols to validate structure before/after edits

Quick Start

Rename a symbol using rename_symbol after verifying references with fast_refs.

Frequently Asked Questions about safe-refactor

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

FAQPage Schema
How do I safely rename a symbol across my entire codebase?

Safe refactoring with workspace-wide rename_symbol performs cross-reference checks to identify all occurrences before applying changes. Use dry-run previews to validate the impact across multi-file projects before committing edits, preventing breaking changes from incomplete renames.

How can I analyze the impact of renaming or refactoring code before making changes?

Impact analysis via fast_refs scans your workspace to locate all references to a symbol, showing exactly what would be affected by a rename or modification. Combined with dry-run previews, this lets you verify the scope and prevent unintended side effects.

What's the best way to validate code structure before and after refactoring?

Structural validation using get_symbols extracts and verifies your codebase's symbol structure before and after edits. This AST-aware approach detects collision risks and ensures consistency across multi-file projects, catching structural issues before they propagate.

Can I verify that my refactoring changes don't break anything?

Post-change verification runs available tests after edits complete, confirming that your refactoring preserves functionality. Combined with collision detection and reference analysis, this ensures safe modifications across your entire codebase.

When should I use workspace-wide refactoring instead of manual edits?

Use workspace-wide refactoring when renaming symbols, restructuring code across multiple files, or making changes where missed references could cause bugs. The automated reference checking and dry-run validation make large-scale refactors safer and faster than manual editing.