git-reset
General↓ 0 installsUpdated 12d ago
Curatedgardusig
>-
SKILL.md preview
--- name: git-reset description: >- Stay on current branch; fetch --all; align to $TARGET (tracking/upstream/origin) via reset --hard + git clean after confirm. No stash. No push. No merge main—use @git-pull. Leaf: no hand-off to other git-* / gh-*. --- **Normative workflow:** [`read-workflow-workflows`](../../internal/read/workflow/workflows/SKILL.md#git-reset-align-workflow). # Reset (stay on branch → keep or trash → discover → confirm → reset → clean) Normative fences / full matrix: [`write-workflow-working-tree-align`](../../internal/write/workflow/working/tree/align/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-commit`](../commit/SKILL.md) | Preserve work before hard align | | **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-workflow-working-tree-align` | See linked library | | `read-safety-structured-qa` | 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_RESET=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-reset-align-workflow)** **in order** (validate tree, stay on branch, fetch, resolve **`$TARGET`**, align, verify). - Resolve **`$TARGET`** from local refs, tracking refs, or explicit origin refs provided by the user. - Dirty tree and **hard reset / clean**: **[`write-workflow-working-tree-align`](../../internal/write/workflow/working/tree/align/SKILL.md)** (**§1–§4**, **`MODE=split`**, **`ALIGN_REF="$TARGET"`**). Optional non-git prunes: that library **§5**. Prompts per **[`read-safety-structured-qa`](../../internal/read/safety/structured-qa/SKILL.md)**. - **Recommendation:** use a high-reasoning model for conflict-prone cleanup decisions. ## Do not - **Stash**—preserve work by commit, abort, or confirmed destroy only. - **`@git-push`**, merge **`main`** into branch—use **`@git-pull`** / **`@git-push`** for that. - Align (**hard reset**, **clean**, container prunes) **without** user confirmation after showing impact. **Leaf:** does **not** hand off to other **`gh-*`** skills. ## On invoke *`@git-reset`* — **Do not** run destructive align steps without **user confirmation** after you show what will happen. **Never** use **stash** in this skill. ## Verification - [ ] **TARGET** ref and impact preview shown before reset/clean. - [ ] Explicit confirmation before destructive align. - [ ] No push from this skill. ## 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`**. ## Not …