Skip to content
This repository was archived by the owner on Jun 30, 2026. It is now read-only.

Switch red-hat-product-lifecycle skill to API-based script#127

Closed
javierpena wants to merge 1 commit into
RHEcosystemAppEng:mainfrom
javierpena:lifecycle-script
Closed

Switch red-hat-product-lifecycle skill to API-based script#127
javierpena wants to merge 1 commit into
RHEcosystemAppEng:mainfrom
javierpena:lifecycle-script

Conversation

@javierpena

Copy link
Copy Markdown

Summary

Replace WebFetch scraping with a stdlib Python script that queries the official Red Hat lifecycle API directly, returning structured JSON for reliable parsing across all products and versions.

Pack(s) affected

  • ocp-admin
  • rh-ai-engineer
  • rh-automation
  • rh-basic
  • rh-developer
  • rh-sre
  • rh-virt
  • Other / repo-wide

Change type

  • New skill
  • New agent
  • New pack
  • Update existing skill / agent
  • MCP server config (mcps.json)
  • Docs / README
  • CI / tooling
  • Federation (external pack)

Contribution method

  • Created/imported with /agentic-contribution-skill
  • Manual contribution (validated with make validate + make validate-skill-design-changed)

AGENTS.md compliance

  • Agents orchestrate skills; no direct MCP/tool calls in agents
  • Skills are single-purpose task executors
  • Skills encapsulate all tool access (MCP tools invoked only inside skills)
  • Document consultation: file is read with the Read tool, then declared to the user
  • No credentials hardcoded; env vars used via ${VAR} references
  • Human-in-the-loop confirmation added for any destructive or critical operations

Validation

  • make validate passes locally
  • New/changed skills have valid YAML frontmatter (name, description)
  • New/changed agents have valid YAML frontmatter (name, description)

Replace WebFetch scraping with a stdlib Python script that queries the
official Red Hat lifecycle API directly, returning structured JSON for
reliable parsing across all products and versions.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@javierpena

Copy link
Copy Markdown
Author

I have run a test to compare the unchanged skill with my commit, and it is faster to provide a response with a smaller token usage, since it uses the API directly instead of fetching large web pages and scanning through them:

New version

❯ What is the end of support date for OpenShift 4.22?                                                                                                                                                                                  

● Skill(red-hat-product-lifecycle)
  ⎿  Successfully loaded skill

  Thought for 2s (ctrl+o to expand)

● Bash(python /home/jpena/.claude/skills/red-hat-product-lifecycle/scripts/rh_lifecycle.py "OpenShift 4.22")
  ⎿  Error: Exit code 1
     {
       "error": "Version '4.22' not found for 'Red Hat OpenShift GitOps'",
       "available_versions": [
         "1.20",
         "1.19",
         "1.18",
         "1.17",
         "1.16",
         "1.15",
     … +16 lines (ctrl+o to expand)

● Bash(python /home/jpena/.claude/skills/red-hat-product-lifecycle/scripts/rh_lifecycle.py "Red Hat OpenShift Container Platform 4.22")
  ⎿  {
       "product": "Red Hat OpenShift Container Platform",
       "version": "4.22",
     … +32 lines (ctrl+o to expand)

● OpenShift Container Platform 4.22

  Phase: Full Support
  Dates: GA June 9, 2026 | End Full Support Dec 31, 2026 | End Maintenance Dec 31, 2027 | End EUS Term 2 June 30, 2029

  What this means: OCP 4.22 is currently in Full Support, receiving Critical/Important CVE fixes, urgent bug fixes, and hardware enablement updates.

  Action: Apply updates on your normal cadence. Note that 4.22 is an even-numbered minor release, making it eligible for Extended Update Support (EUS) — if you need a longer stable window, ensure your subscription covers EUS terms
  (extends support through June 30, 2029 with Terms 1 and 2).


  Session

  Total cost:            $0.4108
  Total duration (API):  18s
  Total duration (wall): 1m 1s
  Total code changes:    0 lines added, 0 lines removed
  Usage by model:
     claude-sonnet-4-6:  382 input, 513 output, 35.4k cache read, 104.4k cache write ($0.4108)

Old version

❯ What is the end of support date for OpenShift 4.22?                                                                                                                                                                                  

● Skill(red-hat-product-lifecycle)
  ⎿  Successfully loaded skill  

  Thought for 3s (ctrl+o to expand)

● Fetch(https://access.redhat.com/support/policy/updates/openshift)
  ⎿  Received 88.1KB (200 OK)

● Fetch(https://access.redhat.com/product-life-cycles?product=OpenShift%20Container%20Platform%204)
  ⎿  Received 62.4KB (200 OK)

  Thought for 2s (ctrl+o to expand)
  ⎿  Invalid tool parameters

● Web Search("OpenShift Container Platform 4.22 GA date end of life support dates 2026")
  ⎿  Did 7 searches in 45s

  Thought for 3s (ctrl+o to expand)

● Fetch(https://access.redhat.com/support/policy/updates/openshift_operators)
  ⎿  Received 1.5MB (200 OK)

● OpenShift Container Platform 4.22

  Phase: Full Support (as of June 26, 2026)
  Dates: GA June 9, 2026 | End Full Support December 31, 2026 | End Maintenance December 31, 2027 | EUS End June 30, 2028

  What this means: OCP 4.22 is an EUS (even-numbered) release currently in Full Support. It receives Critical/Important CVE fixes and urgent bug fixes. After December 31, 2026 it moves to Maintenance (security patches only), ending
  December 31, 2027 — or June 30, 2028 with the EUS add-on.

  Action: Apply updates on your normal cadence. If long-term stability is a priority, ensure you have an EUS subscription to extend support through June 30, 2028. With all three EUS terms, maximum support extends up to ~48 months
  from GA.

  Sources:
  - OpenShift Operator Life Cycles | Red Hat Customer Portal
  - OpenShift Container Platform Life Cycle | Red Hat Customer Portal
  - Product Life Cycles | Red Hat Customer Portal


  Session

  Total cost:            $1.07
  Total duration (API):  1m 27s
  Total duration (wall): 2m 27s
  Total code changes:    0 lines added, 0 lines removed
  Usage by model:
     claude-sonnet-4-6:  275.8k input, 3.3k output, 240.5k cache read, 13.0k cache write, 7 web search ($1.07)

@dmartinol

Copy link
Copy Markdown
Collaborator

Thank you for your contribution!
This repo will be soon archived and we're not accepting new commits.
Please move these changes to the new location at https://github.com/RHEcosystemAppEng/agentic-collections-skills

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants