preserving-original-during-refactor

Save original versions of refactored files as .original backups for review.

Updated May 7, 2026
One-click install
npx skills add https://github.com/TK-Evans01/tk-harness --skill preserving-original-during-refactor
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: preserving-original-during-refactor
Source: https://github.com/TK-Evans01/tk-harness/tree/main/plugins/tk-rpie/skills/preserving-original-during-refactor
Command: npx skills add https://github.com/TK-Evans01/tk-harness --skill preserving-original-during-refactor

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill ensures that during code refactoring, the original behavior of files is preserved for comparison during code reviews.

Core Features & Use Cases

  • File Versioning: Saves the original version of files being refactored as .original files.
  • Behavior Comparison: Enables code reviewers to compare pre-refactor and post-refactor behavior.
  • Use Case: When a developer refactors code, the Skill creates backup copies of files, allowing for an 'old vs. new' comparison in the review process.

Quick Start

Run the preserving-original-during-refactor skill when initiating a refactor task that modifies an existing file.

Frequently Asked Questions about preserving-original-during-refactor

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I preserve original file behavior during code refactoring for review?

To preserve original file behavior during refactoring, you need version tracking that saves original files as backups. This allows code reviewers to compare pre-refactor and post-refactor behavior to verify no unintended changes occurred.

What is the best way to track file versions for behavior comparison in code review?

The best way to track file versions for behavior comparison is creating `.original` backup files of the code being refactored. This ensures the pre-refactor state remains accessible for an old vs. new comparison during the review process.

How do I set up version tracking when modifying existing files for a refactor?

You set up version tracking when modifying existing files by initiating the refactor task with a file versioning tool. The tool automatically creates backup copies of the original files, enabling behavior auditing and rollback if necessary.

Does behavior preservation work with any type of code refactoring task?

Behavior preservation works with any refactoring task that modifies existing files. It requires careful version tracking to ensure the original behavior is saved and can be audited by reviewers or rolled back if issues arise.

Why do I need to save original versions of files when refactoring code?

You need to save original versions of files when refactoring code to enable a reliable behavior comparison during code review. Keeping an `.original` backup ensures reviewers can audit changes and safely initiate a rollback if necessary.