← LeaderboardThe Skill Leaderboard

safe-refactor

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

Published by JuliusBrussee ↗JuliusBrussee/caveman

Try your first task

safe-refactor

Start a fresh conversation. Replace the highlighted placeholders.

Use safe-refactor to Refactor [target code] into [requested structure] while preserving its public interfaces, failure behavior, ordering, and compatibility; verify the same behavior before and after, then wait for my integration choice once the requested structure is achieved.

Required inputs

  • [target code]
  • [requested structure]

User-approved starter prompt based on a pinned source version; check current skill requirements before running. Task evidence ↗

SKILL.md

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

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.