Claude Skills
CollectionsCompareWorkflowsNominate
Sign inSign up
© 2026 Curated Agent Skills·Learn more about Agent Skills
Back to repository

graphite-stacks

verified

This skill should be used when the user asks to "create a stack", "submit stacked PRs", "gt submit", "gt create", "reorganize branches", "fix stack corruption", or mentions Graphite, stacked PRs, gt commands, or trunk-based development workflows.

View on GitHub

Marketplace

outfitter

outfitter-dev/agents

Plugin

gt

Repository

outfitter-dev/agents
18stars

plugins/gt/skills/stacks/SKILL.md

Last Verified

February 1, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/outfitter-dev/agents/blob/main/plugins/gt/skills/stacks/SKILL.md -a claude-code --skill graphite-stacks

Installation paths:

Claude
.claude/skills/graphite-stacks/
Powered by add-skill CLI

Instructions

# Graphite Stacks

Trunk-based development with stacked PRs using Graphite CLI.

<when_to_use>

- Creating or managing branch stacks
- Submitting stacked PRs
- Reorganizing branch relationships
- Addressing PR feedback across a stack
- Recovering from stack corruption
- Any `gt` command usage

</when_to_use>

## Core Principle

**Use `gt` commands exclusively.** Mixing `git` and `gt` causes sync issues and divergent stacks. The only exception: `git add` for staging (or use `-a` flags).

## This, Not That

| Task | This | Not That |
| ---- | ---- | -------- |
| Create branch | `gt create 'name' -am "msg"` | `git checkout -b name` |
| Commit changes | `gt modify -acm "msg"` | `git commit -m "msg"` |
| Push to remote | `gt submit` | `git push` |
| Rebase stack | `gt restack` | `git rebase` |
| View stack | `gt status` or `gt ls` | `git log --graph` |
| Switch branches | `gt checkout` | `git checkout` |
| Amend commit | `gt modify -a` | `git commit --amend` |
| Multi-PR feedback | `gt top && gt absorb -a` | Cherry-pick commits manually |

## Stack Lifecycle

```
Create stack → Implement features → Submit PRs → Address feedback → Merge
     │              │                  │               │            │
     ▼              ▼                  ▼               ▼            ▼
 gt create     gt modify -acm     gt submit      gt absorb     gt sync
```

## Creating Stacks

```bash
# New branch with staged changes
gt create 'feature/step-1' -am "feat: first step"

# Continue stacking
gt create 'feature/step-2' -am "feat: second step"
gt create 'feature/step-3' -am "feat: third step"

# Insert branch between current and child
gt create 'feature/step-1.5' --insert -am "feat: inserted step"
```

## Navigation

| Command | Action |
| ------- | ------ |
| `gt up` | Move up the stack (toward children) |
| `gt down` | Move down the stack (toward parent) |
| `gt top` | Jump to stack top |
| `gt bottom` | Jump to stack bottom |
| `gt checkout` | Interactive branch picker |

## Modifying

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
3892 chars

Issues Found:

  • name_directory_mismatch