Rebases the active branch onto the latest base branch to ensure code is up to date and clean.
Install
mkdir -p .claude/skills/pull-hojinzs && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/18564" && unzip -o skill.zip -d .claude/skills/pull-hojinzs && rm skill.zipInstalls to .claude/skills/pull-hojinzs
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.
Sync the current branch with the latest base branch (PR base if a PR exists, otherwise origin/main).Key capabilities
- →Determine the base branch for the current work
- →Fetch the latest changes from the determined base branch
- →Rebase the current branch onto the updated base branch
- →Resolve merge conflicts during the rebase process
- →Force-push the rebased branch with a lease
- →Record rebase evidence in the workpad
How it works
The skill identifies the base branch, fetches its latest state, and then rebases the current branch onto it, resolving conflicts as needed. It then force-pushes the updated branch to the remote.
Inputs & outputs
When to use pull
- →Updating a branch before a PR
- →Fixing outdated branch status
- →Preparing code for squash-merge
- →Synchronizing development work with main
About this skill
/pull — Branch Sync Workflow
Trigger
Use this skill to bring the current branch up to date with its base branch:
- Before creating a PR.
- Before starting a new work session on an existing branch.
- When the
/landskill's pre-flight check 3 (branch up-to-date with PR base) fails.
Flow
-
Determine the base branch:
# If a PR exists for the current branch: pr_number=$(gh pr view --json number --jq .number 2>/dev/null) if [ -n "$pr_number" ]; then base=$(gh pr view --json baseRefName --jq .baseRefName) else base="main" fi -
Fetch latest:
git fetch origin "$base" -
Rebase the current branch onto the base:
git rebase "origin/$base"rebase(notmerge) keeps the branch history linear and avoids creating merge commits — required for the squash-merge policy used by/land.
-
If conflicts arise:
- Resolve each conflict file.
git rebase --continueafter staging the resolution.- Re-run tests to confirm the integrated state is clean.
-
After a successful rebase, the local branch has new commit SHAs. If the branch was already pushed (e.g. a Draft PR exists), force-push with lease:
git push --force-with-lease origin <branch-name>--force-with-leaseis safer than--force: it refuses to overwrite if the remote moved since your last fetch. -
Record the pull skill evidence in the workpad
### Validationsection:- base branch (e.g.
origin/feature/epic-xororigin/main) - result:
cleanorconflicts resolved - resulting HEAD short SHA:
git rev-parse --short HEAD
- base branch (e.g.
Rules
- Always use the PR's actual base branch (not hardcoded
origin/main) when a PR exists. An Epic working branch must rebase against the Epic base, notmain. - Use
git rebase(notgit merge) to keep history linear for the squash-merge policy. - After rebase + force-push, treat the branch as having new commit SHAs — any prior approval on the PR is invalidated; re-run pre-flight checks.
- Record the rebase evidence in the workpad before proceeding to PR creation or merge.
When not to use it
- →When a linear commit history is not required
- →When a merge commit is preferred over rebasing
Limitations
- →Invalidates prior PR approvals due to new commit SHAs
- →Requires re-running pre-flight checks after force-push
How it compares
This workflow automatically determines the correct base branch and uses rebase for a linear history, unlike manual processes that might use merge or require explicit base branch specification.
Compared to similar skills
pull side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| pull (this skill) | 0 | 2mo | Review | Intermediate |
| resolve-conflicts | 81 | 8mo | Review | Intermediate |
| openspec-onboard | 10 | 5mo | Review | Beginner |
| codex-cli-bridge | 9 | 9mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by hojinzs
View all by hojinzs →You might also like
resolve-conflicts
antinomyhq
Use this skill immediately when the user mentions merge conflicts that need to be resolved. Do not attempt to resolve conflicts directly - invoke this skill first. This skill specializes in providing a structured framework for merging imports, tests, lock files (regeneration), configuration files, and handling deleted-but-modified files with backup and analysis.
openspec-onboard
studyzy
Guided onboarding for OpenSpec - walk through a complete workflow cycle with narration and real codebase work.
codex-cli-bridge
alirezarezvani
Bridge between Claude Code and OpenAI Codex CLI - generates AGENTS.md from CLAUDE.md, provides Codex CLI execution helpers, and enables seamless interoperability between both tools
skill-sync
KyleKing
Syncs Claude Skills with other AI coding tools like Cursor, Copilot, and Codeium by creating cross-references and shared knowledge bases. Invoke when user wants to leverage skills across multiple tools or create unified AI context.
github-workflow-automation
ruvnet
Advanced GitHub Actions workflow automation with AI swarm coordination, intelligent CI/CD pipelines, and comprehensive repository management
git-advanced-workflows
wshobson
Master advanced Git workflows including rebasing, cherry-picking, bisect, worktrees, and reflog to maintain clean history and recover from any situation. Use when managing complex Git histories, collaborating on feature branches, or troubleshooting repository issues.