glab-stack
БесплатноБез исполняемых скриптовНе проверенManage stacked merge requests for complex multi-part changes. Use when creating dependent MRs, reordering or syncing a stack, recovering a conflicted reorder…
от vince-winkintel★ 51 звезда на GitHubОб этом скилле
glab stack
Templates for new stack merge requests
Requires glab v1.132.0 or later for the behavior in this section. This is a source-backed summary; retained help captures keep their original immutable version and are not v1.132.0 binary verification.
stack sync --template <name-or-path> prepends a template to each new MR description and appends that diff's commit body, separated by a blank line. Existing MR descriptions are not replaced. A name, optionally ending in .md, is loaded locally from .gitlab/merge_request_templates/; an absolute path or one containing a separator is read as a file. This is local template selection, unlike MR/issue create with a repository override.
--skip-push or --skip-mr-creation warns and ignores the template, including a missing one. Otherwise template loading fails before sync when missing or unreadable. Review template contents and approve the stack's existing push/rebase/MR changes before sync; the template flag is not a preview mode.
Source: stack_sync.go.
Non-interactive infer and reorder
Use glab stack infer --all <base-branch>..HEAD to include every commit without an editor. Without a TTY, --all is required; if creating a stack, also supply --name. When a stack is already active, inference still appends to it and ignores --name.
Pass every stack branch exactly once, in the desired order, to glab stack reorder <branch>... for non-interactive reordering. Do not use invented --order or --yes flags. Explicit order cannot be combined with --continue or --abort. This still rebases branches and retargets moved MRs remotely: approve those writes first. It does not push branches; later sync/force-push needs its own approved scope. Existing clean-worktree and conflict-recovery requirements remain in force.
Worktree-local selection
The current stack selection is tracked per Git worktree. Select and inspect the intended stack from the worktree where you will operate; switching stacks in one worktree does not select that stack in another. Stack data and repository refs can still be shared, so this does not remove the need to review destructive or publishing actions.
Overview
A stack is a series of small, dependent merge requests delivering one feature. Locally, each diff is one commit on its own branch, based on the preceding diff's branch. Sync creates an MR targeting the preceding branch; the first diff targets the base branch.
Stack commands operate on the stack last created or switched to, regardless of the currently checked-out branch. Inspect that active stack before a mutation. This feature remains experimental. See references/commands.md for complete checksum-verified parent/subcommand help, including current terminology and examples.
Quick start
glab stack --help
Current behavior
Generated stack branches use {branch_prefix}-{stack-title}-{hash}. If branch_prefix is unset, glab uses the operating system account username (and removes a Windows domain prefix), falling back to glab-stack only when user lookup is unavailable. It does not rely on $USER; set glab config set branch_prefix <value> when automation requires a stable explicit prefix.
glab stack infer <revision-range> creates or appends stack layers from selected commits in a Git revision range. The start of the range must resolve to a branch name, not a relative ref such as HEAD~5, because the base branch is recorded in stack metadata.
# Infer stack layers from commits between main and the current branch
glab stack infer main..HEAD
# Infer from a feature branch that diverged from develop
glab stack infer develop..HEAD
# If no stack is active, create one with a specific name
glab stack infer --name feature-stack main..HEAD
When a stack is active, infer appends to that stack and ignores --name. Inspect the active stack first; use glab stack create or glab stack switch to select a different destination before inferring unrelated work.
glab stack sync supports --update-base, --assignee, --label, --reviewer, --skip-mr-creation, and --skip-push, plus --template with glab v1.132.0 or later.
# Sync stack and rebase onto the latest base branch
glab stack sync --update-base
# Sync/push existing stack work without opening MRs for branches that do not have one yet
glab stack sync --skip-mr-creation
# Fetch and rebase the stack locally without pushing branches or creating MRs
glab stack sync --skip-push
# Sync stack and set MR metadata during submission
glab stack sync --assignee @owner --reviewer @reviewer --label backend
# Multiple reviewers can be repeated or comma-separated
glab stack sync --reviewer user1 --reviewer user2
glab stack sync --reviewer user1,user2
Use --update-base when the base branch (for example main) has m
Установить glab-stack в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл glab-stack?
Manage stacked merge requests for complex multi-part changes. Use when creating dependent MRs, reordering or syncing a stack, recovering a conflicted reorder, or deleting local stack metadata. Triggers on stack, stacked MRs, dependent MRs, MR stack, stacked changes, stack delete, stack reorder.
Как установить скилл glab-stack?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл glab-stack запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic