safe-refactor
An agent skill by JuliusBrussee, from JuliusBrussee/caveman. Tags: code-quality, development, refactoring, validation.
What it does
Restructure code while preserving behavior. Use for extraction, consolidation, ownership moves, or cleanup where verification must bracket structural edits.
Install
With the skills CLI, which installs into Claude Code, Codex, Cursor and other agents:
npx skills add JuliusBrussee/caveman --skill safe-refactor
Or copy the skill folder into Claude Code's skills directory by hand (~/.claude/skills for every project, or .claude/skills inside one):
git clone --depth 1 https://github.com/JuliusBrussee/caveman
cp -r caveman/skills/safe-refactor ~/.claude/skills/safe-refactor
Safety box score
Grade A, minimal risk: 0 of 100 risk points, rated 2026-10-16. The grade rates what the skill and its scripts can reach on the machine of whoever installs it, across eight categories from shell execution to secrets access. How the score works.
This skill is documentation-only: it contains a short refactoring policy and a prompt alias, with no scripts, installers, or remote fetches. The main practical risk is not machine safety but that the agent may use it to make structural code changes that should still be code-reviewed for correctness.
| Category | Level | Why |
|---|---|---|
| Code & shell execution | 0 (none) | No shell commands, code evaluation, or native scripts are shipped; only `SKILL.md` and `agents/openai.yaml` are present. |
| Network access | 0 (none) | There are no URLs, download steps, or network calls in the skill files. |
| Filesystem reach | 0 (none) | The files do not instruct reads or writes outside the repo; they only describe a refactor workflow in prose. |
| Secrets & credentials | 0 (none) | Nothing in `SKILL.md` or `agents/openai.yaml` requests tokens, keys, passwords, or other credentials. |
| Privilege & persistence | 0 (none) | No sudo, global install, service registration, or shell/OS configuration changes are mentioned. |
| Instruction hijack surface | 0 (none) | The content does not tell the agent to ignore its rules, hide actions, or follow remote instructions. |
| Irreversible actions | 0 (none) | It is limited to code restructuring and verification guidance; it does not publish, deploy, send, pay, or delete anything. |
| Transparency | 0 (none) | All shipped files are plain text and fully readable; there are no binaries, base64 blobs, or unpinned remote dependencies. |
Before installing
- Confirm the repo still contains only `SKILL.md` and `agents/openai.yaml`, with no added scripts or installers.
- If the skill is updated later, re-check for any commands, downloads, or prompt text that could expand its scope.
Rated 2026-10-16 by an automated review of 2 files from the skill's repository.
Source
- Repository
- JuliusBrussee/caveman (all skills from this repository)
- Path
- skills/safe-refactor/SKILL.md
- Branch
- main
- Updated
- 2026-10-05
Related skills
- deslop — Remove AI-generated code slop and clean up code style
- principle-laziness-protocol — Apply when refactoring, evaluating diff size, or tempted to add abstractions, layers, or signal threading.
- principle-subtract-before-you-add — Apply when sequencing an addition, refactor, or rewrite. Remove dead code, redundant validators, and stub references first, then build on the simpler base.
- principle-type-system-discipline — Apply when designing types, reviewing a function signature, or writing code in any statically-typed language.
- typescript-best-practices — TypeScript best practices. Use when reading or editing any .ts or .tsx file.
- skill-reviewer — Reviews and improves Claude Code skills against official best practices.