/rh-sre:system-contextfrom rh-sre
**CRITICAL**: This skill must be used for system inventory and context gathering. DO NOT use raw MCP tools like get_cve_systems or get_host_details directly. Gather system inventory and deployment context for CVE-affected systems, including RHEL version detection, environment classification, and deployment analysis. Use when: - "What systems are affected by CVE-X?" - "Gather system context for remediation planning" - "Analyze deployment architecture for CVE" - "Detect RHEL versions across affected systems" This skill orchestrates MCP tools (get_cve_systems, get_host_details) for system analysis. **IMPORTANT**: ALWAYS use this skill instead of calling get_cve_systems or get_host_details directly for system context gathering.
Ships in rh-sre. 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.
This skill gathers comprehensive system inventory and deployment context for CVE-affected systems, enabling informed remediation strategy decisions.
Integration with Remediation Skill: The /remediation skill orchestrates this skill as part of its Step 3 (Gather Context) workflow. For standalone system analysis, you can invoke this skill directly.
Use this skill directly when you need:
Use the /remediation skill when you need:
How they work together: The /remediation skill uses this skill's output to determine remediation strategy (batch vs individual, Kubernetes pod eviction requirements, maintenance window needs, etc.).
MCP Tool: get_cve_systems or vulnerability__get_cve_systems (from lightspeed-mcp)
Parameters:
cve_id: Exact CVE identifier (format: "CVE-YYYY-NNNNN")
"CVE-2024-1234"limit: Optional number of systems to return (default: all)
100offset: Optional pagination offset (default: 0)
0Expected Output: List of system UUIDs and basic metadata
Example Response:
{
"systems": [
{
"id": "uuid-1",
"hostname": "web-server-01",
"display_name": "web-server-01.prod.example.com"
},
{
"id": "uuid-2",
"hostname": "web-server-02",
"display_name": "web-server-02.prod.example.com"
}
],
"total": 2
}
MCP Tool: get_host_details or inventory__get_host_details (from lightspeed-mcp)
Parameters:
system_id: UUID of the system to retrieve (from get_cve_systems result)
"uuid-1"include_system_profile: true (retrieve complete system profile including packages, services)
trueinclude_tags: Optional boolean to include system tags (default: true)
trueExpected Output: Detailed system profile
Key Information to Extract:
System Profile Structure:
{
"id": "uuid-1",
"hostname": "web-server-01",
"display_name": "web-server-01.prod.example.com",
"rhel_version": "8.9",
"os_release": "Red Hat Enterprise Linux 8.9 (Ootpa)",
"system_profile": {
"os_release": "8.9",
"arch": "x86_64",
"kernel_version": "4.18.0-513.el8.x86_64",
"number_of_cpus": 4,
"number_of_sockets": 1,
"cores_per_socket": 4,
"system_memory_bytes": 17179869184,
"infrastructure_type": "virtualized",
"infrastructure_vendor": "kvm",
"network_interfaces": [
{
"name": "eth0",
"ipv4_addresses": ["10.0.1.10"]
}
],
"installed_packages": [...],
"enabled_services": ["httpd", "sshd", ...],
"running_processes": [...]
},
"tags": [
{"namespace": "environment", "key": "env", "value": "production"},
{"namespace": "role", "key": "role", "value": "web-server"},
{"namespace": "criticality", "key": "level", "value": "high"}
]
}
Synthesize gathered information to understand deployment architecture:
A. RHEL Version Distribution:
Affected Systems by RHEL Version:
- RHEL 7: 3 systems (15%)
- RHEL 8: 15 systems (75%)
- RHEL 9: 2 systems (10%)
Remediation Consideration:
→ Playbook must support multiple RHEL versions (use conditional yum/dnf)
B. Environment Classification:
Affected Systems by Environment:
- Production: 12 systems (60%) - HIGH PRIORITY
- Staging: 5 systems (25%) - MEDIUM PRIORITY
- Development: 3 systems (15%) - LOW PRIORITY
Remediation Strategy:
→ Remediate staging first for validation
→ Schedule maintenance window for production
→ Development can be patched anytime
C. System Type Distribution:
Affected Systems by Type:
- Bare metal: 12 systems (60%) - STANDARD REMEDIATION
- VMs (VMware): 8 systems (40%) - STANDARD REMEDIATION
Deployment Type:
→ Standard remediation workflow
→ Consider reboot requirements
→ Schedule maintenance windows for critical systems
D. System Criticality:
Affected Systems by Criticality:
- Critical (payment, auth): 5 systems - NEEDS MAINTENANCE WINDOW
- High (web, api): 10 systems - NEEDS TESTING
- Medium (internal tools): 3 systems - STANDARD DEPLOYMENT
- Low (dev, test): 2 systems - IMMEDIATE DEPLOYMENT OK
Remediation Approach:
→ Test on low-criticality systems first
→ Schedule maintenance for critical systems
→ Use rolling updates for high-availability services
Based on gathered context, recommend remediation strategy:
Decision Matrix:
| Context | Remediation Strategy |
|---|---|
| Single system, non-K8s | Standard playbook, immediate execution possible |
| Multiple systems, same RHEL version | Batch playbook, parallel execution |
| Multiple systems, mixed RHEL versions | Batch playbook with version conditionals |
| Kubernetes nodes | Rolling update with pod eviction |
| Critical production systems | Maintenance window required, staged rollout |
| Mixed environments | Remediate staging → validate → production |
Strategy Output:
remediation_strategy:
approach: "rolling_update" # or "batch", "individual", "staged"
requires_maintenance_window: true
suggested_window: "Weekend, off-peak hours"
requires_pod_eviction: true
pod_eviction_strategy: "one_node_at_a_time"
batch_size: 5
parallel_execution: true
test_first_on:
- "staging-web-01"
- "staging-web-02"
rollout_order:
- phase: "validation"
systems: ["staging-web-01", "staging-web-02"]
wait_for_verification: true
- phase: "production_batch_1"
systems: ["prod-web-01", "prod-web-02", "prod-web-03"]
requires_approval: true
- phase: "production_batch_2"
systems: ["prod-web-04", "prod-web-05"]
requires_approval: false
estimated_duration_minutes: 60
estimated_downtime_per_system: 5
Return comprehensive context for remediation planning:
{
"cve_id": "CVE-YYYY-NNNNN",
"affected_systems": {
"total": 20,
"by_rhel_version": {
"rhel7": 3,
"rhel8": 15,
"rhel9": 2
},
"by_environment": {
"production": 12,
"staging": 5,
"development": 3
},
"by_type": {
"kubernetes": 8,
"bare_metal": 7,
"vm": 5
},
"by_criticality": {
"critical": 5,
"high": 10,
"medium": 3,
"low": 2
}
},
"kubernetes_context": {
"has_k8s_nodes": true,
"total_k8s_nodes": 8,
"clusters": ["prod-cluster-01", "staging-cluster-01"],
"total_pods_affected": 150,
"has_pdbs": true,
"daemonsets_present": true
},
"remediation_strategy": {
"approach": "rolling_update",
"requires_maintenance_window": true,
"requires_pod_eviction": true,
"batch_size": 5,
"estimated_duration_minutes": 60
},
"recommendations": [
"Test in staging environment first (5 systems available)",
"Schedule maintenance window for production (12 critical systems)",
"Use rolling updates with pod eviction for Kubernetes nodes",
"Playbook must support RHEL 7, 8, and 9",
"Consider batch size of 5 systems for parallel execution"
]
}
When completing context gathering, provide output in this format:
# System Context Analysis
## CVE: CVE-YYYY-NNNNN
## Affected Systems Summary
**Total Systems**: 20
### By RHEL Version
- RHEL 7: 3 systems (15%)
- RHEL 8: 15 systems (75%)
- RHEL 9: 2 systems (10%)
### By Environment
- Production: 12 systems (60%) - HIGH PRIORITY
- Staging: 5 systems (25%) - TEST FIRST
- Development: 3 systems (15%)
### By System Type
- Kubernetes nodes: 8 systems (40%) - REQUIRES POD EVICTION
- Bare metal: 7 systems (35%)
- VMs: 5 systems (25%)
### By Criticality
- Critical: 5 systems (payment, auth services)
- High: 10 systems (web, API services)
- Medium: 3 systems (internal tools)
- Low: 2 systems (dev/test)
## Kubernetes Deployment
**Kubernetes Nodes**: 8 systems
**Clusters**: prod-cluster-01 (5 nodes), staging-cluster-01 (3 nodes)
**Total Pods Affected**: ~150 pods
**PodDisruptionBudgets**: Present (payment service, auth service)
**DaemonSets**: node-exporter, fluent-bit
## Recommended Remediation Strategy
**Approach**: Rolling Update with Pod Eviction
**Execution Plan**:
1. **Phase 1 - Validation** (Staging):
- Systems: staging-web-01, staging-web-02 (5 systems)
- Test playbook execution
- Verify no issues before production
2. **Phase 2 - Production Batch 1**:
- Systems: prod-web-01 to prod-web-05 (5 systems)
- Requires approval after staging validation
- Rolling update with pod eviction
3. **Phase 3 - Production Batch 2**:
- Systems: prod-web-06 to prod-web-10 (5 systems)
- Continue if Batch 1 successful
**Requirements**:
- Maintenance window: Weekend off-peak hours
- Pod eviction strategy: One node at a time
- Batch size: 5 systems (parallel execution)
- Estimated duration: 60 minutes total
- Estimated downtime per system: ~5 minutes
**Safety Measures**:
- Test in staging first
- Rolling updates maintain service availability
- PodDisruptionBudgets respected
- Rollback capability via snapshots (RHEL 8/9)
## Next Steps
1. Review remediation strategy
2. Schedule maintenance window for production
3. Generate remediation playbook (use playbook-generator skill)
4. Execute in staging for validation
5. Proceed with production deployment
User Request: "Gather context for CVE-2024-1234"
Skill Response:
get_cve_systems → 5 systems affectedget_host_details for each → All RHEL 8, production web serversUser Request: "Gather context for kernel CVE affecting production environment"
Skill Response:
get_cve_systems → 10 systems affectedget_host_details → Mixed RHEL 8/9, production environmentUser Request: "Gather context for CVE affecting dev, staging, and prod"
Skill Response:
get_cve_systems → 20 systems across 3 environmentsget_host_details → Extract environment tagsNo systems affected:
CVE-YYYY-NNNNN Analysis Complete
Good news! No systems in your infrastructure are currently affected by this CVE.
Possible reasons:
- Systems are already patched
- Vulnerable packages are not installed
- Systems are running different versions
No remediation required.
Lightspeed inventory access error:
Unable to retrieve system details from Red Hat Lightspeed inventory.
Possible causes:
- Systems not registered to Red Hat Lightspeed
- Lightspeed inventory sync pending
- API authentication issue
Suggestions:
- Verify systems are registered: subscription-manager status
- Check Lightspeed connection: insights-client --status
- Re-run inventory sync: insights-client --register
System tagging incomplete:
Unable to fully classify systems due to incomplete tagging.
Proceeding with Red Hat Lightspeed data only.
Note: Environment and criticality tags missing from some systems.
To improve system classification:
1. Add environment tags to systems in Red Hat Lightspeed
2. Add criticality/role tags for better prioritization
3. Ensure all systems are registered and reporting
lightspeed-mcp - Red Hat Lightspeed platform accessget_cve_systems or vulnerability__get_cve_systems (from lightspeed-mcp) - List systems affected by CVE
get_host_details or inventory__get_host_details (from lightspeed-mcp) - Get detailed system information
cve-impact - Provides CVE severity to inform criticality assessmentplaybook-generator - Consumes context to generate appropriate remediation playbookremediation-verifier - Uses system context to verify remediation on correct systemscve-validation - Validates CVE before gathering affected systemsWhat SKILL.md sets; muted values are Claude Code's defaults
inheritOther plugins' skills for the same job
npx claudepluginhub rhecosystemappeng/agentic-catalog --plugin rh-sre13 skills in this plugin
/cve-impact**CRITICAL**: Use for ALL CVE discovery and listing. DO NOT call get_cves directly.
Use when: "show critical CVEs", "CVEs on hostname X", "remediatable vulnerabilities", "impact of CVE-X", risk assessment.
NOT for remediation (use `/remediation`).
System-level: FIRST reply = pagination prompt (Step -1). Parsing: scripts/01-cve-response-parser.py.
/cve-validation**CRITICAL**: This skill must be used for CVE validation queries. DO NOT use raw MCP tools like get_cve directly.
Validate CVE identifiers and check remediation availability in Red Hat Lightspeed.
Use when:
- "Is CVE-2024-1234 valid and remediable?"
- "Check if CVE-X has automated remediation available"
- "Verify these CVEs before creating a playbook"
- "Validate CVE list for batch remediation"
**DO NOT use this skill when** user requests full remediation - use `/remediation` skill instead:
- "Create a remediation playbook for CVE-X" → `/remediation` skill
- "Create playbook and execute it" → `/remediation` skill
- "Remediate CVE-X" / "Patch CVE-X" → `/remediation` skill
This skill orchestrates MCP tools (get_cve) for CVE validation. The `/remediation` skill invokes this skill as Step 2 of its workflow.
/execution-summaryGenerates a concise report of agents, skills, tools, and documentation accessed during a workflow for audit and learning purposes.
Use when:
- "Generate execution summary"
- "Create execution report"
- "Summarize what was used"
- "Show execution summary"
- "What agents/skills/tools were used?"
/fleet-inventoryQuery and display Red Hat Lightspeed managed system inventory. This skill focuses on discovery and listing only - for remediation actions, transition to the `/remediation` skill.
Use when:
- "Show the managed fleet"
- "List all systems registered in Lightspeed"
- "What systems are affected by CVE-X?"
- "How many RHEL 8 systems do we have?"
- "Show me production systems"
**When NOT to use this skill** (use `/remediation` skill instead):
- "Remediate CVE-X on these systems"
- "Create a playbook for..."
- "Patch system Y"
This skill orchestrates MCP tools from lightspeed-mcp for fleet visibility and system inventory management.
/job-template-creatorCreate AAP (Ansible Automation Platform) job templates for executing playbooks. Use when users request:
- "Create a job template for this playbook"
- "Set up a template to run remediation playbooks"
- "Configure AAP to execute this playbook"
- "Add a new job template for CVE remediation"
This skill guides through adding playbooks to Git projects and creating job templates via AAP Web UI.
/job-template-remediation-validatorVerify an AAP job template meets requirements for executing CVE remediation playbooks.
Use when:
- "Does this job template support remediation playbooks?"
- "Validate job template X for CVE remediation"
- "Check if template is ready for playbook-executor"
- Before playbook-executor selects a template
NOT for: AAP MCP connectivity (use `/mcp-aap-validator`), creating templates (use `/job-template-creator`).