How this command is triggered — by the user, by Claude, or both
Slash command
/graphite-workflow:gt-modify-upstackThe summary Claude sees in its command listing — used to decide when to auto-load this command
## Context - Current branch: !`git branch --show-current` - Current stack: !`gt log short` - Unstaged changes: !`git diff --stat` - Staged changes: !`git diff --cached --stat` ## Your Task Address feedback or make changes to the current branch, amending the commit and automatically restacking dependent branches. ### Step 1: Verify Current Location Check which branch needs modification: If not on the correct branch: ### Step 2: Make the Changes Edit files as needed based on feedback or requirements. ### Step 3: Stage Changes ### Step 4: Amend Commit Execute modification: **W...
git branch --show-currentgt log shortgit diff --statgit diff --cached --statAddress feedback or make changes to the current branch, amending the commit and automatically restacking dependent branches.
Check which branch needs modification:
gt log # See stack structure
git branch --show-current # Confirm current branch
If not on the correct branch:
gt checkout branch-with-feedback
# or navigate with: gt up / gt down
Edit files as needed based on feedback or requirements.
# Stage all changes
git add .
# Or stage specific files
git add path/to/file.ts
Execute modification:
# Amend existing commit (most common)
gt modify -a
# Or create new commit instead of amending (if substantial new work)
# gt modify -cam "New functionality added"
What happens:
If dependent branches have conflicts after restacking:
Navigate to conflicted branch:
gt up # Move to next branch upstack
Resolve conflicts:
Stage and resolve:
git add .
gt modify # Resolves conflicts for this level
Continue upstack:
gt up # Move to next dependent
# Repeat if more conflicts
If PRs exist, update them:
# Update all PRs in stack
gt submit --stack --update-only
# Or just current PR
gt submit -u
# Make the requested changes
# (edit files)
# Stage and amend
gt modify -a
# Update PR
gt submit -u
# Navigate to the PR with feedback
gt checkout downstack-pr # or gt down
# Make changes
gt modify -a
# Return to where you were
gt checkout - # or gt up
# Everything upstack was automatically restacked!
# Make changes
# Stage changes
git add .
# Create new commit (don't amend)
gt modify -cam "Add validation tests"
# This adds to the branch without changing existing commit
# Amend just the message
gt modify -m "Better commit message"
# Or amend message and changes
git add .
gt modify -am "Better message with changes"
# Currently on PR 3, bug is in PR 1
# Navigate down
gt down
gt down
# Fix bug
# (edit files)
gt modify -a
# Navigate back up
gt up
gt up
# PRs 2 and 3 were automatically restacked with the fix!
Use gt modify -a (amend) when:
Use gt modify -cam "msg" (new commit) when:
Rule of thumb: If the new code is directly related to the PR's purpose, amend. If it's additional scope, new commit.
-a, --all - Stage all changes before modifying-c, --commit - Create new commit instead of amending-m, --message - Specify commit message--no-edit - Keep existing commit message-a flag used)-c)This is much better than manual git commit --amend because it handles the entire stack automatically.
Report to user:
✅ Commit modified successfully!
[Show what changed]
[If dependent branches exist:]
Dependent branches automatically restacked:
- branch-2 (restacked on updated branch-1)
- branch-3 (restacked on updated branch-2)
...
[If conflicts occurred:]
Resolved conflicts in: [list]
[If PRs exist:]
Run `gt submit --stack -u` to update all PRs.
Current stack:
[show gt log output]
npx claudepluginhub stoke-gh/max-skill-market --plugin graphite-workflow/amendAmends the most recent commit with staged changes or message update, verifies safety and push status, outputs commit hash, message, files changed, and force-push requirement.
/update-githubCommits uncommitted changes using Conventional Commits format, stages files, and pushes to GitHub remote. Supports --amend, --no-verify, and custom messages.
/amendSafely amends the last unpushed commit: checks remote status, stages changes, optionally updates message, shows result. Refuses pushed commits.
/commitStages relevant files individually and commits local git changes with a concise, conventional commit message. Handles fixup commits for errors and retries failed pre-commit hooks.