AgentSkillsCN

sync-main

通过 fetch 与 merge,或通过 rebase 将分支与 origin/main 同步,随后解决冲突并总结变更。适用于被要求与主干同步时使用。

SKILL.md
--- frontmatter
name: sync-main
description: "Sync the branch with origin/main by fetching and merging or rebasing, then resolve conflicts and summarize changes. Use when asked to sync with main."

Sync Main

Workflow

  • Summarize current git status and confirm whether a commit is needed.
  • If already in conflict, skip merge/rebase and resolve conflicts directly.
  • Fetch origin and merge or rebase from origin/main.
  • Resolve conflicts, preserving branch intent and upstream structure.
  • Summarize what changed and note that pushing is left to the user.