/bigquery-ci-data:foundationsfrom bigquery-ci-data
Provides shared safety protocol, cost controls, bq CLI patterns, and caching workflow for BigQuery CI data queries. Use when querying OpenShift CI data.
Ships in bigquery-ci-data. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Shared foundations for all CI data BigQuery skills. Every skill in this plugin follows these protocols.
bq CLI installed and authenticated (gcloud auth login)| Project | Dataset | Purpose |
|---|---|---|
openshift-gce-devel | ci_analysis_us | Primary engineering CI data (jobs, junit, variants, labels) |
openshift-gce-devel | ci_analysis_qe | QE CI data (same schema as ci_analysis_us, smaller) |
openshift-ci-data-analysis | ci_data_autodl | Auto-collected data from test runs (disruption, CPU, audit logs, risk analysis, etc.) |
Always pass --project_id=<project> explicitly to all bq commands.
Non-negotiable. Every query follows this flow:
bq query --project_id=<project> --dry_run --use_legacy_sql=false '<query>'
bytes / 10^12 * $6.25 (on-demand pricing)When a table is partitioned, every query MUST include a filter on the partition column to avoid full-table scans. Use tight date ranges. Not all tables are partitioned (e.g. job_variants is small and unpartitioned).
When a table is clustered, filter on the clustering column too for major cost reduction.
After executing a query, save results to .work/bigquery-ci-data/ as JSON or CSV. Name files descriptively.
Always query fresh — never skip a query because a cached file with a similar name already exists. CI data changes continuously; stale cache files produce misleading results. Use cached files only for follow-up analysis of the same data within the same conversation, and re-query if more than 4 hours have passed since the cache was written.
For every user request:
Identify which table(s), date range, and filters are needed. Ask if date range is not specified — suggest a narrow range.
--use_legacy_sql=falsePresent query, run dry-run, calculate and report cost. Confirm with user if over $1.00. Strongly recommend narrowing if over $10.00.
mkdir -p .work/bigquery-ci-data
bq query --project_id=<project> --use_legacy_sql=false --format=json --max_rows=10000 '<query>' > .work/bigquery-ci-data/<descriptive-name>.json
Row limit caveat: --max_rows=10000 truncates output. Prefer SQL-level aggregation (GROUP BY, COUNT, AVG) or LIMIT so the query returns complete results within the cap. If raw rows are needed and the result hits 10,000 rows, increase --max_rows or add tighter filters before reporting totals or rankings from the output.
Parse cached results. Include summary statistics, notable patterns, links to prow jobs when relevant, and suggestions for follow-up queries.
All tables in ci_data_autodl automatically include three columns added by the ci-data-loader (not in the Go source schemas):
| Column | Type | Notes |
|---|---|---|
| JobRunName | STRING | Prow job run identifier |
| PartitionTime | TIMESTAMP | Partition column — always filter on this |
| Source | STRING | Data source identifier |
SELECT * on large tables.= not LIKE.--project_id=<project> explicitly! gcloud auth loginWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub openshift-eng/ai-helpers --plugin bigquery-ci-data4 skills in this plugin
/autodlUse when querying auto-collected CI data from test runs in BigQuery (ci_data_autodl dataset) including risk analysis, disruption, CPU metrics, audit logs, operator state, retry statistics, and control plane pod placement and memory/chai-presubmit-override-decisionsUse when monitoring CHAI presubmit agent decisions in BigQuery to analyze the breakdown of override, retest, and report-only actions on PR presubmit failures and estimate CI cost savings/jobs-and-testsUse when querying OpenShift CI prow job runs and junit test results in BigQuery (ci_analysis_us dataset) with deduplication, variant joins, and infrastructure failure filteringOther plugins' skills for the same job