Back

Safe Refactor

Coding120.2K installs

What it does

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

Install

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

Website

www.skills.sh/juliusbrussee/caveman/safe-refactor

Details

From the skill’s SKILL.md or README, by its authors. View the original

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.

See all
  • Coding

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

    npx skills add https://github.com/mattpocock/skills --skill improve-codebase-architecture
    1.2M installs
  • Coding

    React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data…

    npx skills add https://github.com/vercel-labs/agent-skills --skill vercel-react-best-practices
    881K installs
  • Coding

    Review the changes since a fixed point (commit, branch, tag, or merge-base) along two axes: Standards (does the code follow this repo's documented coding standards?) and Spec (does the code match what the originating issue/spec asked for?). Runs both reviews in parallel…

    npx skills add https://github.com/mattpocock/skills --skill code-review
    869.3K installs
  • Coding

    Use when you need to resolve an in-progress git merge/rebase conflict.

    npx skills add https://github.com/mattpocock/skills --skill resolving-merge-conflicts
    551.2K installs

Skills are shared by members and not reviewed by us. Read a skill’s code before you install it.

Safe Refactor: AI agent skill | Tool Directory AI