Install Safe Refactor
Pick your agent. Every command is ready to paste.
npx skills add JuliusBrussee/caveman --skill safe-refactorThe open skills CLI detects your agents (Claude Code, Cursor, Codex and 70+ more) and installs to the right folder. Add -g to install globally.
01
Install it
Run the command above, or upload the folder in Claude.
02
Ask naturally
Describe the task. Your agent loads safe-refactor when the request matches its description.
03
Name it if needed
If it does not trigger, say “use the safe-refactor skill”. In Codex, type $safe-refactor.
The skill itself
SKILL.md
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.
Tips for Safe Refactor
- • Start a fresh session after installing so your agent picks up the new skill.
- • It is part of a pack with 22 skills. Install only the ones you need with --skill to keep triggers precise.
- • If two skills overlap, mention the one you want by name.
Questions about Safe Refactor
What does the Safe Refactor skill do?
Restructure code while preserving behavior. Use for extraction, consolidation, ownership moves, or cleanup where verification must bracket structural edits.
How do I install Safe Refactor?
Run "npx skills add JuliusBrussee/caveman --skill safe-refactor" in your project. The skills CLI installs it for Claude Code, Cursor, Codex and 70+ other agents. In Claude on the web, upload the skill folder as a ZIP under Customize > Skills.
Does Safe Refactor work in Cursor and Codex?
Yes. Safe Refactor uses the open SKILL.md format, so it works in Claude Code, Claude, Cursor, OpenAI Codex, Gemini CLI, GitHub Copilot and other agents that support agent skills.
Is Safe Refactor free?
Safe Refactor is open source on GitHub under the Apache-2.0 license. It is free to install; check the license before commercial use.
Who made Safe Refactor?
Safe Refactor is published by JuliusBrussee in the JuliusBrussee/caveman repository, together with 21 other skills.






