git-spice

Manage stacked Git branches and submit batch PRs via git-spice CLI.

3|1|Updated Dec 3, 2025
One-click install
npx skills add https://github.com/nsheaps/ai-mktpl --skill git-spice
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-spice
Source: https://github.com/nsheaps/ai-mktpl/tree/main/plugins/git-spice/skills/git-spice
Command: npx skills add https://github.com/nsheaps/ai-mktpl --skill git-spice

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires gs, gh, jq, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Manages the complexity of stacked feature branches and their associated change requests so developers and agents can create, rebase, and submit multi-branch stacks without manually coordinating rebases, force-pushes, or PR linkage breakage.

Core Features & Use Cases

  • Stacked branch management: Track parent-child branch relationships, create new stacked branches, and view stack topology.
  • Automatic restacking and commits: Commit and amend operations propagate restacks to upstack branches to keep stacks consistent.
  • Batch submit and sync: Submit or update PRs across an entire stack, detect merged branches, and reconcile squash-merge commits.
  • Worktree and multi-agent workflows: Support for parallel work with worktrees, coordinated restack patterns, and guidance for agent-safe submission.
  • Use case: Break a large feature into ordered parts, assign each part to different agents or teammates, restack after upstream changes, and submit the stack so each part has its own PR in correct dependency order.

Quick Start

Create a stacked feature series, commit with git-spice so upstack branches are restacked, then submit the stack and return the PR URLs.

Frequently Asked Questions about git-spice

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage stacked Git branches and their pull requests efficiently?

Managing stacked Git branches involves tracking parent-child branch relationships, automatically restacking upstack branches after upstream commits, and batch submitting dependent PRs to maintain correct dependency order without manual rebase coordination.

What is the best way to restack dependent feature branches after upstream changes?

Restacking dependent feature branches is handled automatically by propagating commit and amend operations upstack, ensuring that all child branches remain consistent with their parent branches without requiring manual force-pushes or rebase sequencing.

Can I use git-spice to submit multiple PRs in a stacked branch series?

Yes, you can batch submit and sync pull requests across an entire stacked branch series, automatically detecting merged branches and reconciling squash-merge commits to keep the stack topology valid across the repository.

Do I need a specific Git version and CLI setup to manage stacked branches with git-spice?

You need Git 2.38 or higher, the git-spice (gs) CLI installed and authenticated, and a gs-initialized repository to perform automated restacks, commits, and batch PR submissions for stacked branch workflows.

How do Git worktrees work with stacked branches in multi-agent environments?

Git worktrees support parallel work in multi-agent environments by enabling coordinated restack patterns and agent-safe submission, allowing different agents or teammates to work on separate parts of a feature stack simultaneously.

Why does stacked branch PR linkage break during rebases and how can I prevent it?

Stacked branch PR linkage breaks during manual rebases due to force-pushes and parent-child divergence; using an automated stacked branch manager prevents this by propagating restacks across the stack topology safely.