Awesome-omni-skill gt-stack
Analyze changes and organize them into a Graphite stack of logically isolated PRs
install
source · Clone the upstream repo
git clone https://github.com/diegosouzapw/awesome-omni-skill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/diegosouzapw/awesome-omni-skill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/cli-automation/gt-stack" ~/.claude/skills/diegosouzapw-awesome-omni-skill-gt-stack && rm -rf "$T"
manifest:
skills/cli-automation/gt-stack/SKILL.mdsource content
Analyze the current changes and organize them into a Graphite stack of logically isolated branches, each becoming its own PR.
Steps
Phase 1: Assess
- Run
to see the current stack stategt ls - Run
to see staged, unstaged, and untracked filesgit status - Run
andgit diff --stat
for an overviewgit diff --staged --stat - Run
andgit diff
to read the actual diffsgit diff --staged - If $ARGUMENTS contains
, also runcommits:N
andgit log --oneline -Ngit diff HEAD~N..HEAD - Run
to understand the commit stylegit log --oneline -5
Phase 2: Propose a split plan
- Group changes into logically isolated units. Each unit should:
- Touch a single concern (one feature, one fix, one refactor)
- Be independently reviewable
- Have a clear conventional commit message
- Present the plan (bottom → top):
Proposed stack (bottom → top): 1. feat(scope): description — files: path/to/file.lua 2. fix(scope): description — files: path/to/other.zsh - Ask the user to confirm, modify, or reorder before proceeding
Phase 3: Execute the stack
- For each entry (bottom to top):
- Stage the specific files with
git add <file> - Run
gt create <branch-name> -m "type(scope): description" - Verify with
gt ls
- Stage the specific files with
- Show the final stack with
gt ls
Phase 4: Optional submit
- Ask if the user wants to submit the stack as PRs
- If yes:
(orgt submit --stack
for drafts)gt submit --stack --draft - Output the stack summary
Handling commits:N
When reorganizing existing commits:
- Ensure working tree is clean (stash if needed)
- Use
to decomposegt branch split --by-commit - Always show a dry-run plan and get explicit confirmation
Rules
- NEVER run
without explicit user confirmationgt submit - NEVER use
orgit add .
— always add specific filesgit add -A - ALWAYS present the split plan and wait for confirmation before creating branches
- ALWAYS use conventional commits: feat, fix, chore, docs, refactor, test
- ALWAYS end commit messages with:
Co-Authored-By: Claude <noreply@anthropic.com> - If the working tree is dirty and there is an existing stack, warn before modifying
- If
is not installed, suggest:gtbrew install withgraphite/tap/graphite - Prefer smaller, focused branches — that's the whole point of stacking
- When unsure how to split, ask the user