backport

backport is a command for coding agents from openshift-eng/ai-helpers. It costs 6 tokens per session (1,372 once invoked), scanned A, original, Apache-2.0.

A Git workflow command that applies one commit to one or more other branches. This process is called backporting and is commonly used to bring a fix from a newer development line into an older maintained release.

In plain words
What is it for?
Use it to backport a selected commit, optionally create branches for pull requests, and resolve conflicts with guidance.
Why use it?
It reduces the manual work of repeating a change across branches and helps detect conflicts during the process.

Command

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/backport
Clone the repo
git clone --depth 1 https://github.com/openshift-eng/ai-helpers

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 backport

README.md
[![agentmods](https://agentmods.dev/badge/commands/openshift-eng/ai-helpers/backport.svg)](https://agentmods.dev/commands/openshift-eng/ai-helpers/backport)
Your own site
<a href="https://agentmods.dev/commands/openshift-eng/ai-helpers/backport"><img src="https://agentmods.dev/badge/commands/openshift-eng/ai-helpers/backport.svg" alt="Measured on agentmods" height="20"></a>
Per session 6 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,372 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 $0.00006 $0.01372
Opus 5 $0.00003 $0.00686
Sonnet 5 $0.00001 $0.00274
Haiku 4.5 $0.00001 $0.00137

Measured yesterday against content hash 089519c4c508, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 yesterday.

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:

  • backport — 98% identical, 2 lines differ
plugins/git/commands/backport.md · 116 lines

How it starts

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

Name

git:backport

Synopsis

/git:backport <commit> <branch1> [branch2...] [--new-branch|-b]

Description

The git:backport command helps backport a commit to multiple branches. It automates the process of cherry-picking a commit to one or more target branches, with optional support for creating new branches for each backport (useful for creating pull requests).

This command provides:

  • Automated commit backporting to one or multiple branches
  • Validation of commit and branch existence
  • Safe state management (saves and restores current branch)
  • Conflict detection and user-guided resolution
  • Optional new branch creation for PR workflows
  • Support for branches with or without remote tracking

Implementation

The command executes the following workflow:

  1. Validates inputs:

    • Checks that at least 2 arguments are provided (commit + at least one branch)
    • Parses the --new-branch or -b flag if present
    • Verifies the commit exists using git cat-file -t <commit>
    • Shows commit details: git log -1 --oneline <commit>
    • Filters out flag arguments and verifies all remaining target branches exist
  2. ASK FOR USER PERMISSION:

    • IMPORTANT: After validating inputs, you MUST present the complete backport plan to the user and ask for explicit permission to proceed
    • Show what will happen: which branches will be checked out, which new branches will be created, and that commits will be made
    • Wait for user confirmation before proceeding with any git operations
    • Example: "I'm going to checkout release/v1.35, pull latest changes, create branch backport-abc1234-to-release/v1.35, cherry-pick the commit, then repeat for release/v1.34. This will create new branches and commits. Should I proceed?"
  3. Saves current state (only after user permission):

    • Records the current branch: git branch --show-current
    • Checks for uncommitted changes: git status --porcelain
    • If there are uncommitted changes, warns the user and stops

Read the full file on GitHub · 116 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. yesterday First seen · 116 lines · 6 tokens per session scan A 089519c4c508

Subscribe to this mod's changes

backport is a command published in the GitHub repository openshift-eng/ai-helpers (114 stars, last pushed yesterday), licensed Apache-2.0. It adds 6 tokens to every session and 1,372 once invoked, about $0.0000 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.