New to Claude Skills? Learn how to install them →

microsoft on GitHub

Sync Upstream

OfficialFree

Keep your session branch updated with upstream changes.

by microsoft188.6k stars on microsoft/vscode
3 views
Updated Aug 10, 2026
Get this skill

Free · Opens the source repo

What Sync Upstream does

Sync Upstream is a skill designed for developers who need to ensure their session branches are aligned with the latest changes from the upstream repository. This skill facilitates the process of rebasing your current branch onto the latest version of the origin, which is particularly useful when the upstream has undergone significant updates. By using this skill, developers can easily adapt their ongoing work to fit the new upstream context while preserving the integrity of their session changes.

The workflow begins with a check for uncommitted changes, which must be committed before proceeding. The skill then automates the fetching of the latest upstream changes and rebases the current session branch onto the specified base branch, typically main. This ensures that the session branch is grounded in the most recent version of the codebase, minimizing the risk of conflicts and integration issues.

In the event of conflicts during the rebase, the skill enforces a strict policy where upstream changes take precedence. Developers are instructed to adapt their session work to align with the new upstream logic without altering it. This approach not only helps maintain the integrity of the upstream repository but also encourages developers to think critically about how their changes fit into the larger codebase. After resolving conflicts, the skill guides users through the process of continuing the rebase and validating the final result to ensure that the session objectives are still met.

Sync Upstream is ideal for teams working in collaborative environments where the upstream repository is frequently updated. It streamlines the process of keeping session branches current, reducing the time spent on manual conflict resolution and integration tasks.

When to use it

Use this skill when your session branch has become stale due to significant updates in the upstream repository and you need to rebase your work accordingly.

When not to use it

This skill is not suitable for scenarios where you do not want to adapt your session changes to fit the upstream or when working with branches that have not diverged significantly.

What you can build with it

Rebasing After Major Upstream Changes

When the upstream repository has undergone significant changes, use this skill to rebase your session branch and adapt your work accordingly.

Collaborative Development

In a team setting where multiple developers are pushing updates, this skill helps keep your branch in sync with the latest codebase.

Conflict Resolution During Integration

When conflicts arise during a rebase, use this skill to ensure upstream changes are prioritized while adapting your session work.

How to install Sync Upstream

View source

1. Install with the skills CLI

npx skills add microsoft/vscode/sync-upstream --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by microsoft
<!-- Customize this skill and select save to override its behavior. Delete that copy to restore the built-in behavior. -->

Update Branch

Rebase the current session branch onto the latest upstream so the work stays grounded in origin.

Workflow

  1. If there are uncommitted changes, use the /commit skill to commit them first.
  2. Fetch the latest upstream and rebase onto it:
    git fetch origin
    git rebase origin/main
    
    Use the appropriate base branch if it is not main.

Conflict Resolution

When conflicts arise, upstream always wins:

  • Never alter upstream logic, APIs, or patterns to accommodate session changes.
  • Adapt session work to fit the new upstream — rename, restructure, or rewrite as needed while preserving the session's goals.
  • After resolving each conflict, git add the files and git rebase --continue.

Validation

After the rebase completes, verify the result still compiles and meets the session's objectives. If session changes no longer make sense against the updated upstream, explain what changed and propose a revised approach.

Frequently asked questions about Sync Upstream

Similar skills