Agent skill

Ansible Backport Creator

by ansible in ansible/ansible

Creates backports of a merged Ansible devel pull request onto the right stable branches by cherry-picking its merge commit onto new backport branches.

GPL-3.0Auto-check passedDevelopment

Install Ansible Backport Creator

skills CLI
$ npx skills add ansible/ansible --skill creating-backports -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ansible/ansible creating-backports --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ansible/ansible.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/creating-backports .claude/skills/creating-backports && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
creating-backports
GitHub stars
71k
Token cost
~1.2k tokens
SKILL.md length
566 words
Files
1
Skills in repo
4
Repo updated
First seen
Licence
GPL-3.0

At a glance

Creates backports of a merged Ansible devel pull request onto the right stable branches by cherry-picking its merge commit onto new backport branches.

  • Works in 4 steps: Create a new branch for each stable… → Cherry-pick the MERGE commit from the… → Before pushing, identify the user's fork… → …
  • Backporting a merged devel PR to stable branches
  • Calls git and gh
  • Working out which stable branches a bug fix should reach

What it does

The workflow comes with a progress checklist. First the agent verifies with `gh pr view` that the PR is merged into devel and records the merge commit SHA, aborting if it is not merged or went to the wrong branch. It then finds the upstream remote, offering to create it when missing, and syncs the local devel branch with a fetch, checkout and `git pull --rebase`.

Target branches come from the backport policy in `context/contributing.md`: bug fixes go to the latest stable branch only, critical fixes to the latest and previous stable branches, and security issues are reported privately by email rather than through GitHub. The agent asks what kind of fix it is, confirms the branches and lists stable ones with `git ls-remote`. It then creates a backport branch per stable branch, cherry-picks the merge commit with `-x` and aborts the cherry-pick when conflicts appear.

When your agent uses it

  • Backporting a merged devel PR to stable branches
  • Working out which stable branches a bug fix should reach
  • Cherry-picking a merge commit onto a stable branch

Example prompts

  • “Backport the merged PR that fixes the include_vars bug to the latest stable branch.”
  • “Which stable branches should this critical bug fix be backported to?”
  • “Create the backport branches for my merged devel PR and cherry-pick the merge commit.”

Requirements

  • Git with an upstream remote for the ansible/ansible repository
  • The GitHub CLI (`gh`)

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Create a new branch for each stable branch: git checkout -b backport/VERSION/PR_NUMBER /STABLE_BRANCH
  2. Cherry-pick the MERGE commit from the referenced pull request into each branch using the -x option.
  3. Before pushing, identify the user's fork remote
  4. Push each backport branch to the user's fork remote (identified in step 3, typically origin)

What it can do on your machine

Read from SKILL.md and the folder at commit 5b1a96f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git and gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Ansible Backport Creator loads about 1.2k tokens when it runs. Until then it costs about 31 tokens; SKILL.md has 566 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~31
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ansible/ansible at commit 5b1a96f, republished under its GPL-3.0 licence (© ansible). 566 words, ~1,190 tokens.

Download SKILL.mdSave it as .claude/skills/creating-backports/SKILL.md (or your agent's skills folder).
name
creating-backports
description
Create backports of a GitHub pull request that has merged into the devel branch in the upstream repository
user-invocable
true

Creating Backports

Backport creation workflow

text
Backporting Progress:
- [ ] Step 1: Verify the referenced pull request
- [ ] Step 2: Identify the git remote for the upstream repository
- [ ] Step 3: Determine the stable branches for the backport
- [ ] Step 4: Create the backport branches
- [ ] Step 5: Create pull requests
- [ ] Step 6: Summarize the work

Step 1: Verify the referenced pull request

Use gh pr view <number> to verify the PR is merged into devel and get the merge commit SHA: gh pr view <number> --json mergeCommit -q .mergeCommit.oid

Abort if the PR is not merged or merged to wrong branch.

Step 2: Identify the git remote for the upstream repository

Identify the upstream remote (typically named upstream). If it doesn't exist, offer to create it.

Sync the local devel branch with the identified upstream remote:

  • git fetch <upstream_remote>
  • git checkout devel
  • git pull --rebase <upstream_remote> devel

Step 3: Determine the stable branches for the backport

Refer to the backport policy in context/contributing.md:

  • Bug fixes: backported to latest stable only
  • Critical bug fixes: backported to latest and previous stable
  • Security issues: must be reported to security@ansible.com privately (not via GitHub)

Ask the user what type of fix this is and confirm the target branches before proceeding.

To identify available stable branches, run: git ls-remote --heads <upstream_remote> 'refs/heads/stable-*'

Step 4: Create the backport branches

Before creating backport branches, verify you're not on a branch you want to keep (the workflow will create and switch between multiple branches).

First, ensure stable branches are up to date:

  • Run git fetch <upstream_remote> to get latest stable branch refs

The backport process consists of these steps:

  1. Create a new branch for each stable branch: git checkout -b backport/VERSION/PR_NUMBER <upstream_remote>/STABLE_BRANCH Example: git checkout -b backport/2.20/1234 upstream/stable-2.20 (if upstream remote is named upstream)
  2. Cherry-pick the MERGE commit from the referenced pull request into each branch using the -x option. (The merge commit SHA was obtained in Step 1 with gh pr view) Example: git cherry-pick -x <merge_commit_sha> If merge conflicts are encountered:
    • Run git cherry-pick --abort to abort the cherry-pick
    • Notify the user that manual conflict resolution is required for this stable branch
    • Explain the user can either: a) Manually resolve conflicts (you can help guide them) b) Skip this stable branch backport
    • Do NOT continue with remaining branches if conflicts occur - wait for user direction
  3. Before pushing, identify the user's fork remote:
    • Typically named origin
    • Verify with git remote -v that it points to the user's fork, not upstream
    • Confirm the remote name before pushing
  4. Push each backport branch to the user's fork remote (identified in step 3, typically origin): git push <fork_remote> backport/VERSION/PR_NUMBER Example: git push origin backport/2.20/1234 (if fork remote is named origin) Never push to the upstream remote - this would push directly to the upstream repository.
Show full SKILL.md (149 more words)Show less

Step 5: Create pull requests

Confirm with the user that they would like to create a pull request for each backport branch.

Use gh pr create for each branch:

  • --base STABLE_BRANCH_NAME (the stable branch being backported to)
  • --title "[STABLE_BRANCH_NAME] ORIGINAL_PR_TITLE"
  • --body "Backport of PR #XXXX\n\n(cherry picked from commit COMMIT_HASH)"

Example: gh pr create --base stable-2.20 --title "[stable-2.20] Fix bug in module" --body "Backport of PR #1234\n\n(cherry picked from commit abc123)"

Step 6: Summarize the work

Give the user a summary of the backports that were created. The summary must provide a list of the URL links to all pull requests that were created.

Error Recovery

If errors occur during the backport process:

  • Cherry-pick conflicts: List which branches succeeded and which failed due to conflicts
  • PR creation failures: Clean up any orphaned branches that weren't converted to PRs
  • Partial success: Summarize what succeeded and offer to retry failed branches individually

© ansible, GPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/creating-backports of ansible/ansible.

Open the folder on GitHubat commit 5b1a96f

Compare with similar skills

Ansible Backport Creator next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Ansible Backport Creator compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Ansible Backport Creator this skillansible/ansible71k—~1.2kAutomated safety check: PassGPL-3.0
Contributor-First PR MergeHKUDS/OpenHarness16k1 repos~847Automated safety check: PassMIT
ZCF Release AutomationUfoMiao/zcf6.1k—~3.4kAutomated safety check: PassMIT
Create Pull Requestcline/cline70k1 repos~1.6kAutomated safety check: PassApache-2.0
Creating Description For Gh PRredis/jedis12k—~838Automated safety check: PassMIT
Create Pull Request with Work Item IDmakeplane/plane61k—~824Automated safety check: PassAGPL-3.0

Similar skills

  • Merges external GitHub pull requests while keeping the original author credited, and fixes conflicts after the merge instead of rewriting the contribution.

    16k GitHub starsUsed in 1 repo~847 tokens
    DevelopmentAuto-check passed
  • Automates a version release with changesets: analyzes code changes, writes a bilingual CHANGELOG, bumps the version and commits through a release branch and pull request.

    6.1k GitHub stars~3.4k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Opens a GitHub pull request from your current branch with the gh CLI, after reviewing the commits and diff and gathering the details the PR needs.

    70k GitHub starsUsed in 1 repo~1.6k tokens
    DevelopmentAuto-check passed
  • Official

    Generate a clear, concise GitHub PR title and description from the diff between two local git branches, and save it to prDescription.md in the repo root.

    12k GitHub stars~838 tokensUpdated today
    DevelopmentAuto-check passed
  • Opens a pull request for the current branch using the repo's template, a work item ID in the title and a description filled in from the actual diff.

    61k GitHub stars~824 tokensUpdated today
    DevelopmentAuto-check passed
  • React Router Pull Request Creator

    remix-run/react-router

    Packages finished React Router work into a draft pull request: branch, commit, push, a written PR body and the right GitHub labels.

    57k GitHub stars~2.5k tokensUpdated today
    DevelopmentAuto-check passed

More from ansible/ansible

  • Load Ansible project development guidelines, testing conventions, PR review processes, and code structure reference into context

    71k GitHub stars~427 tokensUpdated today
    Auto-check passed
  • Downloads Azure Pipelines CI logs for an Ansible pull request or build so the agent can analyze test failures, after asking you first.

    71k GitHub stars~825 tokensUpdated today
    Auto-check passed
  • Reviews an Ansible pull request by number, following the steps in the project's CLAUDE.md, with early checks for changelog fragments and tests.

    71k GitHub stars~570 tokensUpdated today
    Auto-check passed

Works with

Questions about Ansible Backport Creator

What does Ansible Backport Creator do?

Creates backports of a merged Ansible devel pull request onto the right stable branches by cherry-picking its merge commit onto new backport branches. The workflow comes with a progress checklist. First the agent verifies with `gh pr view` that the PR is merged into devel and records the merge commit SHA, aborting if it is not merged or went to the wrong branch.

When should I use Ansible Backport Creator?

Ansible Backport Creator fits situations like: backporting a merged devel PR to stable branches; working out which stable branches a bug fix should reach; cherry-picking a merge commit onto a stable branch.

How do I install Ansible Backport Creator in Claude Code?

Run `npx skills add ansible/ansible --skill creating-backports -a claude-code`. Or copy the skill folder (.claude/skills/creating-backports in ansible/ansible) into .claude/skills/creating-backports in your project. Claude Code loads it when a task matches its description.

How do I install Ansible Backport Creator in Codex?

Run `npx skills add ansible/ansible --skill creating-backports -a codex`. Or copy the skill folder (.claude/skills/creating-backports in ansible/ansible) into .agents/skills/creating-backports in your project. Codex loads it when a task matches its description.

Can I use Ansible Backport Creator in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ansible/ansible --skill creating-backports -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/creating-backports, .gemini/skills/creating-backports, .github/skills/creating-backports and .opencode/skills/creating-backports in your project.

What does Ansible Backport Creator need to run?

Going by SKILL.md and its folder, Ansible Backport Creator needs the command-line tools its instructions call (git and gh). Our summary lists: Git with an upstream remote for the ansible/ansible repository; The GitHub CLI (`gh`).

Does Ansible Backport Creator access the network?

SKILL.md contains no URLs. Its commands use git and gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Ansible Backport Creator safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Ansible Backport Creator use?

Ansible Backport Creator is published under the GPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Ansible Backport Creator use?

About 1.2k tokens (SKILL.md is roughly 4.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Ansible Backport Creator?

Skills that share tags, products or a category with Ansible Backport Creator: Contributor-First PR Merge (HKUDS/OpenHarness, 16k stars), ZCF Release Automation (UfoMiao/zcf, 6.1k stars), Create Pull Request (cline/cline, 70k stars) and Creating Description For Gh PR (redis/jedis, 12k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Ansible Backport Creator?

ansible (a GitHub organization) maintains it in ansible/ansible, which has 70,893 GitHub stars. The repository holds 4 skills in this directory. The repository was last updated on October 8, 2026.

Source: ansible/ansible on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.