mcpbeat Sign in

Cherry Pick Main To Release Agent Skill

Cherry-pick a merged pull request's commit(s) from `main` onto the current release branch and open a draft PR.

1k tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
2827
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/Automattic/pocket-casts-android --skill cherry-pick-main-to-release

What it tells the agent to use

found in the instruction text
Bash runs shell commands — read the instruction before connecting

The instruction itself

11 sections, as written by the author

Cherry-pick a PR to the release branch

Take a merged pull request, cherry-pick its commit(s) onto a fresh branch off the current release branch, and open a draft PR

targeting that release branch.

The workflow this supports: fixes are developed and merged on main, then cherry-picked to the release branch. That keeps the release branch

limited to exactly the commits it needs, so merging it back into main later is clean and unambiguous (see the Git Workflow section of AGENTS.md).

Requirements

  • GitHub CLI (gh) installed and authenticated. Verify with which gh; if missing, stop and tell the user to install it.
  • The PR URL (or number) to cherry-pick. If the user did not provide one, ask for it.

Steps

1. Read the source PR

Run:

gh pr view <pr-url-or-number> --repo Automattic/pocket-casts-android \
  --json number,title,url,state,mergedAt,mergeCommit,headRefName,author,labels,body
  • If state is not MERGED, warn the user: cherry-picking is meant for changes already reviewed and merged on main. Ask whether to continue

anyway before proceeding.

  • Note the mergeCommit.oid (the commit that landed on main). This is what you will cherry-pick.

2. Determine the current release branch

There should be only one active release branch. Fetch and find the highest version:

git fetch origin --prune
git branch -r | grep -oE 'origin/release/[0-9]+\.[0-9]+' | sed 's|origin/release/||' | sort -V | tail -1

This prints the latest release version (e.g. 8.15), giving the branch release/<ver>. There is normally only one active release branch, so use

the one you find without asking. Only pause to confirm with the user if the command returns more than one release branch, in which case ask

which to target.

3. Identify the commit(s) to cherry-pick

The repository squash-merges PRs, so the merge commit is usually a single commit containing the whole change. Handle both squash and true merge

commits by checking the parent count:

git rev-list --parents -n 1 <mergeCommit.oid>
  • One parent (squash merge, the repo default): cherry-pick the commit directly.
  git cherry-pick <mergeCommit.oid>
  • Two parents (true merge commit): cherry-pick relative to the first parent.
  git cherry-pick -m 1 <mergeCommit.oid>

If mergeCommit is null (rare, e.g. the PR was merged in an unusual way), or the PR was rebase-merged (each commit is replayed onto main, so

mergeCommit.oid is only the last of them and cherry-picking it alone would silently drop the earlier commits), fall back to the PR's own commits

from gh pr view --json commits and cherry-pick them in order, oldest first. Tell the user this is what you are doing.

4. Create the branch off the release branch

Branch from the release branch, never from main. Use a descriptive name that ties it to the source PR:

git checkout -b cherry-pick/<ver>/pr-<number> origin/release/<ver>

5. Cherry-pick

Run the cherry-pick command chosen in step 3.

  • On success, verify with git log --oneline -n 3 that the commit landed.
  • On conflict, stop. Show the conflicting files (git status) and hand back to the user to resolve. Do not force or guess a resolution. Once

they have staged the fixes, continue with git cherry-pick --continue. Resolving conflicts carefully matters here because the release branch and

main may have diverged.

6. Push and open the draft PR

git push -u origin cherry-pick/<ver>/pr-<number>

Create a draft PR targeting the release branch, filling in the template below:

gh pr create --repo Automattic/pocket-casts-android --draft \
  --base release/<ver> \
  --head cherry-pick/<ver>/pr-<number> \
  --title "<original title> (cherry-pick to <ver>)" \
  --body "<filled-in body>"

7. Carry over labels and report

  • Copy the [Type] and [Area] labels from the source PR onto the new one:
  gh pr edit --repo Automattic/pocket-casts-android <new-pr-number> --add-label "<label>"
  • Output the new PR URL.

PR body template

Fill in every field. The body must make clear this is an already-reviewed change being cherry-picked, while still asking reviewers/CI to confirm it

applies cleanly, because the release branch may have diverged from main.

## Description

Cherry-pick of #<original-number> into `release/<ver>`.

> **This change was already reviewed and merged on `main`.** This PR exists to land it in the upcoming release. CI and a quick review should still
> run to confirm the cherry-pick applies cleanly and introduces no issues on the release branch, since `release/<ver>` may have diverged from `main`.

- Original PR: <original-url>
- Cherry-picked commit: `<mergeCommit.oid short sha>`

## Testing Instructions

See the original PR (<original-url>) for full testing steps. In addition, verify the change behaves as described on top of `release/<ver>`.

Other skills for the same job

different authors, same section of the catalogue
Receiving Code Review
by ZhanlinCui
×7

Use when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation

2k tokens
Requesting Code Review
by ZhanlinCui
×6

Use when completing tasks, implementing major features, or before merging to verify work meets requirements

2k tokens
Git Commit
by github
vendor ×3

Execute git commit with conventional commit message analysis, intelligent staging, and message generation. Use when user asks to commit changes, create a git commit, or mentions "/commit". Supports: (1) Auto-detecting type and scope from changes, (2) Generating conventional commit messages from diff, (3) Interactive commit with optional type/scope/description overrides, (4) Intelligent file staging for logical grouping

799 tokens
Github Code Review
by ComeOnOliver
×3

Comprehensive GitHub code review with AI-powered swarm coordination

13k tokens
Karpathy Guidelines
by hyyhf
×3

Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid overcomplication, make surgical changes, surface assumptions, and define verifiable success criteria.

629 tokens
Code Reviewer
by google-gemini
vendor ×2

Use this skill to review code. It supports both local changes (staged or working tree) and remote Pull Requests (by ID or URL). It focuses on correctness, maintainability, and adherence to project standards.

795 tokens
Agent MD Refactor
by softaworks
×2

Refactor bloated AGENTS.md, CLAUDE.md, or similar agent instruction files to follow progressive disclosure principles. Splits monolithic files into organized, linked documentation.

4k tokens
Commit Work
by softaworks
×2

Create high-quality git commits: review/stage intended changes, split into logical commits, and write clear commit messages (including Conventional Commits). Use when the user asks to commit, craft a commit message, stage changes, or split work into multiple commits.

2k tokens

How to use it

Copy the folder

Take automattic/cherry-pick-main-to-release from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.