smithery.ai

cherry-pick

Cherry-pick a PR to a target version branch

First seen Apr 2, 2026

Installation

$ npx skills add https://smithery.ai

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Skill metadata

Parsed from SKILL.md frontmatter.

Allowed toolsRead, Edit, Bash(git:*), Bash(gh:*), Bash(yarn:*)

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,407 B
  • docs SUMMARY.md 62 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

Cherry-pick the PR with the GitHub URL $0 to the $1 branch. This command is only run when automated cherry-picking failed, so expect merge conflicts.

Steps

  1. Gather PR information using gh pr view:

- The base branch the PR was merged into (source branch) - The merge commit SHA - The PR branch name - The PR title - The PR description - The PR labels

  1. Prepare branches:

- Fetch latest commits for the source branch: git fetch origin <source-branch> - Fetch latest commits for the target branch: git fetch origin $1 - Create a new branch from the remote target branch using --no-track: git checkout -b <branch-name> origin/$1 --no-track - Name the branch using the PR branch name with the target branch as suffix (e.g., fix/click-event-listener-$1)

  1. Cherry-pick the merge commit:

- Run git cherry-pick -m 1 <merge-commit-sha> - Resolve any merge conflicts. If needed, read the conflicting files from both the source and target branches to understand the differences.

  1. Verify the changes:

- Run unit tests for the affected component package(s) - If tests fail, investigate and fix the issue before proceeding

  1. Commit the resolved cherry-pick:

- Stage only the files that were part of the original cherry-pick or that you had to fix after running tests (do not include untracked files) - Complete the cherry-pick commit using the PR title as the commit message, appending "(CP: $1)" to the subject line

  1. Push and create PR:

- Push the branch to origin - Create a new PR targeting the $1 branch using gh pr create - Start the description with "This PR cherry-picks changes from the original PR #<pr-number> to branch $1." - Then add a separator (---) surrounded by new lines - Then add the original PR description, wrapped in a Markdown blockquote (prefix each line with > )

  1. Update original PR:

- If the original PR has the label need to pick manually $1, remove it - Add the label cherry-picked-$1 to the original PR - Ignore any errors if the labels do not exist

You can use the gh CLI tool for GitHub operations throughout these steps.