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.zip

Installs 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).
100 charsno explicit “when” trigger
Intermediate

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

You give it
A local Git branch with unpushed commits
You get back
A local Git branch rebased onto its base, with updated commit SHAs

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 /land skill's pre-flight check 3 (branch up-to-date with PR base) fails.

Flow

  1. 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
    
  2. Fetch latest:

    git fetch origin "$base"
    
  3. Rebase the current branch onto the base:

    git rebase "origin/$base"
    
    • rebase (not merge) keeps the branch history linear and avoids creating merge commits — required for the squash-merge policy used by /land.
  4. If conflicts arise:

    • Resolve each conflict file.
    • git rebase --continue after staging the resolution.
    • Re-run tests to confirm the integrated state is clean.
  5. 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-lease is safer than --force: it refuses to overwrite if the remote moved since your last fetch.

  6. Record the pull skill evidence in the workpad ### Validation section:

    • base branch (e.g. origin/feature/epic-x or origin/main)
    • result: clean or conflicts resolved
    • resulting HEAD short SHA: git rev-parse --short HEAD

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, not main.
  • Use git rebase (not git 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.

SkillInstallsUpdatedSafetyDifficulty
pull (this skill)02moReviewIntermediate
resolve-conflicts818moReviewIntermediate
openspec-onboard105moReviewBeginner
codex-cli-bridge99moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry