How this skill is triggered — by the user, by Claude, or both
Slash command
/microshift-release:pre-checkThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
```bash
/microshift-release:pre-check [release_type] [version|time-range...] [--verbose]
MicroShift ships as a layered product on top of OCP. Every time OCP releases a new version (z-stream, EC, RC, or nightly), the MicroShift team must evaluate whether to participate — checking for CVEs, verifying RPM builds exist in Brew, and deciding whether to ask ART to create artifacts.
This command automates that evaluation (Phase 0 of the release process). It checks lifecycle status, OCP payload availability, advisory CVEs, nightly build gaps, and EC/RC readiness — then outputs a clear action per version: OK, SKIP, ASK ART, NEEDS REVIEW, or ALREADY RELEASED.
When a time range is provided (e.g., "this week"), it queries Red Hat Product Pages for OCP versions scheduled in that period and evaluates each one.
| Requirement | Needed for | Mandatory? |
|---|---|---|
| VPN | Brew RPM checks (nightly, EC/RC), advisory report | Yes for nightly/ecrc — xyz degrades gracefully (skips advisory, 90-day rule) |
ATLASSIAN_API_TOKEN | ART Jira queries, advisory report, OCPBUGS check | No — scripts degrade gracefully, but advisory/CVE/OCPBUGS analysis is skipped |
ATLASSIAN_EMAIL | ART Jira queries, advisory report, OCPBUGS check | No — same as above |
GITLAB_API_TOKEN | Advisory report for 4.20+ (shipment MR data) | No — advisory skipped for 4.20+ without it |
| Product Pages MCP | Time range lookups (e.g., "this week") | Only when using time ranges — not needed for explicit versions |
release_type (optional): One or more of Z, X, Y, RC, EC, nightly (case-insensitive). If omitted, defaults to Z.version (optional): Specific version (e.g., 4.19.27) or minor stream (e.g., 4.21)time-range (optional): Natural language time range instead of explicit versions. Detected by keywords like:
today, tomorrowthis week, next week, last weeknext 3 days, next 7 daysApril, this month--verbose (optional): Show extra detail (tables for xyz, NVR/nightly names for nightly, next versions for EC/RC).All scripts are run relative to the repository root:
SCRIPTS_DIR=plugins/microshift-release/scripts
release_type(s) — tokens matching Z, X, Y, RC, EC, nightly (case-insensitive)version(s) — tokens matching X.Y or X.Y.Z patterntime range — remaining tokens that are not release types, versions, or flags (e.g., "this week", "next 3 days", "tomorrow")--verbose flagZ and treat version/time-range tokens accordinglyIf a time range is present instead of explicit versions, query Product Pages to find OCP z-stream versions scheduled in that period:
mcp__productpages__list_entities with public_parent_id=146 (OCP product), kind="release", shortname="%z", is_maintained=True. Filter results to 4.14+ only (MicroShift GA'd at 4.14 — older z-release entities have no MicroShift images).mcp__productpages__browse_schedule and find tasks where:
flags contains "ga" (these are the "X.Y.Z in Fast Channel" milestones)date_finish falls within [date_from, date_to]4.21.10)If the mcp__productpages__list_entities tool is not available (MCP not loaded), stop and show this message verbatim:
The Product Pages MCP is required for time-range lookups but is not enabled in this session.
To enable it, run this command:
```bash
claude mcp add productpages -s user --transport http https://productpages.redhat.com/mcp --header "X-MCP-Realm: urn:mcp:realm:private-core"
Then restart Claude Code and re-run the command.
Alternatively, pass explicit versions instead of a time range: /microshift-release:pre-check 4.19.X 4.20.X 4.21.X
If no versions found in the schedule, report "No OCP releases scheduled in <range>."
### Step 3: Run the Script
Map each release type to the corresponding `precheck.sh` subcommand and run via Bash:
| Release Type | Command |
|---|---|
| `Z`, `X`, `Y` (default) | `bash ${SCRIPTS_DIR}/precheck.sh xyz [versions...]` |
| `nightly` | `bash ${SCRIPTS_DIR}/precheck.sh nightly [version]` |
| `EC` | `bash ${SCRIPTS_DIR}/precheck.sh ecrc EC [version]` |
| `RC` | `bash ${SCRIPTS_DIR}/precheck.sh ecrc RC [version]` |
**IMPORTANT**: Only append `--verbose` to the command if the user explicitly passed `--verbose` in their arguments. Do NOT add it by default.
Stderr contains progress messages — only display it if the script exits non-zero.
**Multiple types** (e.g., `nightly EC RC`): Run each command as a separate Bash call in parallel.
### Step 4: Display Output
Display the script output **verbatim** — do not reformat, add tables, or change the layout. The scripts produce deterministic pre-formatted text. Do NOT add any commentary, explanation, or summary after the output.
**OCPBUGS follow-up**: If any version shows OCPBUGS in the output (e.g., `1 OCPBUGS`), automatically re-run the command with `--verbose` to list the specific bugs. Only do this once — do not re-run if `--verbose` was already passed.
### Step 5: Handle Errors
If the script exits non-zero, display stderr and suggest:
- VPN not connected → connect to VPN (Brew requires it)
- Missing env vars → set `ATLASSIAN_API_TOKEN`, `ATLASSIAN_EMAIL`, `GITLAB_API_TOKEN` (for 4.20+)
## Examples
```bash
/microshift-release:pre-check this week # OCP versions releasing this week
/microshift-release:pre-check next week # OCP versions releasing next week
/microshift-release:pre-check today # OCP versions releasing today
/microshift-release:pre-check next 3 days # OCP versions in next 3 days
/microshift-release:pre-check 4.21.10 # specific version
/microshift-release:pre-check 4.20 4.21 4.22 # xyz eval for multiple streams
/microshift-release:pre-check 4.19.27 --verbose # specific version, detailed report
/microshift-release:pre-check nightly # nightly gaps for all active branches
/microshift-release:pre-check EC # latest EC status
/microshift-release:pre-check RC # latest RC status
/microshift-release:pre-check nightly EC RC # combined report
search_entities("OpenShift Container Platform", kind="product") — hardcoded to skip one API call)openshift-X.Y.z (e.g., openshift-4.21.z)"ga" flag = version GA dates ("X.Y.Z in Fast Channel")date_finish on ga-flagged tasks = release date--json for raw JSON output when called directly (e.g., bash ${SCRIPTS_DIR}/precheck.sh xyz 4.21.10 --json)--verbose works for all types: detailed tables for xyz, NVR/nightly names for nightly, next versions for EC/RCGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub openshift-eng/edge-tooling --plugin microshift-release