backport

backport is a command for Claude Code from wangke19/gemini-ai-helpers. It costs 6 tokens per session (1,373 once invoked), scanned A, a copy of backport, Apache-2.0.

A Git workflow for applying one commit to several branches, with optional new branches for creating pull requests. Backporting means bringing a change from a newer branch into older release branches.

In plain words
What is it for?
Use it to distribute a fix across multiple release branches or prepare separate backport pull requests.
Why use it?
It removes repetitive cherry-picking and helps detect conflicts while preserving your current branch state.

Command for Claude Code

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

Good fit Use it to distribute a fix across multiple release branches or prepare separate backport pull requests.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/wangke19/gemini-ai-helpers/backport
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.

Clone the repo
git clone --depth 1 https://github.com/wangke19/gemini-ai-helpers

Made for: Claude Code.

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/wangke19/gemini-ai-helpers/backport.svg)](https://agentmods.dev/commands/wangke19/gemini-ai-helpers/backport)
Your own site
<a href="https://agentmods.dev/commands/wangke19/gemini-ai-helpers/backport"><img src="https://agentmods.dev/badge/commands/wangke19/gemini-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,373 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 98% copy Near-identical to another mod 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.00006 $0.01373
Opus 5 $0.00003 $0.00687
Sonnet 5 $0.00001 $0.00275
Haiku 4.5 $0.00001 $0.00137

Measured 4d ago against content hash 3d784b561b63, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, 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 4d 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

This is a copy

98% identical to backport — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

extensions/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. 4d ago First seen · 116 lines · 6 tokens per session scan A 3d784b561b63

Subscribe to this mod's changes

backport is a command published in the GitHub repository wangke19/gemini-ai-helpers (2 stars, last pushed 5mo ago), licensed Apache-2.0. It adds 6 tokens to every session and 1,373 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. It is 98% identical to backport, differing in 2 lines, and is treated as a copy.