graphite Skill (Graphite): Stacked PRs With gt
Makes Claude create, navigate and submit stacked pull requests with Graphite's gt command line tool.
- Installs
- 10K
- on skills.sh
- Stars
- 7
- on GitHub
- Updated
- Feb 2026
- last repo commit
The graphite skill tells Claude how to work a stack of small pull requests with gt: create a branch per change, move up and down the stack, amend, reorder, re-parent, submit and update PR descriptions. It argues for many small, independently passing PRs and gives a branch naming pattern.
It triggers when you ask for stacked PRs or Graphite. It needs the gt CLI, a git repository and the GitHub CLI (gh). SKILL.md lists those commands as allowed tools, and it runs them in your repo. The repo is Graphite's own, and the skill is one file.
Good for
- Developers who already use Graphite for stacked PRs
- Engineers who want Claude to split a change into small atomic PRs
- Teams that need help fixing a stack after a rebase or conflict
Install graphite
Claude Code
- 1
Copy this prompt.
Install the graphite skill in Claude Code. Run this command: npx skills add https://github.com/withgraphite/agent-skills --skill graphite Then check that it loaded and tell me how to use it.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Requires Node.js.
This skill drives Graphite's gt command line tool, so install gt first (its docs offer Homebrew or npm) and sign in with your GitHub account. The skill folder alone does nothing without gt. It also runs gh pr commands, so install the GitHub CLI too. The skill is one file, SKILL.md, and bundles no scripts. It gets no Claude app upload route, because it runs local commands in a git repository.
From its listing on skills.sh. Source.
What's in the skill
When it loads
Work with Graphite (gt) for stacked PRs - creating, navigating, and managing PR stacks.
Sections in SKILL.md
- Quick Reference
- What Makes a Good PR?
- Branch Naming Conventions
- Creating a Stack
- Basic Workflow
- Handle Untracked Branches (common with worktrees)
- Navigating a Stack
- Modifying a Stack
- Amend Current Branch
- Reorder Branches
- Re-parent a Stack
- Rename a Branch
- Resetting Commits to Unstaged Changes
- Before Submitting
- Verify Stack is Rooted on Main
- Run Validation
Key facts
- Installs on skills.sh
- 9,977 (Nov 2, 2026)
- GitHub stars
- 7 (Nov 2, 2026)
- Last repo commit
- Feb 18, 2026
- What it includes
- 1 file, SKILL.md. No scripts.
What it includes
Creates a branch and commit for each PR in the stack
Runs code ·
gt createAmends the current branch with staged changes
Runs code ·
gt modifyMoves through the stack
Runs code ·
gt up / down / top / bottomShows the stack structure
Runs code ·
gt lsSubmits the stack for review
SKILL.md says to check the first branch is parented on main before running it.
Runs code ·
gt submit --no-interactiveRebases the stack on trunk
SKILL.md says it restacks every branch that needs it, not just yours.
Runs code ·
gt restackChanges a branch's parent, also used for untracked branches
Runs code ·
gt track --parentRenames the current branch or reorders branches in the stack
Runs code ·
gt rename / gt moveDeletes a branch from the stack even if not merged
Options --upstack and --downstack also delete children or ancestors.
Delete ·
gt delete -f -qAtomic, narrow, small PRs; more PRs are preferred over fewer
Read ·
PR size guidanceSets titles and bodies with gh pr edit --body-file, with Stack Context and Why
SKILL.md tells Claude to write the body to /tmp/pr-body.md first.
Runs code ·
PR descriptionsUses git rebase instead of gt restack in deeply nested stacks
Runs code ·
Surgical rebase
From the official docs
Permissions
Medium risk
The skill runs real git and Graphite commands in your repo, including rebases, branch pushes and branch deletes without a prompt. Our advice: let it work on a stack you can recover, and check branch names before any delete.
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only mode
Watch out for
It can force-delete branches
SKILL.md shows gt delete with -f and -q, which deletes a branch even if it is not merged, with no prompt. Add --upstack or --downstack and children or ancestors go too. Check the branch name before you let Claude run it. github.com
It rewrites history and pushes your branches
The skill runs git reset, git rebase and gt restack, then gt submit --no-interactive. Graphite's docs say gt submit pushes the stack's branches to GitHub from your machine. Work on a stack you can recover. github.com
Branch metadata goes to Graphite
Graphite's privacy docs say that when you call gt submit, the CLI pushes branches to GitHub and sends metadata about which branches were pushed to Graphite servers so they can open the PRs. graphite.dev
It edits PR titles and descriptions
After submitting, SKILL.md has Claude run gh pr edit with a title and a body file. It writes the body to /tmp/pr-body.md first. github.com
allowed-tools lists these commands
SKILL.md's allowed-tools field lists Bash(gt *), git add, reset, diff, status, stash, checkout, rebase, branch and gh pr. It bundles no scripts and no hooks. github.com
Technical details
| Turning on read-only | No read-only switch. |
|---|---|
| Talks to | graphite.dev (gt CLI, metadata on submit). github.com (git push and gh pr) |
| Sign-in and keys | gt authenticates with your GitHub account through a token from app.graphite.com/activate (Graphite docs). |
| Scopes |
|
Questions
What does the graphite skill do?
It makes Claude work with Graphite's gt CLI to create, navigate and manage stacks of pull requests. It covers branch naming, submitting, PR descriptions and fixing stacks.
How do I install it?
Use the install box at the top. Install the gt CLI first, since the skill folder does nothing without it. The box lists the Homebrew and npm commands from Graphite's docs.
Do I need a Graphite account?
Graphite's docs say you must authenticate the gt CLI with your GitHub account to create or update pull requests. They give the sign-in steps at app.graphite.com/activate.
Is it official?
Yes, it is the vendor's own repo. It lives in withgraphite/agent-skills under the Graphite GitHub organization, whose description reads "Code review for the age of AI".
Should I use gt restack or git rebase?
SKILL.md says to use git rebase when you only want to update specific branches or gt restack hits conflicts in unrelated branches. It explains that gt restack touches all branches that need it.
Does it work in Claude app or Codex?
The install box covers Claude Code, Codex and the skills CLI. There is no Claude app upload route, because the skill runs gt and git commands in a local repository.
Is it safe?
It runs git, gt and gh commands in your repository, including rebases, pushes of your branches and forced branch deletes. Our advice: use it on a repo with a clean working tree, and read the permissions list below first.
Information
updated Nov 2, 2026
- Repository
- withgraphite/agent-skills
- Folder
skills/graphite
Sources
Docs, issue trackers and discussions this page is built from.
Show all 5Hide
- graphite SKILL.md · github.com
- Graphite docs: install and authenticate the CLI · graphite.dev
- Graphite docs: privacy and security · graphite.dev
- agent-skills README · github.com
- skills.sh listing · skills.sh