Agent Skills
› asJEI/vscode
› sync-upstream
sync-upstream
GitHub将当前会话分支变基到最新上游,保持代码与 origin 同步。优先提交未暂存更改,拉取最新代码后执行变基。冲突解决遵循“上游优先”原则,不修改上游逻辑,仅调整会话工作以适配新上游,最后验证编译及目标达成情况。
触发场景
需要更新会话分支以匹配最新上游
上游发生显著变化需同步
安装
npx skills add asJEI/vscode --skill sync-upstream -g -y
SKILL.md
Frontmatter
{
"name": "sync-upstream",
"description": "Update a stale session branch by rebasing onto the latest origin. Use when the upstream has moved significantly and the session needs to catch up, resolving conflicts by preserving upstream changes and adapting session work to fit."
}
Update Branch
Rebase the current session branch onto the latest upstream so the work stays grounded in origin.
Workflow
- If there are uncommitted changes, use the
/commitskill to commit them first. - Fetch the latest upstream and rebase onto it:
Use the appropriate base branch if it is notgit fetch origin git rebase origin/mainmain.
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 addthe files andgit 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.
版本历史
- ce4db66 当前 2026-07-19 08:58


