revert-pr

revert-pr is a skill for Claude Code, Codex from openshift-eng/ai-helpers. It costs 18 tokens per session (4,550 once invoked), scanned A, original, Apache-2.0.

A Git workflow for undoing a merged pull request, including the required Revertomatic pull-request format.

In plain words
What is it for?
Use it to prepare revert changes, generate the revert pull-request body, and optionally open the pull request as a draft.
Why use it?
It helps restore CI results or nightly builds when a merged change causes failures, while following the project's quick-revert policy.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Part of the ci plugin — 34 skills, 21 commands, 2 agents shipped together

Good fit Use it to prepare revert changes, generate the revert pull-request body, and optionally open the pull request as a draft.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/openshift-eng/ai-helpers/revert-pr
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.

Any agent
npx skills add openshift-eng/ai-helpers --skill revert-pr
Clone the repo
git clone --depth 1 https://github.com/openshift-eng/ai-helpers

Made for: Claude Code, Codex.

Or install ci, the plugin that ships this one along with the rest of its 34 skills, 21 commands, 2 agents.

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 revert-pr

README.md
[![agentmods](https://agentmods.dev/badge/skills/openshift-eng/ai-helpers/revert-pr/github.svg)](https://agentmods.dev/skills/openshift-eng/ai-helpers/revert-pr)
Your own site
<a href="https://agentmods.dev/skills/openshift-eng/ai-helpers/revert-pr"><img src="https://agentmods.dev/badge/skills/openshift-eng/ai-helpers/revert-pr/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for revert-pr

Your own site · 80×15
<a href="https://agentmods.dev/skills/openshift-eng/ai-helpers/revert-pr"><img src="https://agentmods.dev/badge/skills/openshift-eng/ai-helpers/revert-pr.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 18 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Data Exfiltration · line 124
    Code or instructions that leak agent conversation context to external services, potentially exposing sensitive user interactions.
    Fix: Remove any code that sends prompts, responses, or session data externally. Preserve user privacy; never exfiltrate conversation content.
  • high Data Exfiltration · line 139
    Code or instructions that leak agent conversation context to external services, potentially exposing sensitive user interactions.
    Fix: Remove any code that sends prompts, responses, or session data externally. Preserve user privacy; never exfiltrate conversation content.
  • medium Agent Snooping · line 470
    Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.
    Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
How audits are shown
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.00018 $0.04550
Opus 5 $0.00009 $0.02275
Sonnet 5 $0.00004 $0.00910
Haiku 4.5 $0.00002 $0.00455

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

Security

Grade A, and why

revert-pr 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 5d 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

Copies of this mod

1 near-identical copy found in the catalogue:

  • Revert PR — 94% identical, 10 lines differ
plugins/ci/skills/revert-pr/SKILL.md · 473 lines

How it starts

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

Revert PR

This skill provides the detailed git revert workflow and the exact PR body template used by Revertomatic for reverting merged pull requests that break CI or nightly payloads.

When to Use This Skill

Use this skill when:

  • A merged PR needs to be reverted to restore CI signal
  • Following the OpenShift quick-revert policy
  • You need the exact Revertomatic template format for the revert PR body
  • You need to generate CI override commands for a revert PR

Optional Parameters

  • --draft: When set, create the revert PR as a draft (gh pr create --draft). Used by the experimental revert workflow to open experimental revert PRs that may be closed if the suspect is cleared.
  • --context: When the caller passes context directly (e.g., from an autonomous pipeline that already has all context in memory), skip the JIRA lookup in Step 5. The provided context string is used as-is for the {CONTEXT} template variable.

Prerequisites

  1. GitHub CLI (gh): Installed and authenticated

    • Check: gh auth status
  2. Git: Installed and configured

    • Check: which git
  3. Repository Access: User must have push access to their fork of the target repository

Implementation Steps

Step 1: Extract PR Information

Use the gh CLI to fetch all necessary details about the PR being reverted:

# Fetch PR details as JSON
pr_data=$(gh pr view "$PR_URL" --json number,title,author,mergeCommit,baseRefName,state)

# Extract fields
pr_number=$(echo "$pr_data" | jq -r '.number')
pr_title=$(echo "$pr_data" | jq -r '.title')
pr_author=$(echo "$pr_data" | jq -r '.author.login')
merge_sha=$(echo "$pr_data" | jq -r '.mergeCommit.oid')
base_branch=$(echo "$pr_data" | jq -r '.baseRefName')
pr_state=$(echo "$pr_data" | jq -r '.state')

Validation:

  • pr_state must be MERGED. If the PR is not merged, abort with an error.
  • merge_sha must not be empty or null.

Read the full file on GitHub · 473 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. 5d ago First seen · 473 lines · 18 tokens per session scan A a0715527de4c

Subscribe to this mod's changes

revert-pr is a skill published in the GitHub repository openshift-eng/ai-helpers (116 stars, last pushed today), licensed Apache-2.0. It adds 18 tokens to every session and 4,550 once invoked, about $0.0001 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.