Refactor Safely — Code Quality skill for Claude Code
Plan and execute safe refactoring using dependency analysis.
How to install Refactor Safely
Installs to ~/.claude/skills/filipdopita-tech-claude-ecosystem-setup-refactor-safely/SKILL.md
mkdir -p ~/.claude/skills/filipdopita-tech-claude-ecosystem-setup-refactor-safely && curl -fsSL https://raw.githubusercontent.com/filipdopita-tech/claude-ecosystem-setup/HEAD/skills/refactor-safely.md -o ~/.claude/skills/filipdopita-tech-claude-ecosystem-setup-refactor-safely/SKILL.md Restart Claude Code, or start a new session, for it to be picked up.
What Refactor Safely does
name: Refactor Safely description: Plan and execute safe refactoring using dependency analysis
Refactor Safely
Use the knowledge graph to plan and execute refactoring with confidence.
Steps
- Use
refactor_toolwith mode="suggest" for community-driven refactoring suggestions. - Use
refactor_toolwith mode="dead_code" to find unreferenced code. - For renames, use
refactor_toolwith mode="rename" to preview all affected locations. - Use
apply_refactor_toolwith the re
Alternatives in Code Quality
- Refactor — We are about to refactor code 1.6k ★
- Refactor Claude Md — Refactor CLAUDE.md by extracting sections to dedicated docs with path-scoped rules 1.6k ★
- Brooks Sweep — Run all Brooks-Lint analyses in one pass, auto-fix safe findings, confirm risky ones 1.5k ★
Full documentation available on GitHub
View Source RepositoryRelated Skills
Cmd Refactor
Refactor phase (ACT loop): analyze, plan, baseline, execute, verify, and sync a behavior-preserving restructur
Advanced Code Review Plan
Advanced Code Review Phase 1: Strategic Planning - scope analysis, risk categorization, priority ordering
Refactor Module
Safely refactor a Rust crate or Flutter module in GarraRUST.
Refactor Safe
Refactor internals without changing public API. Fixes structural problems (long functions, duplication, poor n
Refactor Feature
Skill: Refactor a Feature (Move Code Between Layers Safely)
Refactor Simple
Quick refactoring check for Python code focusing on:
Related Agents
Refactor Cleaner
Dead code cleanup and consolidation specialist. Use PROACTIVELY for removing unused code, duplicates, and refa
Code Refactor Master
Execute refactoring tasks — reorganize files, extract components, update imports, fix patterns across the code
Safe Refactor
Safely refactor code by splitting large files, extracting utilities, and improving organization while preservi