Use for Graphite CLI stacked PRs workflow in repos with .git/.graphite_repo_config. Triggers: graphite, stacked PRs, dependent PRs, chained PRs, PR stack, gt create, gt modify, gt submit, gt sync, gt restack, gt log, gt checkout, gt up, gt down, rebase my stack, fix stack conflicts, split PR, land my stack, merge stack, sync with main/trunk, reorder branches, fold commits, amend stack, move branch to different parent, stack out of date, update my stack. For repos WITHOUT .git/.graphite_repo_config, use standard git commands instead.
Detects Graphite repos by `.git/.graphite_repo_config` and uses `gt` commands for stacked PR workflows. Automatically switches between Graphite and standard Git based on repo config.
/plugin marketplace add georgeguimaraes/claude-code-graphite/plugin install graphite@claude-code-graphiteThis skill inherits all available tools. When active, it can use any tool Claude has access to.
references/cheatsheet.mdreferences/conflict-resolution.mdIMPORTANT: This workflow applies ONLY to repositories with .git/.graphite_repo_config. For repositories without this file, use standard git commands (git commit, git push, etc.).
Check for .git/.graphite_repo_config to determine if a repo uses Graphite:
gt commands (this skill applies)git commands (this skill does NOT apply)When Graphite is detected, use gt commands instead of git for all commit and branch operations.
A Graphite MCP server may be available (check with /mcp). If the graphite MCP is connected, it provides tools to work with stacked PRs.
Before writing any code, present the stack structure and ask for confirmation.
When building a feature as a stack:
gt createPR Stack for [Feature]:
1. PR 1: [description] - [what it does]
2. PR 2: [description] - [what it does]
3. PR 3: [description] - [what it does]
IMPORTANT: Each PR must be atomic and pass CI independently. Verify this before committing.
Use these gt commands instead of their git equivalents:
| Instead of | Use | Purpose |
|---|---|---|
git commit | gt create -am "msg" | Create new branch/PR with changes |
git commit --amend | gt modify -a | Amend current PR |
git push | gt submit --no-interactive | Submit current + all downstack branches |
git pull | gt sync | Pull trunk, restack, clean merged |
git checkout | gt checkout <branch> | Switch branches |
git rebase | gt restack | Rebase stack (usually via gt sync) |
Use gt create -am "message" when:
Use gt modify -a when:
Use conventional commits with casual, concise descriptions:
feat:, fix:, chore:, docs:, refactor:, perf:, test:Write PR bodies that explain:
Keep descriptions casual, concise, and human-like. Avoid corporate speak or overly formal language.
Each PR in a stack must be:
Break large features into functional components:
Or use iterative stacking:
Move through the stack:
gt log # View full stack with PR status
gt ls # Abbreviated stack view
gt up # Move up one branch (toward tip)
gt down # Move down one branch (toward trunk)
gt top # Jump to top of stack
gt bottom # Jump to bottom of stack
gt checkout X # Switch to specific branch
Run gt sync regularly (at least daily) to:
When gt sync encounters conflicts, it pauses for resolution. See conflict resolution below.
Push changes with:
gt submit --no-interactive # Submit current + all downstack branches (recommended)
gt submit --stack # Submit current + all descendant branches
gt ss # Shorthand for --stack
Use --no-interactive to avoid prompts during submission.
When gt sync or gt restack hits conflicts:
gt log and review the changesAfter resolving:
gt continue -a # Stage all and continue restack
If stuck:
gt abort # Abandon restack, return to previous state
For detailed conflict resolution patterns, see references/conflict-resolution.md.
Adjust stack structure when needed:
gt move --onto <branch> # Move current branch to new parent
gt fold # Merge branch into its parent
gt split # Break branch into multiple
gt squash # Combine commits in branch to one
gt reorder # Interactively reorder branches
Work with others' stacks:
gt get <branch> # Fetch someone's stack locally
gt track <branch> # Start tracking existing git branch
See references/cheatsheet.md for a complete command reference.
gt sync # Get latest
gt create -am "feat: Add avatar upload API"
# ... verify it passes CI ...
gt create -am "feat: Add avatar display component"
# ... verify it passes CI ...
gt create -am "feat: Add avatar to user profile"
gt submit --no-interactive # Submit entire stack
gt checkout <branch-with-feedback>
# ... make fixes ...
gt modify -a # Amend changes
gt submit --no-interactive # Push updates (auto-restacks dependents)
gt sync # Pull, restack, clean
# Resolve any conflicts if prompted
gt continue -a # After resolving
This skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.