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.

v1.0Latest
New~166Updated Aug 17, 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

52/100

Grade

C

Adequate

Safety

78

Quality

38

Clarity

65

Completeness

28

Summary

A minimal refactoring guidance skill that instructs agents to restructure code while preserving behavior through verification boundaries. It emphasizes establishing proof of behavior before making structural edits, avoiding feature changes during refactors, and maintaining buildability throughout the process.

Detected Capabilities

code analysisverification/testingguidance only (no direct file writes or shell execution)

Trigger Keywords

Phrases that MCP clients use to match this skill to user intent.

safe refactorpreserve behavior during refactorextract methodsconsolidate coderefactor with verification

Use Cases

  • Extract methods or modules without changing behavior
  • Consolidate duplicate code or refactor for clarity
  • Move code ownership or module boundaries safely
  • Clean up legacy code structure with confidence
  • Reorganize code for maintainability while preserving functionality

Quality Notes

  • Skill is very sparse — only ~60 words of core instruction. No examples, code snippets, or concrete workflows provided.
  • No specific guidance on HOW to establish or run verification proofs; assumes agent/user understands relevant testing/verification tools.
  • No edge cases addressed (e.g., what if proof passes but structure doesn't match requested form; circular dependencies during refactor).
  • No error handling or recovery strategies described.
  • Agent interface (YAML) is minimal; does not reference test patterns, allowed tools, or scope boundaries.
  • Instructions are abstract and rely heavily on domain knowledge; a junior developer may struggle to apply them.
Model: claude-haiku-4-5-20251001Analyzed: Aug 17, 2026

Reviews

Add this skill to your library to leave a review.

No reviews yet

Be the first to share your experience.

Use juliusbrussee/safe-refactor in your dev environment

Command Palette

Search for a command to run...