# Refactor

> Improves code structure without changing behavior. Use for cleanup, deduplication, rename passes, or /refactor. Proposes first; implements after approval.

- Skill: `axidify/refactor` (Agent Skill)
- Install (CLI): `npx skillmds@latest add axidify/refactor`
- Raw SKILL.md: https://api.skillmd.com/api/skills/axidify/refactor/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: Axidify (https://skillmd.com/u/axidify)
- Updated: 2026-09-21
- Page: https://skillmd.com/skills/axidify/refactor

---


# Refactor

## Checklist

0. For large refactors, run **review** (clean-code pass) on scope first
1. Read all code in scope
2. Note: duplication, naming, coupling, complexity, inconsistent patterns
3. **Propose** changes with rationale — wait for approval
4. Implement — **no intentional behavior change**
5. Run existing tests and build
6. Report: what improved, what you left alone and why

## Boundaries

- Not the right tool for new features — use **plan** + **implement**
- Not for framework upgrades or breaking API changes — say so; get approval for a migration pass
- Prefer **mechanical** refactors (rename symbol, extract function) in small commits
- Limit blast radius; split large refactors across steps if the user agrees

## If behavior must change

Say so explicitly and get approval — then treat as implement, not refactor.

## Related skills

- **test** — prove behavior unchanged
- **review** — before merge
- **plan** — when refactor scope is large or unclear

