Glab Stack logo

Glab Stack

Community
vince-winkintel
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.

Overview

Publishervince-winkintel
Repositorygitlab-cli-skills
Skill nameglab-stack
Stars
50
Forks
6
Bundled files
1
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by vince-winkintel on GitHub. Read the source before you install it.

Installation

Install the Glab Stack AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/vince-winkintel/gitlab-cli-skills/tree/main/glab-stack
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/vince-winkintel/gitlab-cli-skills.git /tmp/gitlab-cli-skills
mkdir -p .claude/skills
cp -r /tmp/gitlab-cli-skills/glab-stack .claude/skills/glab-stack
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Glab Stack in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Glab Stack on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Glab Stack is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

glab stack

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

bash
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.

bash
# 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.

bash
# 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 moved and you want to rebase the entire stack before pushing.

Use --skip-mr-creation when you want to push amended stack branches and clean up merged entries but intentionally avoid opening new merge requests for stack layers that do not have one yet. Diffs whose merge requests are closed are kept in the stack.

Use --skip-push when you want to fetch and rebase the stack locally without pushing branches or creating merge requests. This is not an offline mode: glab still fetches from the remote and calls the GitLab API. Review the rewritten local history before a later push.

Use --assignee, --reviewer, and --label when you want glab stack sync to submit the stack's merge requests with ownership and routing metadata in the same step.

During stack sync pushes, glab streams Git hook output to stdout/stderr as it runs. Preserve that output in automation logs: a failing pre-push hook is returned as the push error instead of being hidden behind buffered output.

glab stack switch can now be run without a stack name to choose interactively from all stacks. Pass the stack name for non-interactive automation.

glab stack amend supports --reword to update only the stacked commit message without staging files. It cannot be combined with file arguments or --all; pass -m/--message or -d/--description, or let glab open the editor.

bash
glab stack amend --reword -m "updated commit message"

glab stack amend and glab stack save support --no-verify to bypass local pre-commit and commit-msg hooks for the underlying Git commit. Treat it like git commit --no-verify: use only when the skipped hooks are understood and intentionally bypassed.

Reorder and recovery

glab stack reorder opens the current stack order in an editor, rebases each branch onto its new parent, and retargets moved merge requests on GitLab. It does not push branches, but it is a remote-write operation, not a dry run; approve MR target changes before running it. Run glab stack sync after reviewing the rewritten history to force-push the rebased branches.

bash
glab stack reorder

# After resolving a rebase conflict and running git rebase --continue
glab stack reorder --continue

# Restore the original branch order instead
glab stack reorder --abort

Do not start another reorder while a reorder rebase is in progress. Resolve and continue, or abort, before retrying. Preserve the conflict and rebase output in automation logs.

Delete local stack metadata

bash
# Choose a stack interactively
glab stack delete

# Delete a named stack after confirmation
glab stack delete <stack-name>

# Approved non-interactive deletion
glab stack delete <stack-name> --yes

Deletion removes only the stack's local stacked-metadata directory. It does not delete branches, commits, or merge requests. Verify the stack name and repository before --yes, then confirm the named directory is absent under $(git rev-parse --git-common-dir)/stacked/. This read-only check works for both ordinary checkouts and linked worktrees; glab stack list only lists layers in the current stack and cannot verify that a different stack was deleted.

Subcommands

  • create: Create and activate a new stack.
  • switch: Select a different active stack.
  • infer: Add diffs from a Git revision range to the active stack, or create a stack if none is active.
  • save: Save changes as a new diff.
  • amend: Save changes to an existing diff.
  • list: List all diffs in the active stack.
  • first: Move to the first diff.
  • last: Move to the last diff.
  • next: Move to the next diff.
  • prev: Move to the previous diff.
  • move: Move to a specific diff.
  • reorder: Rebase the reordered diffs and retarget moved MRs on GitLab without pushing branches.
  • sync: Push the stack and create or update its merge requests, subject to the skip flags above.
  • delete: Delete local stack metadata, not branches, commits, or MRs.

See references/commands.md for full --help output.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Glab Stack AI skill do?

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.

Why use Glab Stack on TypingMind?

Because you install it once and use it with any model. Glab Stack is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Glab Stack in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/vince-winkintel/gitlab-cli-skills/tree/main/glab-stack. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Glab Stack?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Glab Stack?

As many as you like. As long as a model supports skills, you can use Glab Stack with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Glab Stack AI skill free?

Yes. It is published on GitHub by vince-winkintel under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇