Agent skill
refactor-git-plan
[Code Quality] Plans Git commit strategy for refactoring: branch naming, commit granularity, commit messages, and safe merge approach. Use to structure version control for reversible, reviewable changes.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/development/refactor-git-plan
SKILL.md
Refactor: Git Plan
Structure version control for safe, reviewable refactoring.
Branch Strategy
Naming Convention
refactor/<scope>-<action>
Examples: refactor/auth-extract-service
Commit Granularity
One Commit Per
- Single rename across files
- One method extraction
- One file move
- One pattern application
Commit Message Format
refactor(<scope>): <action>
<what changed and why>
Risk: low|medium|high
Tests: passing|added|updated
Safety Practices
Before Starting
- Ensure clean state (git status)
- Create branch
- Verify tests pass
During Refactoring
- Commit frequently
- Run tests after each commit
If Something Breaks
- git reset --soft HEAD~1 (undo, keep changes)
- git checkout -- . (discard changes)
- git revert (revert specific)
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?