# Safe Refactor

> Structured refactor execution with guardrails, checkpoints, and regression control. Use when code should be reorganized or simplified without behavior regressions. Use when this capability is needed.

- Skill: `tomevault-io/safe-refactor` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/safe-refactor`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/safe-refactor/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/safe-refactor

---

Refactor in small reversible steps.

1. Define behavior-preserving target and affected boundaries.
2. Create small edits per step and keep call sites compilable.
3. Run focused checks after each step.
4. Keep rollback options explicit (git diff checkpoints).
5. End with verification summary: what changed, what stayed invariant, and what was validated.

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/puukis) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-15 -->

