From graphite-workflow
Create a new Graphite stack with proper structure and stacking pattern
How this command is triggered — by the user, by Claude, or both
Slash command
/graphite-workflow:gt-create-stackThe summary Claude sees in its command listing — used to decide when to auto-load this command
## Context - Current git status: !`git status` - Current git diff (all changes): !`git diff HEAD` - Current branch: !`git branch --show-current` - Current stack structure: !`gt log short 2>/dev/null || echo "Not in Graphite repo or no existing stack"` ## Your Task Based on the current changes and context, create a Graphite stack following these steps: ### Step 1: Analyze Changes Review the git diff and determine: 1. What feature/work is being implemented 2. How to logically split it into independent, reviewable pieces 3. Estimate LOC for each piece (target: under 200 LOC per PR) ### S...
git statusgit diff HEADgit branch --show-currentgt log short 2>/dev/null || echo "Not in Graphite repo or no existing stack"Based on the current changes and context, create a Graphite stack following these steps:
Review the git diff and determine:
Select the appropriate framework:
Explain to the user:
I'll create a stack of X PRs:
1. [Name] (~Y LOC) - [What it does]
2. [Name] (~Z LOC) - [What it does]
...
This uses the [Framework Name] pattern because [reason].
Execute the following workflow:
Ensure starting from correct base:
gt log # Show current position
# If needed: gt bottom (to start from trunk) or gt checkout base-branch
Create first branch with initial changes:
# Stage appropriate files for first piece
git add <files-for-first-piece>
gt create -m "First piece: descriptive title"
Continue building upstack immediately:
# Stage files for second piece
git add <files-for-second-piece>
gt create -m "Second piece: descriptive title"
# Repeat for each piece
Show final stack structure:
gt log
Optionally submit (ask user first):
Would you like me to submit this stack now with `gt submit --stack`?
Full-stack feature:
gt create -am "Add database migration for [feature]"
gt create -am "Add backend service for [feature]"
gt create -am "Add API endpoints for [feature]"
gt create -am "Add UI components for [feature]"
gt create -am "Add integration tests for [feature]"
Bug fix with refactor:
gt create -am "Refactor: extract [code] for clarity"
gt create -am "Fix: [specific bug]"
gt create -am "Test: add regression test for [bug]"
Dependency upgrade:
gt create -am "Upgrade [package] to v[X]"
gt create -am "Migrate to new [package] API"
gt create -am "Optimize using new [package] features"
Report to user:
✅ Created stack of X branches:
- branch-1: [title] (~Y LOC)
- branch-2: [title] (~Z LOC)
...
Stack structure:
[show gt log output]
Next steps:
- Review the changes in each branch
- Run `gt submit --stack` to create PRs when ready
- Or continue building upstack with `gt create -am "next piece"`
npx claudepluginhub stoke-gh/max-skill-market --plugin graphite-workflow/linear-task-and-pr-from-changesCreates Linear task from local changes, creates git branch (optionally worktree), commits, and publishes GitHub PR. Supports Graphite.