Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

git-workflow

БесплатноБез исполняемых скриптовНе проверен

Route local Git work into the safest next move: branch hygiene, selective staging, commit cleanup, merge-vs-rebase choice, conflict resolution, lease-safe…

akillnessот akillness★ 63 звезды на GitHub

Об этом скилле

Git Workflow

Use this skill as the repo's routing-first local Git collaboration and recovery anchor.

The job is not to teach all of Git. The job is to:

  • identify the current local Git state quickly,
  • choose one safe workflow mode,
  • recommend the smallest reversible fix that solves the problem,
  • keep boundaries to review, debugging, planning, and hosted PR workflows explicit.

Read these references when the case gets sharp-edged or the user needs more than the brief:

If the main need is:

  • reviewing a diff for correctness, architecture, or security → route to code-review
  • reproducing or diagnosing a bug/regression → route to debugging
  • planning tasks, acceptance criteria, or sprint slices → route to task-planning
  • Aider 기반 AI pair-programming 편집 루프 운영 → route to aider-cli-workflow
  • hosted PR lifecycle, branch protection, reviewers, labels, or repo settings → use a dedicated PR/repo-management workflow

When to use this skill

  • Create, rename, or clean up a branch before coding or review
  • Stage changes selectively and shape reviewable commits
  • Decide whether to merge or rebase onto an updated base branch
  • Resolve merge/rebase conflicts safely
  • Push a branch, set upstream, or update rewritten history with --force-with-lease
  • Recover from a bad reset, wrong-branch commit, detached HEAD, dropped commit, or messy rebase
  • Prepare a clean diff before a later PR or review step

When not to use this skill

  • The real question is whether the code or architecture is good
  • The real question is how to split or sequence the work
  • The real question is root cause, not Git mechanics
  • The real question is hosted-service workflow instead of local repository state
  • The user wants a giant Git tutorial instead of the next safe move

Instructions

Step 1: Normalize the local Git intake

Classify the request before suggesting commands.

git_intake:
  current_goal: branch-setup | commit-shaping | sync-with-base | conflict-resolution | push-safety | undo-recovery | history-inspection | unknown
  branch_state: clean | has-unstaged-changes | staged-only | ahead-of-origin | behind-origin | diverged | detached-head | unknown
  collaboration_risk: solo-branch | shared-branch | unknown
  remote_context: no-remote | origin-only | fork-plus-upstream | unknown
  trigger_event:
    - need-clean-commits
    - rebased-branch
    - merge-conflict
    - wrong-branch-commit
    - accidental-reset
    - rejected-push
    - lost-commit
    - prepare-for-review
    - sync-main
    - unclear
  preferred_history: keep-linear | preserve-merge-context | unknown
  confidence: high | medium | low

If the packet is incomplete, choose the safest reasonable next move and state the assumptions.

Step 2: Choose one primary workflow mode

Pick exactly one mode:

  1. branch-and-stage hygiene — branch creation/switching, staging, stash-or-clean decisions
  2. commit-shaping — amend, fixup, reword, interactive rebase, cleaner review units
  3. sync-with-base — fetch + merge/rebase choice when the branch must catch up
  4. conflict-resolution — merge/rebase already produced conflicts; the next safe loop matters most
  5. push-safety — upstream setup, rejected pushes, diverged branches, rewrite-safe pushes
  6. undo-and-recovery — reset/rebase/amend/checkout/branch deletion went sideways; rescue first

Step 3: Use the safety ladder

Always prefer these checks before irreversible actions:

  • git status
  • git branch --show-current
  • git log --oneline --decorate -5

Core rules:

  • Prefer git add -p or explicit staging when commit boundaries matter.
  • Prefer amend or interactive rebase only on local or safely rewritable history.
  • Prefer rebase when the branch is mostly yours and a cleaner review history helps.
  • Prefer merge when the branch is shared or preserving integration context matters more than linear history.
  • Prefer lease-protected pushes (--force-with-lease), never unguarded force-pushing, after intentional history rewrites.
  • Prefer git revert over a hard reset when the bad commit is already shared.
  • Prefer git reflog and a rescue branch before panic cleanup.

Step 4: Apply the decision ladder

Use these callouts explicitly:

Merge vs rebase

  • Use rebase when rewrite risk is low and reviewable linear history matters.
  • Use merge when the branch is shared, integration context matters, or rewrite risk is not worth it.

Revert vs reset

  • Use revert for collaborative undo on already-pushed history.
  • Use reset only when rewriting local history intentionally.
  • Use restore / checkout of files when the worktree/index needs repair more than the branch history.

Normal

Полный SKILL.md на GitHub

Установить git-workflow в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Bash
Read
Write
Edit
Glob
Grep

Вложенные файлы

SKILL.toonevals/evals.jsonreferences/collaboration-boundaries.mdreferences/mode-selection-and-command-packets.mdreferences/recovery-patterns.md

FAQ

Что делает скилл git-workflow?

Route local Git work into the safest next move: branch hygiene, selective staging, commit cleanup, merge-vs-rebase choice, conflict resolution, lease-safe pushes, and recovery from resets or bad history edits. Use when the user needs help preparing a branch, cleaning up commits, syncing with an updated base, resolving local Git conflicts, pushing rewritten history safely, recovering lost commits, or getting a diff ready for review. Not for hosted PR review, repo administration, or sprint planning.

Как установить скилл git-workflow?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл git-workflow запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить git-workflow с