Agent skill

rebase-latest-main

Fetch latest origin/main and rebase it onto the current branch, resolving conflicts if necessary. Use when the user wants to rebase on main, update their branch with latest main, or sync with upstream.

dyoshikawa1,265★ · +16/wk · 1 repos on radarProfile →
claude-codeMIT
Install
npx skills add dyoshikawa/rulesync --skill rebase-latest-main --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 2 KB
Bundled scripts: none
Path: .rulesync/skills/rebase-latest-main/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 1,285 · +20 this week
Language: TypeScript
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Rebase Latest Main Fetch the latest `origin/main` and rebase it onto the current working branch. ## Step 1: Verify Current State 1. Check the current branch: ```bash git branch --show-current ``` 2. Ensure there are no uncommitted changes: ```bash git status --porcelain ``` If there are uncommitted changes, either: - Commit them first, or - Ask the user how to proceed (commit, stash, or abort) ## Step 2: Fetch Latest Changes Fetch the latest changes from the remote: ```bash git fetch origin main ``` ## Step 3: Rebase onto origin/main Start the rebase: ```bash git rebase origin/main ``` ### If rebase succeeds without conflicts: Proceed to Step 5. ### If conflicts occur: 1. Identify conflicting files: ```bash git diff --name-only --diff-filter=U ``` 2. For each conflicting file: - Read the file content to understand the conflict - Analyze both versions (HEAD and origin/main) - Resolve the conflict by choosing the appropriate changes or merging them - Stage the resolved file: ```bash git add <resolved-file> ``` 3. Continue the rebase: ```bash git rebase --continue ``` 4. Repeat until all conflicts are resolved and rebase is complete. ## Step 4: Handle Rebase Failure If unable to res

What's inside
Steps it walks through
  1. Step 1: Verify Current State
  2. Step 2: Fetch Latest Changes
  3. Step 3: Rebase onto origin/main
  4. If rebase succeeds without conflicts:
  5. If conflicts occur:
  6. Step 4: Handle Rebase Failure
  7. Step 5: Push Changes
  8. Step 6: Report Result
Commands it runs
git branch --show-current
git status --porcelain
git fetch origin main
git rebase origin/main
git diff --name-only --diff-filter=U
git add <resolved-file>
git rebase --continue
git rebase --abort
git push --force-with-lease
More from rulesync
All skills →
About this skill
What does the rebase-latest-main skill do?

Fetch latest origin/main and rebase it onto the current branch, resolving conflicts if necessary. Use when the user wants to rebase on main, update their branch with latest main, or sync with upstream.

How do I install it?

Run `npx skills add dyoshikawa/rulesync --skill rebase-latest-main --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From dyoshikawa/rulesync, a repository with 1,285 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going