refactor-git-plan

Plan Git commit strategies for codebase refactorings with branch naming and commit granularity.

3|Updated Dec 22, 2025
One-click install
npx skills add https://github.com/CANTAGESTUDIO/CosmicAtlasPacker --skill refactor-git-plan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: refactor-git-plan
Source: https://github.com/CANTAGESTUDIO/CosmicAtlasPacker/tree/main/.claude/skills/refactor-git-plan
Command: npx skills add https://github.com/CANTAGESTUDIO/CosmicAtlasPacker --skill refactor-git-plan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Structures the Git workflow for refactoring: branch naming, commit granularity, messages, and safe merge practices.

Core Features & Use Cases

  • Branch Strategy: Naming conventions like refactor/<scope>-<action>.
  • Commit Granularity: One commit per major refactor unit.
  • Safety Practices: Pre-flight checks and rollback guidance.

Quick Start

Create a scoped refactor plan with branches and commits following the guide.

Frequently Asked Questions about refactor-git-plan

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

FAQPage Schema
How do I structure Git commits for a safe refactoring?

Plan refactoring commits by creating one atomic commit per major change—rename, extraction, or move. Use commit message format refactor(<scope>): <action>, document what changed and why, include risk level (low/medium/high), and test status (passing/added/updated). This keeps refactors reviewable and reversible across branches.

What Git branch naming convention should I use for refactoring?

Follow the refactor/<scope>-<action> naming pattern for refactor branches. Scope identifies the component or module being refactored, and action describes the refactoring type—extract, rename, move, or pattern application. This standardizes branch strategy and signals intent clearly in merge workflows.

How do I plan a reversible refactoring workflow with Git?

Plan your refactoring by defining scope, breaking changes into atomic commits, establishing pre-flight and post-commit safety checks, and documenting rollback guidance. Use scoped branches, granular commits with standardized messages, and test validation at each step to ensure changes remain reviewable and reversible.

What safety practices should I follow when refactoring across multiple commits?

Run pre-flight checks before refactoring to verify the baseline state. After each commit, validate that tests pass or document what was added or updated. Include explicit risk assessment (low/medium/high) in commit messages and maintain rollback guidance so merges can be safely reverted if issues arise.

Can I use Git branching and commits to handle service extraction refactors?

Yes. Extract services by planning commits for each extraction phase—interface definition, implementation, migration, and cleanup. Use refactor/<service>-extract branch naming, commit each phase separately, run tests after each step, and document risk and test status in commit messages for safe, reviewable extraction.

How do I ensure file rename and move refactors are tracked safely in Git?

Create dedicated commits for file moves and renames using refactor/<scope>-move or refactor/<scope>-rename branches. Commit the structural change separately from content modifications, document what changed and why, include test validation status, and mark risk level so reviewers understand the refactoring scope.