MCPInstall
juliusbrussee avatar

safe-refactor

Restructure code while preserving behavior. Use for extraction, consolidation, ownership moves, or cleanup where verification must bracket structural edits.

Installs
127.3K
Last 24h
+1.1K
Trending rank
#307
Security
Pass

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/juliusbrussee/caveman --skill safe-refactor
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads safe-refactor automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

Security audits

Independent scans of the skill's instructions and bundled files, each dated to when it ran.

Gen Agent Trust Hub PassSAFE ·The skill provides instructions for code refactoring and behavior preservation. No security issues or malicious patterns were detected.· Audited
Socket PassNo alerts· Audited
Snyk PassLOW ·Risk: LOW · No issues· Audited

SKILL.md

The instructions your agent reads when the skill is triggered.

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.

FAQ

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 https://github.com/juliusbrussee/caveman --skill safe-refactor in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/safe-refactor/ (personal) or .claude/skills/safe-refactor/ (project).

Which AI agents can use safe-refactor?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is safe-refactor safe to install?

Security partners have reviewed it: Gen Agent Trust Hub passed; Socket passed; Snyk passed. As with any skill, read the SKILL.md and bundled scripts before installing.

Who maintains safe-refactor?

It is published by juliusbrussee in juliusbrussee/caveman. It has 127,277 recorded installs.

More from juliusbrussee/caveman

View all →
juliusbrussee avatar

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".

Media & Creative629.1K installs
juliusbrussee avatar

caveman-commit

juliusbrussee/caveman

Write a Conventional Commits message compressed to intent only. Use for "write a commit", "commit message", /commit or /caveman-commit.

juliusbrussee avatar

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.

juliusbrussee avatar

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".

juliusbrussee avatar

caveman-help

juliusbrussee/caveman

Quick-reference card for the three caveman skills and their commands. Trigger: /caveman-help or "caveman help".

424.4K installs
juliusbrussee avatar

caveman-stats

juliusbrussee/caveman

Show recorded output and cache-read token usage and mode attribution for the current Claude Code session, or locate the host's native usage report. Trigger: /caveman-stats.

Docs & Writing381.2K installs

Popular code quality & workflow skills

View category →
mattpocock avatar

grill-me

mattpocock/skills

A relentless interview to sharpen a plan or design.

Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.

mattpocock avatar

handoff

mattpocock/skills

Compact the current conversation into a handoff document for another agent to pick up.

mattpocock avatar

domain-modeling

mattpocock/skills

Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.

mattpocock avatar

codebase-design

mattpocock/skills

Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.

mattpocock avatar

diagnosing-bugs

mattpocock/skills

Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.