Switch red-hat-product-lifecycle skill to API-based script#1
Conversation
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>
|
Comes from RHEcosystemAppEng/agentic-plugins#127, see comments there for before/after comparison. |
r2dedios
left a comment
There was a problem hiding this comment.
the catalog files descriptions are wrong (YAML / JSON).:
https://github.com/javierpena/agentic-collections-skills/blob/b55fe2208bef2febc8393716bb75e5468ec7a340/rh-basic/.catalog/collection.yaml#L26
This skill doesn't failback with WebFetch, it uses a python script
Just a few minor observations. Good job!
| model: inherit | ||
| color: cyan | ||
| allowed-tools: | ||
| allowed-tools: Bash |
There was a problem hiding this comment.
Bash is not a valid MCP tool.
Check this example:
There was a problem hiding this comment.
Ah, I see. From Claude's point of view, Bash is a built-in tool, so that is why it was added. I'll remove it.
| 3. Return current phase, key dates, and action recommendation. | ||
| 2. Run the lifecycle script via Bash: | ||
| ``` | ||
| python scripts/rh_lifecycle.py "Product Name Version" |
There was a problem hiding this comment.
In general, Claude runs commands from the repo root folder, not from the running skill folder..
Check this example:
I propose to change it by:
python rh-basic/skills/red-hat-product-lifecycle/scripts/rh_lifecycle.py "Product Name Version"
There was a problem hiding this comment.
Will do, thanks!
Should I implement the WebFetch failback in the skill? If the API is down, any web page using it will also be down. |
I don't think that's necessary, Just update the description of the catalog collection so it matches with the skills and scripts behavior. Only documentation changes, not functional |
Previously all skills fetched information directly using WebFetch, but the updated red-hat-product-lifecycle skill uses the API.
Ack, I just did that with the latest commit. |
There was a problem hiding this comment.
There's one more step.. We need to update the JSON version of the collection.yaml file.
Collection compliance failed:
• rh-basic: .catalog/collection.json content differs from collection.yaml (run diff or regenerate JSON to inspect)
• rh-basic: regenerate mirror with: uv run python scripts/catalog_yaml_to_json.py --pack rh-basic
|
Done! I had to take the script from the previous repo, btw. |
Good catch! We will check this missing script |
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-adminrh-ai-engineerrh-automationrh-basicrh-developerrh-srerh-virtChange type
mcps.json)Contribution method
/agentic-contribution-skillmake validate+make validate-skill-design-changed)AGENTS.md compliance
${VAR}referencesValidation
make validatepasses locallyname,description)name,description)