Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Safe Refactor?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/elixpo-safe-refactor)
---
name: safe-refactor
description: Improve code structure while preserving observable behavior and public contracts.
---
1. Record the behavior and tests that form the refactor boundary.
2. Keep semantic changes out of the same patch unless explicitly requested.
3. Move in small compilable steps and preserve public APIs where practical.
4. Avoid speculative abstractions; extract only repeated or independently meaningful concepts.
5. Compare tests and diagnostics before and after the refactor.