analyze-regression

analyze-regression is a command for coding agents from openshift-eng/ai-helpers. It costs 12 tokens per session (19,046 once invoked), scanned C, original, Apache-2.0.

A command that examines a specific Component Readiness regression and suggests where to investigate next. A regression is a decline in a test or component's results compared with earlier results.

In plain words
What is it for?
Use it to understand a regression's failure mode, find related problems, check the status of its JIRA work item, and choose investigation steps.
Why use it?
It gathers failure patterns, related regressions, and—when available—the linked JIRA issue, so you can tell whether the problem is being worked on.

Command

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

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.

agentmods
npx agentmods add commands/openshift-eng/ai-helpers/analyze-regression
Clone the repo
git clone --depth 1 https://github.com/openshift-eng/ai-helpers

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-regression

README.md
[![agentmods](https://agentmods.dev/badge/commands/openshift-eng/ai-helpers/analyze-regression.svg)](https://agentmods.dev/commands/openshift-eng/ai-helpers/analyze-regression)
Your own site
<a href="https://agentmods.dev/commands/openshift-eng/ai-helpers/analyze-regression"><img src="https://agentmods.dev/badge/commands/openshift-eng/ai-helpers/analyze-regression.svg" alt="Measured on agentmods" 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 19,046 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
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 $0.00012 $0.19046
Opus 5 $0.00006 $0.09523
Sonnet 5 $0.00002 $0.03809
Haiku 4.5 $0.00001 $0.01905

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

Security

Grade C, and why

analyze-regression scanned grade C 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 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.

Reaches for credential fileshighPrivilege escalation

SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.

This works because `oc` reads from `~/.kube/config` which is bind-mounted from the host. The token stored in the kubeconfig was obtained when the user previously ran `oc login` to the DPCR cluster on the host. If the tok
plugins/ci/commands/analyze-regression.md · 1,363 lines

How it starts

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

Name

ci:analyze-regression

Synopsis

/ci:analyze-regression <regression id>

Description

The ci:analyze-regression command analyzes details for a specific Component Readiness regression and suggests next steps for investigation.

The command performs a full analysis regardless of whether the regression has been triaged. For triaged regressions, it also fetches the linked JIRA issue to analyze whether someone is actively working on the fix or if the issue needs attention.

This command is useful for:

  • Understanding regression patterns and failure modes
  • Checking if a triaged regression is being actively worked on or needs attention
  • Identifying related regressions that might be caused by the same issue
  • Getting pointers on where to investigate next

Implementation

Important: Avoiding user permission prompts when running scripts

When calling Python skill scripts via the Bash tool, always run the script directly without piping the output through inline Python (python3 -c "..."). Complex piped commands trigger user permission prompts, while simple python3 script.py args calls are auto-approved.

  • Do: python3 script.py args --format json 2>/dev/null — run the script directly and process the JSON output in your reasoning
  • Don't: python3 script.py args | python3 -c "import json; ..." — piped inline Python triggers permission prompts

Parse and analyze the JSON output from scripts using your own reasoning capabilities rather than shell pipelines.

Obtaining the DPCR authentication token from mounted kubeconfig

The triage and bug filing steps (step 14) require a Bearer token from the DPCR cluster (api.cr.j7t7.p1.openshiftapps.com:6443). When running in a container with ~/.kube mounted (read-only), the token is extracted directly from the mounted kubeconfig using oc:

# Find the oc context for the DPCR cluster from the mounted kubeconfig
DPCR_CONTEXT=$(oc config get-contexts -o name 2>/dev/null | while read -r ctx; do
  server=$(oc config view -o jsonpath="{.clusters[?(@.name=='$(oc config view -o jsonpath="{.contexts[?(@.name=='$ctx')].context.cluster}" 2>/dev/null)')].cluster.server}" 2>/dev/null || echo "")
  server_clean=$(echo "$server" | sed -E 's|^https?://||')
  if [ "$server_clean" = "api.cr.j7t7.p1.openshiftapps.com:6443" ]; then
    echo "$ctx"
    break
  fi
done)

# Extract the token from the DPCR context
if [ -z "$DPCR_CONTEXT" ]; then
  echo "ERROR: Could not find a DPCR cluster context in kubeconfig. Set DPCR_CONTEXT manually or run: oc login https://api.cr.j7t7.p1.openshiftapps.com:6443"
  exit 1
fi
TOKEN=$(oc whoami -t --context="$DPCR_CONTEXT" 2>/dev/null)

Read the full file on GitHub · 1,363 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 · 1,363 lines · 12 tokens per session scan C 8b56677102a6

Subscribe to this mod's changes

analyze-regression is a command published in the GitHub repository openshift-eng/ai-helpers (116 stars, last pushed today), licensed Apache-2.0. It adds 12 tokens to every session and 19,046 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 1 finding (reaches for credential files). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.