git-revert
General↓ 0 installsUpdated 12d ago
Curatedgardusig
>-
SKILL.md preview
--- name: git-revert description: >- Create safe inverse commits for one or more existing commits, including merge-commit revert handling. Does not reset history and does not push automatically. --- **Normative workflow:** [`read-workflow-workflows`](../../internal/read/workflow/workflows/SKILL.md#git-revert-workflow). # Revert (safe undo with new commits) Normative fences / full matrix: [`write-revert`](../../internal/write/revert/SKILL.md), [`read-workflow-workflows`](../../internal/read/workflow/workflows/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-review`](../review/SKILL.md) | Failure evidence before choosing revert targets | | **Recommended** | [`@git-push`](../push/SKILL.md) | Publish after revert commits land locally | | **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-revert` | See linked library | | `read-workflow-merge-conflicts` | 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_REVERT=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-revert-workflow)** in order. - Prefer revert for shared/published history instead of reset-based rewriting. - Confirm target commit set and order before applying multi-commit reverts. ## Do not - Use hard reset here; this skill is commit-based undo only. - Push automatically; hand off to **`@git-push`** when the user wants to publish. - Revert unknown merge commits without confirming parent selection. ## On invoke *`@git-revert`* — Ask for commit hash/range (and merge parent when needed) if not explicitly provided. ## Verification - [ ] Target commit(s) and merge parent (if any) confirmed before revert. - [ ] Revert completed or abort path documented. - [ ] No automatic push (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 - For local-only discard workflows, use **`@git-reset`** instead. - For conflict handling during revert, use the same conflict discipline as **`@git-pull`** and complete the revert sequence.