Token导航 LogoToken导航TokenDH.com
开发需要联网github未标认证来源可访问许可证需确认审计通过

git-rebase-syncgit 变基同步

Agent Skill

git-rebase-sync 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

2,658

周安装

113

GitHub Stars

43

下载量

931
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:git-rebase-sync(git 变基同步)
来源仓库:https://github.com/0xbigboss/claude-code
仓库路径:skills/git-rebase-sync
安装命令:
npx skills add https://github.com/0xbigboss/claude-code --skill git-rebase-sync
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/0xbigboss/claude-code --skill git-rebase-sync

简介

用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。

  • 适合在需要围绕仓库状态、代码变更或协作事项进行整理时使用。
  • 可结合来源仓库和原始 README 核验具体用法和功能细节。
  • 安装通过 npx skills add 命令从指定 GitHub 仓库获取,适用于 Codex、Claude、Cursor、Gemini CLI。
  • 建议确认权限范围、维护状态及是否触发联网、命令执行或文件读写。

SKILL.md

git-rebase-sync

Use this skill when you need to sync a feature branch onto the latest origin/{base_branch} via git rebase, including conflict resolution with explicit clarification questions when intent is ambiguous.

Goals

  • Rebase the current branch onto a specified base branch (often the repo default branch like dev or main).
  • Resolve conflicts deliberately, without guesswork.
  • Keep safety rails: backup ref, confirmations before history-rewriting commands, and safe pushing.

Hard Rules

  • Do not create or switch to a different feature branch. Operate on the current branch name unless I explicitly ask otherwise.
  • Before any history-rewriting command (git rebase..., git push --force*), print the exact command(s) you will run and wait for my confirmation.
  • Create a local backup ref (prefer an annotated tag) before starting the rebase. Do not push backup refs unless I explicitly ask.
  • Prefer git push --force-with-lease, never plain --force.
  • If the correct conflict resolution is unclear, stop and ask a targeted question. Do not invent product behavior.

Workflow

1) Identify base + branch

  • Determine the current branch:

- git branch --show-current

  • Determine the base branch you will rebase onto:

- If not provided, use GitHub default branch: - gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name'

  • Fetch latest:

- git fetch origin

2) Preflight safety checks

  • Ensure the working tree is clean and there is no operation in progress:

- git status

  • If git status indicates an in-progress merge/rebase/cherry-pick, stop and ask what to do (abort vs continue).

3) Create a local backup ref (do not push)

  • Create an annotated tag at current HEAD:

- git tag -a {branch_name}-rebase-backup-$(date +%Y%m%d-%H%M%S) -m "pre-rebase backup" HEAD

  • Record the tag name as {backup_ref} for recovery.

4) Choose rebase mode (normal vs preserve merges)

  • Check whether the branch contains merge commits:

- git rev-list --count --merges origin/{base_branch}..HEAD

  • If merge commits exist, ask whether to preserve them (--rebase-merges) or flatten them (plain rebase).

5) Run the rebase (requires confirmation)

  • Print the exact command you intend to run, then wait for confirmation:

- Typical: - git rebase origin/{base_branch} - With merge preservation: - git rebase --rebase-merges origin/{base_branch}

6) Conflict handling loop

When conflicts happen:

  1. Collect context:

- git status - Identify conflicted files (from status output).

  1. For each conflicted file:

- Open the file and understand the surrounding code and intent. - Prefer minimal, mechanical conflict resolutions: - Keep upstream changes unless the feature branch deliberately supersedes them. - Re-run generators (lockfiles, codegen) instead of hand-editing when appropriate. - If intent is ambiguous, ask a single targeted question, for example: - "Should we keep the new upstream behavior X, or keep the feature behavior Y?" - "Is this file generated and safe to regenerate, or do you want manual resolution?"

  1. Apply the resolution, then stage only resolved files:

- git add <file...>

  1. Continue:

- git rebase --continue

  1. If you reach a point where resolution is too risky/unclear:

- Stop and ask; optionally propose aborting the rebase.

Helpful commands during conflicts:

  • Inspect current conflict hunks: git diff
  • See the commit being replayed: git show
  • If you need to back out: git rebase --abort (this is safe and should be preferred over destructive resets)

7) Post-rebase verification

  • Show the new commit range:

- git log --oneline --decorate origin/{base_branch}..HEAD

  • Run appropriate repo checks (tests, typecheck, lint) if available.

8) Push updated branch (requires confirmation)

  • If the branch already exists on origin, rebasing rewrites history, so pushing requires force-with-lease.
  • Print the exact command and wait for confirmation:

- git push --force-with-lease origin HEAD:{branch_name}

Recovery

  • If something goes wrong, use {backup_ref} to restore the pre-rebase state.
  • Do not run destructive commands (e.g., git reset --hard) unless I explicitly confirm after you show the exact command.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.67%
按下载量换算332

Claude

27.8%
按下载量换算259

Cursor

18.35%
按下载量换算171

Gemini CLI

8.71%
按下载量换算81

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills