# Refactor Safely

> Use when renaming, moving, extracting, or removing code and every affected location must be known before the first edit — a rename that spans call sites, an extraction that changes a signature, or a removal that might delete something still in use. Trigger phrases: "refactor this safely", "rename X everywhere", "is this code still used", "find everything that calls this before I change it", "preview this refactor". Not for reconciling a feature whose implementation has drifted from its intended design — that is `differential-feature-refactor`, a design question to answer first; this skill is the mechanical preview-apply-verify discipline once the refactor's scope is already known.

- Skill: `arasz/refactor-safely-3` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx get-skill add arasz/refactor-safely-3`
- Raw SKILL.md: https://api.skillmd.com/api/skills/arasz/refactor-safely-3/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- License: MIT
- Author: Arasz (https://skillmd.com/u/arasz)
- Updated: 2026-11-14
- Page: https://skillmd.com/skills/arasz/refactor-safely-3

---


> **This is the generic copy.** If this project has been scaffolded, prefer the unprefixed
> `refactor-safely` skill: it is `.ai-badger/skills/refactor-safely/SKILL.md`, and it has this project's
> extensions and any `project-local.md` merged in. This copy has neither.
>
> The full procedure is in `SKILL.full.md` beside this file, unchanged — read it if the project has no
> `.ai-badger/`, or run `welcome-ai-badger` to scaffold one.

