query

query is a command for Claude Code from openshift-eng/ai-helpers. It costs 21 tokens per session (625 once invoked), scanned A, original, Apache-2.0.

A general command for asking questions about OpenShift CI data stored in BigQuery, a cloud database for large datasets. It routes questions about jobs, tests, automatically collected run data, and presubmit-agent decisions to the relevant data source.

In plain words
What is it for?
Use it to ask about job pass rates, test failures and retries, risk or infrastructure trends, and presubmit override decisions.
Why use it?
It avoids needing to know the underlying tables and gives one entry point for investigating CI performance and failures.

Command for Claude Code

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

Part of the bigquery-ci-data plugin — 4 skills, 1 command shipped together

Good fit Use it to ask about job pass rates, test failures and retries, risk or infrastructure trends, and presubmit override decisions.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/openshift-eng/ai-helpers/query
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 bigquery-ci-data, the plugin that ships this one along with the rest of its 4 skills, 1 command.

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 query

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/openshift-eng/ai-helpers/query"><img src="https://agentmods.dev/badge/commands/openshift-eng/ai-helpers/query.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 625 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.
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.00021 $0.00625
Opus 5.5 $0.00008 $0.00250
Sonnet 5.5 $0.00004 $0.00125
Haiku 4.5 $0.00002 $0.00063

Measured 16d ago against content hash 6c0aa95ae622, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

query 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 16d 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.

plugins/bigquery-ci-data/commands/query.md · 75 lines

How it starts

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

Name

bigquery-ci-data:query

Synopsis

/bigquery-ci-data:query what is the pass rate for periodic aws jobs on 4.22 this week?
/bigquery-ci-data:query which tests have the most retries in the last 7 days?
/bigquery-ci-data:query show me operator degraded time trends for etcd this month
/bigquery-ci-data:query what override decisions has the chain presubmit agent made recently?

Description

General-purpose entry point for querying OpenShift CI data stored in BigQuery. Understands multiple datasets and routes to the appropriate tables based on the question.

The command covers:

  • Jobs and tests (ci_analysis_us): Prow job pass rates, junit test failures/flakes, variant analysis
  • Autodl data (ci_data_autodl): Risk analysis, retry statistics, operator state, CPU metrics, audit logs, disruption
  • Agent decisions (ci_analysis_us): Chain presubmit override decisions

Implementation

Steps

  1. Parse the question: Determine which domain(s) and table(s) are needed:

    • Job pass rates, test failures, variant breakdowns → use jobs-and-tests skill
    • Risk analysis, retries, operator state, CPU, audit logs, disruption, instance types → use autodl skill
    • Presubmit override decisions → use chai-presubmit-override-decisions skill
    • Always load the foundations skill for cost safety protocol
  2. Identify parameters: Extract or ask for:

    • Date range (suggest 7 days if not specified)
    • Release version (if relevant)
    • Specific job names, test names, operators, etc.
  3. Build and execute query following the foundations workflow:

    • Show query to user
    • Dry-run for cost estimate
    • Confirm if over $1.00
    • Execute and cache results
    • Analyze and report findings
  4. Present results with summary statistics, notable patterns, and suggestions for follow-up.

Arguments

  • question (required): Natural language description of what CI data to investigate

Examples

  1. Test failure investigation:
    /bigquery-ci-data:query how often is kube-apiserver readyz failing on 4.22 this week?
    

Read the full file on GitHub · 75 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. 16d ago First seen · 75 lines · 21 tokens per session scan A 6c0aa95ae622

Subscribe to this mod's changes

query is a command published in the GitHub repository openshift-eng/ai-helpers (121 stars, last pushed today), licensed Apache-2.0. It adds 21 tokens to every session and 625 once invoked, about $0.0001 per session on Opus 5.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-10-06.