safe-refactor
Restructure code while preserving behavior. Use for extraction, consolidation, ownership moves, or cleanup where verification must bracket structural edits.
Before you install
- Last update
- Files in folder
- 2
- Scripts
- No script files found
- SKILL.md size
- 705 B (about 176 tokens of context each time it loads)
- License
- Apache-2.0
- Source on GitHub
- JuliusBrussee/caveman
Skills are plain text instructions the agent follows, sometimes with scripts. Check the source, prefer repositories with many installs and stars, and read any script it ships.
Install
npx skills add JuliusBrussee/caveman@safe-refactorRuns in a terminal with Node.js 18 or newer. Add -y to skip the prompts and -g to install for every project instead of this one.
Install for your agent
npx skills add JuliusBrussee/caveman@safe-refactor --agent claude-code -y- Project install writes to
.claude/skills/safe-refactor- Global install writes to
~/.claude/skills/safe-refactor
Start a new session afterwards so the agent picks the skill up. In Claude Code you can also call it directly with /safe-refactor.
What it does
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.
Excerpt from the skill's own SKILL.md. Read the full file on GitHub before installing: skills run with your agent's permissions.
Categories
Related skills
- caveman
JuliusBrussee/caveman
Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".
- caveman
JuliusBrussee/caveman
Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".
- caveman-commit
JuliusBrussee/caveman
Write a Conventional Commits message compressed to intent only. Use for "write a commit", "commit message", /commit or /caveman-commit.
- caveman-review
JuliusBrussee/caveman
Compressed code review - one line per finding with location, problem and fix. Use for /caveman-review, "review this PR", or "review the diff".
- caveman-compress
JuliusBrussee/caveman
Compress a memory file such as CLAUDE.md or a todo list into caveman format to save input tokens, keeping a readable backup. Sends the file's text to the configured model provider. Trigger: /caveman-compress.
- caveman-compress
JuliusBrussee/caveman
Compress a memory file such as CLAUDE.md or a todo list into caveman format to save input tokens, keeping a readable backup. Sends the file's text to the configured model provider. Trigger: /caveman-compress.