
Safe Refactor
Safe-refactor is a discipline skill more than a transformation tool. Its core rule is that you establish what behavior must not change, and run the same verification before and after the structural edit, so the proof brackets the change. It's aimed at extraction, consolidation, and moving ownership between modules, the kind of work where a quiet behavior shift hides easily under a cleanup commit. The instructions push you to keep feature work out of the refactor, to move one ownership boundary at a time, and to keep intermediate states buildable. Preserving public interfaces, error behavior, and ordering is spelled out explicitly, which is the part people usually skip. The honest take: it's mostly a set of guardrails rather than automation, so its value depends on you actually having tests worth running. If your suite is thin, the skill can't manufacture confidence for you.
- skills.sh installs
- 121.2K
- GitHub stars
- 118.7K
- last updated
- Oct 26, 2026
Install
$ npx -y skills add juliusbrussee/caveman --skill safe-refactor --agent claude-codeInstalls into .claude/skills of the current project.
Files
Safe refactor
Define behavior-preservation boundary and establish verification before structural edits.
- Keep feature changes outside refactor.
- Move one ownership boundary at a time.
- Preserve public interfaces, failure behavior, ordering, and compatibility unless explicitly scoped.
- Keep intermediate states buildable and testable.
- Avoid dependency or configuration growth without correctness need.
Run same proof after change. Stop when behavior matches and requested structure is achieved.
Sponsors
Details
- Repository
- github.com/juliusbrussee/caveman
- Categories
- Code Review & Quality, Rust
- First seen
- Oct 26, 2026
More from juliusbrussee/caveman
All 25- Caveman Optimize120.5K
- Investigate First120.1K
- Verify And Stop119.6K
- Surgical Patch119.5K
- Lean Build119.1K
- Caveman Evidence Review119K
- Caveman Discover119K
- Caveman Manage118.7K
- Migration118.4K
- Caveman Setup118K
- Compress45.8K
- Ultracave41.3K
- Megacave40.1K
- Caveman Es513
- Caveman Cn437
- Caveman618.3K
- Caveman Commit431.6K
- Caveman Compress428.9K
- Caveman Review427.5K
- Caveman Help418.2K
- Cavecrew374.2K
- Caveman Stats374.1K
- Caveman Explore122.4K
- Caveman Learn121.5K