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★ 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:
- references/collaboration-boundaries.md
- references/mode-selection-and-command-packets.md
- references/recovery-patterns.md
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:
- branch-and-stage hygiene — branch creation/switching, staging, stash-or-clean decisions
- commit-shaping — amend, fixup, reword, interactive rebase, cleaner review units
- sync-with-base — fetch + merge/rebase choice when the branch must catch up
- conflict-resolution — merge/rebase already produced conflicts; the next safe loop matters most
- push-safety — upstream setup, rejected pushes, diverged branches, rewrite-safe pushes
- 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 statusgit branch --show-currentgit log --oneline --decorate -5
Core rules:
- Prefer
git add -por 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 revertover a hard reset when the bad commit is already shared. - Prefer
git reflogand 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
Установить git-workflow в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
BashReadWriteEditGlobGrepВложенные файлы
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), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic