Create a Graphite stacked diff and submit as PR in one step
Creates a stacked diff from current changes and immediately submits it as a pull request.
/plugin marketplace add DataflightSolutions/claude-plugins/plugin install graphite@dataflight-claude-pluginsCreate a stacked diff from current changes and immediately submit it as a pull request. This combines /graphite:create and /graphite:submit into a single workflow.
Use this command when:
For iterative work where you want to create multiple diffs before submitting, use /graphite:create instead.
Each diff should represent exactly one logical change. Before creating the diff, consider:
If the changes span multiple unrelated concerns, consider splitting them into separate diffs.
Execute these steps in order. Stop and report errors if any step fails.
git rev-parse --is-inside-work-tree
If this fails, tell the user: "Not in a git repository. Navigate to a git repo first."
gt --version
If this fails, tell the user: "Graphite CLI not found. Install with: npm install -g @withgraphite/graphite-cli@latest"
git status --short
If output is empty, tell the user: "No changes to commit." and stop.
git diff --stat
Note the files changed count and line changes for the summary.
git diff
git diff --staged
git log -5 --oneline
Write a commit message following these rules:
Subject line:
type(scope): descriptionBody (if needed):
Footer (required):
Co-Authored-By: Claude Code
gt create --all -m "<commit_message>"
If this fails, show the error and stop. Do not proceed to submit.
gt submit
This pushes the branch and creates the pull request.
After successful completion, report:
Example output format:
Diff created and PR submitted.
Branch: feature/auth-token-handling
Commit: fix(auth): handle expired JWT tokens gracefully
Changes: 3 files, +45 -12
PR URL: https://github.com/user/repo/pull/123
If gt create fails:
If gt submit fails:
/graphite:submit/graphite:create then /graphite:submit separately