Agent skill
update-graphite-stack
Update Graphite PR stacks by addressing review comments and syncing PRs. Use when user says "update my graphite stack", "address the review comments on my stack", "sync my PR stack after these changes", "submit my entire stack to Graphite", or "I need to update all the PRs in my stack".
Install this agent skill to your Project
npx add-skill https://github.com/Uniswap/ai-toolkit/tree/next/packages/plugins/development-pr-workflow/skills/update-graphite-stack
SKILL.md
Graphite Stack Updater
Automate Graphite PR stack updates by resolving comments and syncing PRs.
Note: This skill requires Graphite CLI (
gt) as PR stacking is a Graphite-specific concept. For standard Git workflows, use thepr-issue-resolverskill to address PR comments on individual PRs.
When to Activate
- User has a Graphite stack with comments
- Multiple PRs need updating
- Stack sync needed after changes
- Review comments to address
- User mentions "gt stack" or "update stack"
Prerequisites
- Graphite CLI installed:
npm install -g @withgraphite/graphite-cli@latest - Repository initialized with Graphite:
gt repo init - Existing Graphite stack with PRs to update
Why Graphite-only? This skill manages PR stacks, which is a Graphite-specific workflow. For standard Git workflows, use
pr-issue-resolverto address comments on individual PRs.
What It Does
- Analyze Stack: Check structure with
gt stack - Find Comments: Identify PRs with unresolved feedback
- Address Feedback: Help resolve comments
- Update Stack: Use Graphite commands to sync
- Verify: Ensure all upstack PRs remain in sync
Execution Flow
For each PR with comments (bottom to top):
- Review the feedback
- Make necessary changes
- Run
gt modify --no-verifyto amend - Execute
gt submit --stack --update-onlyto sync upstack - Continue until all PRs updated
Key Graphite Commands Used
gt stack # View current stack
gt modify # Amend current commit
gt submit --stack # Update all PRs in stack
Options
- Process entire stack or specific PR range
- Filter by comment type (style, logic, performance)
- Dry-run mode to preview changes
- Auto-commit vs manual review mode
Output
Progress summary with:
- Number of PRs updated
- Comments resolved per PR
- Remaining unresolved items
- Stack synchronization status
Optional Follow-up
After updates, can invoke refactorer-agent to verify changes maintain quality.
Examples
"Update my graphite stack"
"Address the review comments on my stack"
"Sync the stack starting from PR #123"
Didn't find tool you were looking for?