agentleFS
Google CloudKnown publisherGoogleCloudPlatform/spring-cloud-gcp/.agents/skills/backport/SKILL.md

backport

Skill556 starsChanged 6 months agoApache-2.0View on GitHub

Backports pull requests that have been merged into the main branch across to older active release branches (e.g., 6.x, 7.x). Use when instructed to cherry-pick, backport, or migrate merged pull requests or commits to older support branches in the repository.

  • Commits and pushes

6 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions6 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 6

    1. DependencyTrack/dependency-track★ 4.4ksame name
    2. camunda/camunda★ 4.4ksame name
    3. lablup/backend.ai★ 679same name
    4. capawesome-team/capacitor-plugins★ 499same name
    5. microsoft/vscode-cosmosdb★ 200same name
    6. microsoft/vscode-documentdb★ 33same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 5 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    PR Title: Must EXACTLY match the original PR title from main, including the original PR number suffix.

    line 25
  2. Very specific:

    PR Body: Must contain exactly the string backport followed by the full GitHub URL of the original pull request.

    line 27
  3. Distinctive:

    When instructed by a user to backport one or more PRs, follow this exact sequence for each PR and target branch combination:

    line 34
  4. Distinctive:

    Ensure local tracking branches are up to date.

    line 43
  5. Very specific:

    Create the pull request via GitHub CLI (gh), specifying the target base branch, exact title, and body.

    line 68
  6. Distinctive:

    Atomic Backports: Always backport each pull request individually.

    line 79
  7. Distinctive:

    Verification: Verify that the PR was successfully created and verify the CI checks once opened.

    line 81

“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Backporting Pull Requests

This document defines the standard operating procedures and conventions for AI agents performing backporting tasks in the spring-cloud-gcp repository.

Prerequisites

  • Access to the git command line tool.
  • Access to the GitHub CLI (gh), authenticated with sufficient repository scopes to create branches and pull requests.

Branching & Naming Conventions

  • Target Release Branches: Active support branches such as 6.x and 7.x.
  • Local/Head Branch Name: <target-branch>-cherry-pick-<short-commit-hash>
    • Example: 6.x-cherry-pick-366c6fe (where 366c6fe is the 7-character short hash of the commit from main).

Pull Request Metadata Conventions

To ensure consistency and traceability across releases, backport pull requests MUST adhere to the following formatting rules:

  • PR Base: The target release branch (e.g., 6.x).
  • PR Title: Must EXACTLY match the original PR title from main, including the original PR number suffix.
    • Example: fix: NullPointerException in spring-cloud-gcp-data-spanner (#4383)
  • PR Body: Must contain exactly the string backport followed by the full GitHub URL of the original pull request.
    • Example: backport https://github.com/GoogleCloudPlatform/spring-cloud-gcp/pull/4383

Step-by-Step Execution Workflow

When instructed by a user to backport one or more PRs, follow this exact sequence for each PR and target branch combination:

Step 1: Identify Commit Hash

Find the commit hash of the merged PR on the main branch.

git log --oneline origin/main

Step 2: Fetch Upstream State

Ensure local tracking branches are up to date.

git fetch origin

Step 3: Create Tracking Branch

Checkout a new branch from the target release branch.

git checkout -b <target-branch>-cherry-pick-<short-hash> origin/<target-branch>

Step 4: Cherry-Pick Commit

Cherry-pick the commit from main.

git cherry-pick <full-commit-hash>

Note: If merge conflicts arise, resolve them according to the target branch's baseline dependencies and continue the cherry-pick.

Step 5: Push Branch to Upstream

Push the newly created branch to the remote repository.

git push origin <target-branch>-cherry-pick-<short-hash>

Step 6: Create Pull Request

Create the pull request via GitHub CLI (gh), specifying the target base branch, exact title, and body.

gh pr create \
  --base <target-branch> \
  --title "<original-pr-title> (#<original-pr-number>)" \
  --body "backport https://github.com/GoogleCloudPlatform/spring-cloud-gcp/pull/<original-pr-number>"

Important Operating Principles

  1. Atomic Backports: Always backport each pull request individually. Do not combine multiple PRs into a single cherry-pick branch or backport PR unless explicitly instructed by the user.
  2. Author Attribution: Git cherry-pick preserves the original commit authorship automatically. Do not alter the commit author during the process.
  3. Verification: Verify that the PR was successfully created and verify the CI checks once opened.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.