| name | gt-nav |
| description | Visualize your Graphite stack and navigate between its branches. Use when user says "show my stack", "where am I in the stack", "go up/down a branch", or "checkout the top of the stack". Not for restacking, syncing, or cleanup — use the gt-sync or gt-cleanup skill. |
| user-invocable | false |
What It Does
Visualizes your current Graphite stack and lets you navigate between
branches — jump to the top or bottom, move up/down, or check out a
specific branch by name. Optionally shows PR status for each branch in
the stack.
When to Use
- User says "show my stack", "where am I in the stack", "go up/down a
branch", or "checkout the top of the stack".
- Not for restacking, syncing, or cleanup — use the
gt-sync or
gt-cleanup skills instead.
Usage
Optional arguments:
--pr — Also show PR status for each branch
--top — Jump directly to the top of the stack
--bottom — Jump directly to the bottom of the stack
The argument text provided after the skill name (if any) is available as
context for this invocation.
Phase 1: Visualize Stack
1. Show Full Stack
gt log
2. Show Current Position
echo "Current branch: $(git branch --show-current)"
3. Show PR Status (if --pr is provided)
gt pr
4. Handle Direct Navigation Arguments
If --top was passed:
gt top
echo "Jumped to top: $(git branch --show-current)"
gt log short
Then show the stack and exit.
If --bottom was passed:
gt bottom
gt log short
Then show the stack and exit.
Phase 2: Interactive Navigation
If no direct navigation argument was given, present options using
AskUserQuestion. (AskUserQuestion is a Claude Code tool — on Codex, present
the same options as a numbered list in your reply and wait for the user's
answer; this applies to every AskUserQuestion mention in this skill.)
Ask: "Where do you want to go?"
Options:
- Go up — Move to the child branch (
gt up)
- Go down — Move to the parent branch (
gt down)
- Jump to top — Move to the top of the stack (
gt top)
- Jump to bottom — Move to the bottom of the stack (
gt bottom)
The user can also type a specific branch name via the "Other" option.
Execute Navigation
Based on the user's choice:
Go up:
gt up
Go down:
gt down
Jump to top:
gt top
Jump to bottom:
gt bottom
Specific branch (from "Other" input):
gt checkout -- "<branch-name>"
Show New Position
After navigating:
echo "Now on: $(git branch --show-current)"
gt log short
Success Criteria
- Stack is clearly visualized with current position highlighted
- PR status shown for context
- User can navigate up/down/top/bottom or to a specific branch
- New position confirmed after navigation