skillZs
★ LIVE SKILL TAGS ★
>>> LIVE SKILLS INDEX <<<
* OPEN SOURCE *
NO LOGIN, NO TRACKING
※ REAL INSTALL DATA ※
← back to all skills
outfitter-dev/agents82 installs

graphite-stacks

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.

How do I install this agent skill?

npx skills add https://github.com/outfitter-dev/agents --skill graphite-stacks
view source ↗

Is this agent skill safe to install?

  • Gen Agent Trust Hubpass

    This skill provides a comprehensive guide for using the Graphite CLI (gt) to manage stacked pull requests. It contains no malicious code, remote downloads, or suspicious commands, and focuses entirely on legitimate version control workflows and stack maintenance.

  • Socketpass

    No alerts

  • Snykpass

    Risk: LOW · No issues

  • Runlayerwarn

    3/3 files flagged

  • ZeroLeakspass

    Score: 93/100 · 2 sections analyzed

What does this agent skill do?

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

TaskThisNot That
Create branchgt create 'name' -am "msg"git checkout -b name
Commit changesgt modify -acm "msg"git commit -m "msg"
Push to remotegt submitgit push
Rebase stackgt restackgit rebase
View stackgt status or gt lsgit log --graph
Switch branchesgt checkoutgit checkout
Amend commitgt modify -agit commit --amend
Multi-PR feedbackgt top && gt absorb -aCherry-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

# 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

CommandAction
gt upMove up the stack (toward children)
gt downMove down the stack (toward parent)
gt topJump to stack top
gt bottomJump to stack bottom
gt checkoutInteractive branch picker

Modifying Branches

# Amend current branch (stages all)
gt modify -a

# New commit within same branch
gt modify -acm "fix: address review feedback"

# Commit to a different branch in the stack
git add path/to/file.ts
gt modify --into target-branch -m "feat: add file"
<rules>

ALWAYS:

  • Use gt create for new branches
  • Use gt modify for commits
  • Use gt submit to push
  • Use gt restack after parent changes
  • Check gt status when uncertain

NEVER:

  • Mix git commit/push/rebase with gt workflows
  • Force push without understanding stack state
  • Use git rebase -i (breaks Graphite metadata)
</rules>

Addressing Review Feedback

Single PR: Navigate to branch, modify directly

gt checkout target-branch
gt modify -acm "fix: address review comment"
gt submit

Multiple PRs in stack: Use absorb from top

gt top
git add .
gt absorb -a
gt submit --stack

Graphite routes changes to correct branches based on file history.

Reorganizing Stacks

# Move branch to different parent
gt move --onto new-parent

# Move specific branch
gt move --source branch-name --onto target

# After reorganization
gt restack

Submitting

# Current branch + downstack
gt submit

# Entire stack
gt submit --stack

# Non-interactive (automation)
gt submit --no-interactive

Stack Visualization

# JSON with parent relationships (preferred for scripts)
gt status

# Visual tree
gt ls

# Recent history
gt log

Sync and Maintenance

# Pull trunk, rebase stacks, clean merged
gt sync

# Rebase branches onto updated parents
gt restack

# Undo last gt operation
gt undo

When Things Go Wrong

Stack corruption symptoms:

  • Branches appear as siblings instead of parent-child
  • PRs contain wrong files
  • gt status shows unexpected structure

See recovery.md for step-by-step recovery procedures.

<references> </references>

Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.

<a href="https://skillzs.dev/skills/outfitter-dev/agents/graphite-stacks">View graphite-stacks on skillZs</a>