git-rebase
General↓ 0 installsUpdated 12d ago
Curatedgardusig
>-
SKILL.md preview
--- name: git-rebase description: >- Rebase current branch onto canonical main (or another target) with conflict resolution via read-workflow-merge-conflicts. No push in this skill; publish separately with @git-push after review. --- **Normative workflow:** [`read-workflow-workflows`](../../internal/read/workflow/workflows/SKILL.md#git-rebase-workflow). # Rebase (current branch onto target) Normative fences / full matrix: [`write-rebase`](../../internal/write/rebase/SKILL.md), [`read-workflow-merge-conflicts`](../../internal/read/workflow/merge-conflicts/SKILL.md), [`read-repo-stream`](../../internal/read/repo/stream/SKILL.md). ## Language interaction policy Always apply [`read-safety-language-interaction-rules`](../../internal/read/safety/language-interaction-rules/SKILL.md) first. Use English by default for all assistant output, including AskQuestion prompts/options, unless the user explicitly requests another full-language response. ## Before batch **Always run first** (sequential). Complete every applicable row in this table before execution steps in this skill. Skip a row only when its **When** column does not apply. | Kind | Skill / library | When | | --- | --- | --- | | **Recommended** | [`@git-pull`](../pull/SKILL.md) | Merge canonical **main** before rewrite when preferred over rebase | | **Recommended** | [`@git-commit`](../commit/SKILL.md) | Safety savepoint before history rewrite | | **Tooling** | `git` | Repo root | ## Required internal skills Run after **Before batch** completes (names only; normative fences in linked libraries). | Library | Role | | --- | --- | | `read-workflow-workflows` | See linked library | | `write-rebase` | See linked library | | `read-workflow-merge-conflicts` | See linked library | | `read-repo-stream` | See linked library | ## Skip & suggestions | Flag / param | Role | | --- | --- | | **`skip=false`** | Root invocation — offer next-step suggestions after **Verification** | | **`skip=true`** | Nested public-skill child call — no next-step prompt | | **`SKIP_QA_GIT_REBASE=true`** | Bypass routine write gates for this skill | | **`SKIP_QA_WRITE=true`** | Shared write-flow Q&A bypass where allowed | | **`SKIP_SUGGESTIONS=true`** | Suppress next-step suggestions even at root | High-risk or destructive confirmations still require explicit user confirmation when bypass flags are set. ## Do - Execute **[`read-workflow-workflows`](../../internal/read/workflow/workflows/SKILL.md#git-rebase-workflow)** in order. - Use **`origin/main`** as the default target when rebasing onto repository main. - If conflicts occur, run **[`read-workflow-merge-conflicts`](../../internal/read/workflow/merge-conflicts/SKILL.md)** as the conflict playbook and continue rebase until complete. ## Do not - Rebase `main` itself in this skill flow; use **`@git-main`** to align local `main`. - Push rewritten history from this skill; publishing belongs to **`@git-push`** after user confirmation. - Mix merge and rebase strategies in one invocation unless the user explicitly requests it. ## On invoke *`@git-rebase`* — Determine target (`canonical main` by default). If unclear, ask for the target branch/ref before running workflow steps. ## Verification - [ ] **REBASE_ONTO** stated before rebase fences. - [ ] Conflicts handled via **read-workflow-merge-conflicts** or rebase aborted cleanly. - [ ] No push from this skill (hand off to **@git-push** when needed). ## Recommended next steps When **`skip=false`** (root invocation) and **`SKIP_SUGGESTIONS`** is unset, delegate to **[`read-skill-suggestions`](../../internal/read/skill-suggestions/SKILL.md)** for optional next-step choices (**summary** → **options** → AskQuestion). Nested public-skill calls use **`skip=true`**. ## Notes - After a successful rebase, run **`@git-review`** before publishing, or use **`@gh-pr`** (which runs **`@git-review`** before **`@git-push`**). - Rebase rewrites commits; confirm intent when branch history is already shar …