backport

backport is a skill for Claude Code from quay/ai-helpers. It costs 45 tokens per session (1,550 once invoked), scanned A, original, MIT.

A workflow for copying a merged pull request's changes to one or more older release branches. A pull request is a proposed code change, and a release branch is a maintained line of software.

In plain words
What is it for?
Use it to backport a merged pull request, including choosing branches from its JIRA fix versions and resolving cherry-picks.
Why use it?
It removes the manual work of finding target branches, checking previous bot failures, and handling related JIRA tickets.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is Bash(bash .claude/scripts/jira-ops.sh *).

Part of the dev plugin — 16 skills, 1 command shipped together

Good fit Use it to backport a merged pull request, including choosing branches from its JIRA fix versions and resolving cherry-picks.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/quay/ai-helpers
agentmods
npx agentmods add skills/quay/ai-helpers/backport

Made for: Claude Code.

Or install dev, the plugin that ships this one along with the rest of its 16 skills, 1 command.

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 backport

README.md
[![agentmods](https://agentmods.dev/badge/skills/quay/ai-helpers/backport.svg)](https://agentmods.dev/skills/quay/ai-helpers/backport)
Your own site
<a href="https://agentmods.dev/skills/quay/ai-helpers/backport"><img src="https://agentmods.dev/badge/skills/quay/ai-helpers/backport.svg" alt="Measured on agentmods" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,550 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00045 $0.01550
Opus 5 $0.00023 $0.00775
Sonnet 5 $0.00009 $0.00310
Haiku 4.5 $0.00005 $0.00155

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

Security

Grade A, and why

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

plugins/dev/skills/backport/SKILL.md · 172 lines

How it starts

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

Backport PR

Backport merged PR #$ARGUMENTS[0] to release branches.

  • PR number: $ARGUMENTS[0]
  • Branch (optional): $ARGUMENTS[1] — if omitted, derive from JIRA fixVersions

Phase 1: Discovery

Step 1: Verify PR is merged

gh pr view "$ARGUMENTS[0]" --json state,mergedAt,mergeCommit,title,baseRefName

The PR must be merged. If not, inform the user and stop. Extract:

  • mergeCommit.oid — the merge commit SHA
  • title — extract the JIRA key (pattern: PROJQUAY-\d+ or similar prefix)
  • baseRefName — should be master

Step 2: Determine backport branches

If $ARGUMENTS[1] is provided, use it as the sole target branch. Skip to Phase 2.

Otherwise, fetch JIRA fields to compute branches:

bash .claude/scripts/jira-ops.sh get-fix-versions <TICKET-KEY>
bash .claude/scripts/jira-ops.sh check-version <TICKET-KEY>

Version → Branch mapping: Strip quay-v prefix, extract major.minor, prepend redhat-. Examples: quay-v3.17.zredhat-3.17, quay-v3.16.2redhat-3.16.

Backport branches = branches from Fix Versions, minus the branch matching Target Version (that's the branch the original ticket already covers).

Validate each branch exists:

git ls-remote --heads upstream redhat-X.Y

If no backport branches remain, report "no backports needed" and stop.

Phase 2: Per-Branch State Detection

For each backport branch, determine its current state before acting:

Check 1: Existing backport PR

gh pr list --repo quay/quay --base <BRANCH> --state all \
  --search "cherry-pick-$ARGUMENTS[0]-to-<BRANCH>" \
  --json number,title,state,headRefName
  • If a merged backport PR exists → skip this branch, report "already backported"
  • If an open backport PR exists → skip this branch, report the PR URL

Check 2: Prior bot failure

Search the original PR's comments for the cherry-pick robot's failure message:

gh pr view "$ARGUMENTS[0]" --repo quay/quay --json comments \
  --jq '[.comments[] | select(.author.login == "openshift-cherrypick-robot") | select(.body | test("failed to apply on top of branch"))] | length'

Read the full file on GitHub · 172 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 · 172 lines · 45 tokens per session scan A f0260d109b94

Subscribe to this mod's changes

backport is a skill published in the GitHub repository quay/ai-helpers (3 stars, last pushed 20d ago), licensed MIT. It adds 45 tokens to every session and 1,550 once invoked, about $0.0002 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-04.