fix-cherrypick-robot-pr

fix-cherrypick-robot-pr is a command for Claude Code from openshift-eng/ai-helpers. It costs 13 tokens per session (2,103 once invoked), scanned A, original, Apache-2.0.

A command that replaces a cherrypick-robot pull request with a manually prepared pull request when the automated change needs human fixes. Cherry-picking means applying selected commits from one branch to another.

In plain words
What is it for?
Use it to inspect the robot's pull request, apply the required fixes, create a clean replacement pull request, and close the original.
Why use it?
It handles verification failures, merge conflicts, and repository-specific corrections that the automation cannot resolve.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: positional $N argument; mentions Claude Code.

Part of the git plugin — 2 skills, 10 commands shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/openshift-eng/ai-helpers/fix-cherrypick-robot-pr
Clone the repo
git clone --depth 1 https://github.com/openshift-eng/ai-helpers

Made for: Claude Code.

Or install git, the plugin that ships this one along with the rest of its 2 skills, 10 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for fix-cherrypick-robot-pr

README.md
[![agentmods](https://agentmods.dev/badge/commands/openshift-eng/ai-helpers/fix-cherrypick-robot-pr.svg)](https://agentmods.dev/commands/openshift-eng/ai-helpers/fix-cherrypick-robot-pr)
Your own site
<a href="https://agentmods.dev/commands/openshift-eng/ai-helpers/fix-cherrypick-robot-pr"><img src="https://agentmods.dev/badge/commands/openshift-eng/ai-helpers/fix-cherrypick-robot-pr.svg" alt="Measured on agentmods" height="20"></a>
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,103 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00013 $0.02103
Opus 5 $0.00006 $0.01052
Sonnet 5 $0.00003 $0.00421
Haiku 4.5 $0.00001 $0.00210

Measured 2d ago against content hash 8bd10358b080, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

fix-cherrypick-robot-pr scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

plugins/git/commands/fix-cherrypick-robot-pr.md · 266 lines

How it starts

The opening of the file, as written. The whole thing — 266 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Name

git:fix-cherrypick-robot-pr

Synopsis

/git:fix-cherrypick-robot-pr <pr-url> [error-messages]

Description

The git:fix-cherrypick-robot-pr command replaces a cherrypick-robot PR with a clean, manually-crafted cherry-pick PR that includes fixes the robot cannot handle.

The cherrypick-robot creates automated PRs but cannot:

  • Fix verification failures (JSON validation, missing annotations)
  • Resolve merge conflicts
  • Add context-specific fixes
  • Handle edge cases requiring human judgment
  • Apply repository-specific cleanup

This command helps you create a replacement PR with all necessary fixes applied.

Implementation

1. Extract Information from the Robot PR

Use gh pr view <pr-url> to extract:

  • Base branch (e.g., release-4.19)
  • PR title (to extract bug ID like OCPBUGS-65944)
  • All commit hashes included in the PR
  • PR number for later closure
  • Current PR checks/CI status

Example:

gh pr view <pr-url> --json baseRefName,title,commits,number,statusCheckRollup

2. Analyze Error Messages

Parse the provided error output to identify:

  • Root causes (JSON validation, missing annotations, conflicts, etc.)
  • Affected files
  • Required fixes
  • Fix strategy

Error sources (in priority order):

  1. User-provided error messages (from command arguments)
  2. File path if provided (e.g., /path/to/ci-errors.log)
  3. CI failure URL if provided
  4. Automatically fetch from PR status checks

3. Discover Git Remotes and Create Branch

# Discover the upstream remote (the main repository)
# Look for a remote that's not owned by the current user
UPSTREAM_REMOTE=$(git remote -v | grep "fetch" | grep -v "$(git config user.name)" | awk '{print $1}' | head -1)

# Discover the fork remote (your fork)
FORK_REMOTE=$(git remote -v | grep "$(git config user.name).*push" | awk '{print $1}' | head -1)

# If not found, fall back to common names
UPSTREAM_REMOTE=${UPSTREAM_REMOTE:-upstream}
FORK_REMOTE=${FORK_REMOTE:-origin}

# Fetch the latest base branch
git fetch $UPSTREAM_REMOTE <base-branch>

# Create new branch following naming convention
git checkout -b cherry-pick-<issue-number>-to-<base-branch> $UPSTREAM_REMOTE/<base-branch>

Read the full file on GitHub · 266 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 266 lines · 13 tokens per session scan A 8bd10358b080

Subscribe to this mod's changes

fix-cherrypick-robot-pr is a command published in the GitHub repository openshift-eng/ai-helpers (116 stars, last pushed yesterday), licensed Apache-2.0. It adds 13 tokens to every session and 2,103 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.