# Safe Refactor (agent skill)

> Safe Refactor is an agent skill (a SKILL.md file) from JuliusBrussee/caveman. Restructure code while preserving behavior. It works with Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode and has 110,252 GitHub stars across a repository of 4 listed skills.

Restructure code while preserving behavior. Use for extraction, consolidation, ownership moves, or cleanup where verification must bracket structural edits. Define behavior-preservation boundary and establish verification before structural edits.

## Key facts

| Fact | Value |
|---|---|
| Repository | https://github.com/JuliusBrussee/caveman |
| Skill path | skills/safe-refactor/SKILL.md |
| Skill name | safe-refactor |
| GitHub stars | 110,252 |
| Installs on skills.sh | 86,376 |
| License | Apache-2.0 |
| Skills in repo | 4 |
| Plugin marketplace | caveman |
| Official | no |
| Works with | Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode |
| Category | Coding |
| Last commit | Oct 6, 2026 |

## When it triggers

- Use for extraction, consolidation, ownership moves, or cleanup where verification must bracket structural edits.

## Add this skill

### Claude Code

```sh
/plugin marketplace add JuliusBrussee/caveman
/plugin install caveman@caveman
```

In the Claude apps, zip the skill folder and upload it under Customize > Skills > + > Upload a skill (code execution must be on).

### ChatGPT / Codex

```sh
git clone --depth 1 https://github.com/JuliusBrussee/caveman.git
cp -r caveman/skills/safe-refactor .agents/skills/safe-refactor   # repo; ~/.agents/skills for all projects
```

### Cursor

```sh
git clone --depth 1 https://github.com/JuliusBrussee/caveman.git
cp -r caveman/skills/safe-refactor .cursor/skills/safe-refactor   # project; ~/.cursor/skills for all projects
```

Sources (checked 2026-10-07): https://code.claude.com/docs/en/skills, https://support.claude.com/en/articles/12512180-using-skills-in-claude, https://learn.chatgpt.com/docs/build-skills, https://cursor.com/docs/context/skills

skills.sh listing: https://www.skills.sh/JuliusBrussee/caveman/safe-refactor

---

Canonical page: https://appsgit.com/skills/juliusbrussee-safe-refactor
Source: appsgit (https://appsgit.com), the app store for github. Data from the GitHub API, refreshed nightly.
Machine access: JSON API https://appsgit.com/api/v1/apps (OpenAPI: https://appsgit.com/openapi.json), MCP server https://mcp.appsgit.com/mcp, full index https://appsgit.com/llms-full.txt.
