rebase-pr
Automates the rebasing of PRs onto their base branches with conflict resolution and build verification.
Install
mkdir -p .claude/skills/rebase-pr && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/5685" && unzip -o skill.zip -d .claude/skills/rebase-pr && rm skill.zipInstalls to .claude/skills/rebase-pr
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Rebase a PR on its base branch, fix conflicts, and verify buildKey capabilities
- →Validate PR status
- →Rebase PR on base branch
- →Resolve merge conflicts
- →Verify build stability
- →Force push with lease
How it works
The workflow validates the PR state, rebases it onto the base branch, resolves conflicts, runs build and linting, and force-pushes the result.
Inputs & outputs
When to use rebase-pr
- →Updating a stale PR
- →Resolving merge conflicts
- →Verifying PR build stability
About this skill
Rebase PR
Simple workflow to rebase a PR on its base branch, resolve conflicts, and push.
Usage
/rebase-pr 19882
Workflow
Step 1: Validate PR
gh pr view <PR> --repo AztecProtocol/aztec-packages --json state,headRefName,baseRefName
Abort if:
stateis notOPEN→ "PR #<N> is <state>, nothing to rebase."
Note the baseRefName (usually next or merge-train/*).
Step 2: Checkout and Rebase
gh pr checkout <PR>
git fetch origin <base-branch>
git rebase origin/<base-branch>
Step 3: Resolve Conflicts (if any)
If there are conflicts:
-
Identify conflicting files:
git status -
Resolve each conflict: Edit the files to resolve conflicts
-
Stage resolved files:
git add <resolved-file> -
Continue rebase:
git rebase --continue -
Repeat until rebase completes
Important: Always REBASE, never merge.
Step 4: Bootstrap (if needed)
Check if changes exist outside yarn-project:
git diff origin/<base-branch>...HEAD --name-only | grep -v '^yarn-project/'
If yes, run bootstrap from repo root:
(cd $(git rev-parse --show-toplevel) && ./bootstrap.sh build yarn-project)
Step 5: Verify Build
Run from yarn-project:
yarn build
If there are build errors from the rebase, fix them.
Step 6: Quality Checklist
Format and lint ALL packages:
yarn format
yarn lint
Step 7: Commit and Push
If there are changes from build fixes or conflict resolution, commit and push.
If the PR targets next, amend to keep it as a single commit:
git add .
git commit --amend --no-edit
git push --force-with-lease
Otherwise, create a normal commit:
git add .
git commit -m "fix: resolve rebase conflicts"
git push --force-with-lease
Key Points
- Rebase, don't merge: Always use
git rebase, nevergit merge - Amend only for PRs targeting
next: Other PRs use normal commits - Bootstrap when needed: Only if there are changes outside yarn-project
- Verify build: Always run
yarn buildafter rebase - Force push with lease: Use
--force-with-leasefor safety
When not to use it
- →Merging PRs into protected branches
Prerequisites
Limitations
- →Requires manual conflict resolution
- →Only supports AztecProtocol/aztec-packages repo
How it compares
It enforces a rebase-only workflow with automated build verification instead of standard merge commits.
Compared to similar skills
rebase-pr side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| rebase-pr (this skill) | 1 | 4mo | Review | Advanced |
| nx-workspace | 4 | 6mo | Review | Beginner |
| dependency-upgrade | 26 | 5mo | Review | Intermediate |
| upgrading-expo | 3 | 3mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by AztecProtocol
View all by AztecProtocol →You might also like
nx-workspace
nrwl
Explore and understand Nx workspaces. USE WHEN answering any questions about the nx workspace, the projects in it or tasks to run. EXAMPLES: 'What projects are in this workspace?', 'How is project X configured?', 'What targets can I run?', 'What's affected by my changes?', 'Which projects depend on library Y?', or any questions about Nx workspace structure, project configuration, or available tasks.
dependency-upgrade
wshobson
Manage major dependency version upgrades with compatibility analysis, staged rollout, and comprehensive testing. Use when upgrading framework versions, updating major dependencies, or managing breaking changes in libraries.
upgrading-expo
sickn33
Upgrade Expo SDK versions
ast-grep-find
parcadei
AST-based code search and refactoring via ast-grep MCP
pnpm
antfu
Node.js package manager with strict dependency resolution. Use when running pnpm specific commands, configuring workspaces, or managing dependencies with catalogs, patches, or overrides.
windsurf-linting-config
jeremylongshore
Configure and enforce code quality with AI-assisted linting. Activate when users mention "configure linting", "eslint setup", "code quality rules", "linting configuration", or "code standards". Handles linting tool configuration. Use when configuring systems or services. Trigger with phrases like "windsurf linting config", "windsurf config", "windsurf".