Agent skill
rebase
Rebase the current branch with smart conflict resolution.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/rebase-raine-workmux
SKILL.md
Rebase the current branch.
Arguments: $ARGUMENTS
Behavior:
- No arguments: rebase on local main
- "origin": fetch origin, rebase on origin/main
- "origin/branch": fetch origin, rebase on origin/branch
- "branch": rebase on local branch
Steps:
- Parse arguments:
- No args → target is "main", no fetch
- Contains "/" (e.g., "origin/develop") → split into remote and branch, fetch remote, target is remote/branch
- Just "origin" → fetch origin, target is "origin/main"
- Anything else → target is that branch name, no fetch
- If fetching, run:
git fetch <remote> - Run:
git rebase <target> - If conflicts occur, handle them carefully (see below)
- Continue until rebase is complete
Handling conflicts:
- BEFORE resolving any conflict, understand what changes were made to each conflicting file in the target branch
- For each conflicting file, run
git log -p -n 3 <target> -- <file>to see recent changes to that file in the target branch - The goal is to preserve BOTH the changes from the target branch AND our branch's changes
- After resolving each conflict, stage the file and continue with
git rebase --continue - If a conflict is too complex or unclear, ask for guidance before proceeding
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?