Catalog
JuliusBrussee/safe-refactor

JuliusBrussee

safe-refactor

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

NewUpdated Sep 9, 2026

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.

Files2
2 files · 1.6 KB

Select a file to preview

Overall Score

72/100

Grade

B

Good

Grades are signals, not a certification. Always review a skill yourself before use.

Safety

85

Quality

68

Clarity

78

Completeness

62

Summary

A refactoring guidance skill that instructs agents to restructure code while preserving behavior. It establishes clear boundaries for safe refactoring: no feature changes mixed with structural edits, one ownership move at a time, and verification before and after changes. The skill prioritizes intermediate buildable/testable states and explicit scoping of exceptions.

Detected Capabilities

code analysisbehavioral verificationstructural modificationtest executiongit operations

Trigger Keywords

Phrases that agents use to match this skill to user intent.

extract functionrefactor code safelymove module ownershipconsolidate duplicatesrename public interfacereorganize codebase

Use Cases

  • Extract functions or modules from monolithic code
  • Consolidate duplicated logic across files
  • Move code ownership between modules or teams
  • Reorganize project structure without changing behavior
  • Clean up dependencies and imports while maintaining compatibility
  • Rename and restructure public interfaces with safety verification

Quality Notes

  • Strong emphasis on behavior preservation through verification boundaries
  • Clear constraints (no feature changes, one ownership move at a time) that reduce risk
  • Practical guidance on intermediate states (buildable/testable)
  • Concise and actionable principles that an agent can follow
  • Limitations section missing — does not explicitly address what types of refactors are out of scope (e.g., algorithm changes, major dependency rewrites)
  • No concrete examples or walkthrough of how to establish/run proofs
  • Missing guidance on when refactoring should stop or fail (e.g., if tests fail, if performance degrades)
Model: claude-haiku-4-5-20251001Analyzed: Sep 9, 2026

Reviews

Add this skill to your library to leave a review.

No reviews yet

Be the first to share your experience.

Version History

  1. v1.1

    Content updated

    ✦ AILicense file updated.

    2026-09-09

    LATEST
  2. v1.0

    2026-08-17

    View This VersionInitial version

Use JuliusBrussee/safe-refactor in your dev environment

Command Palette

Search for a command to run...