analyze-pr-reverts

analyze-pr-reverts is a command for Claude Code from openshift-eng/ai-helpers. It costs 12 tokens per session (2,124 once invoked), scanned A, original, Apache-2.0.

A command that examines recently reverted pull requests. A pull request is a proposed code change; a revert is a change that was undone because it caused problems.

In plain words
What is it for?
Use it to find common failure patterns, identify affected repositories, and suggest new checks, review rules, or process changes.
Why use it?
It helps teams spot repeated causes of failed changes instead of reviewing each revert in isolation.

Command for Claude Code

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

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

Good fit Use it to find common failure patterns, identify affected repositories, and suggest new checks, review rules, or process changes.

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

Made for: Claude Code.

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 analyze-pr-reverts

README.md
[![agentmods](https://agentmods.dev/badge/commands/openshift-eng/ai-helpers/analyze-pr-reverts/github.svg)](https://agentmods.dev/commands/openshift-eng/ai-helpers/analyze-pr-reverts)
Your own site
<a href="https://agentmods.dev/commands/openshift-eng/ai-helpers/analyze-pr-reverts"><img src="https://agentmods.dev/badge/commands/openshift-eng/ai-helpers/analyze-pr-reverts/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 analyze-pr-reverts

Your own site · 80×15
<a href="https://agentmods.dev/commands/openshift-eng/ai-helpers/analyze-pr-reverts"><img src="https://agentmods.dev/badge/commands/openshift-eng/ai-helpers/analyze-pr-reverts.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,124 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.00012 $0.02124
Opus 5 $0.00006 $0.01062
Sonnet 5 $0.00002 $0.00425
Haiku 4.5 $0.00001 $0.00212

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

Security

Grade A, and why

analyze-pr-reverts scanned grade A with 1 finding 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 9d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s 'https://sippy.dptools.openshift.org/api/pull_requests?release=Presubmits&filter=%7B%22items%22%3A%5B%7B%22columnField%22%3A%22title%22%2C%22operatorValue%22%3A%22contains%22%2C%22value%22%3A%22revert%22%7D%5D%2C
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

plugins/ci/commands/analyze-pr-reverts.md · 171 lines

How it starts

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

Name

ci:analyze-pr-reverts

Synopsis

/ci:analyze-pr-reverts [limit]

Description

The ci:analyze-pr-reverts command fetches recently reverted pull requests from the Sippy API and analyzes them to identify common failure patterns, the most affected repositories, and recommends concrete preventive measures such as new presubmit jobs, org-wide CodeRabbit review rules, or process changes.

This command is intended to be run periodically (e.g., monthly) to track revert trends over time.

Implementation

  1. Fetch Revert PRs from Sippy API: Query the Sippy API for PRs with "revert" in the title.

    curl -s 'https://sippy.dptools.openshift.org/api/pull_requests?release=Presubmits&filter=%7B%22items%22%3A%5B%7B%22columnField%22%3A%22title%22%2C%22operatorValue%22%3A%22contains%22%2C%22value%22%3A%22revert%22%7D%5D%2C%22linkOperator%22%3A%22and%22%7D&sortField=merged_at&sort=desc&limit=<LIMIT>'
    
    • The default limit is 50 but can be overridden by the user's argument
    • The API returns JSON with fields including: merged_at, link, author, title
    • Parse the JSON response and extract all PR entries
  2. Deduplicate: Remove duplicate entries (same PR URL appearing multiple times).

  3. Scrape PR Details: For each unique PR URL, fetch details using gh:

    gh pr view <url> --json title,body,files,labels
    

    Extract from each PR:

    • Repository: Parse org/repo from the URL
    • Description: The PR body explaining why the revert was needed
    • Files changed: What areas of code were affected
    • Root cause category: Classify based on the description (see categories below)

    If a PR cannot be fetched (permissions, deleted, etc.), note it and continue.

  4. Categorize Each Revert: Classify each revert into one or more of these root cause categories based on the PR description and the original PR that was reverted:

    • Test/platform coverage gap: New or migrated tests that fail on untested platforms (microshift, single-node, IPv6, FIPS, real-time, upgrade jobs). Look for mentions of specific failing job profiles.
    • IPv6/network incompatibility: Changes that work on IPv4 but break IPv6/dual-stack clusters. Look for hardcoded IPv4 addresses, network bind issues.
    • Operator/controller regression: Core operator logic changes causing CrashLoopBackOff, degraded states, install failures, or functional breakage.
    • Build/CI tooling: Renovate configs, dependency automation, build pipeline changes that break CI.
    • API/validation side effects: API changes, CRD validation changes, or policy enforcement that has unexpected downstream impact.
    • Feature flag/config change: Premature feature gate removal, default value changes, config toggles.
    • Cross-component dependency: Change that depends on another component's change that hasn't landed or built yet.
    • Flaky/unstable new test: New test that passes sometimes but flakes at a high enough rate to block payloads.

Read the full file on GitHub · 171 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. 9d ago First seen · 171 lines · 12 tokens per session scan A 2f50243c75b7

Subscribe to this mod's changes

analyze-pr-reverts is a command published in the GitHub repository openshift-eng/ai-helpers (116 stars, last pushed yesterday), licensed Apache-2.0. It adds 12 tokens to every session and 2,124 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.