/rh-sre:job-template-remediation-validatorfrom rh-sre
Verify 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`).
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 verifies that an AAP (Ansible Automation Platform) job template meets the requirements for executing CVE remediation playbooks as defined by the remediation skill and playbook-executor workflow.
Required MCP Servers: aap-mcp-job-management, aap-mcp-inventory-management (setup guide)
Required MCP Tools:
job_templates_list (from aap-mcp-job-management) - List job templatesjob_templates_retrieve (from aap-mcp-job-management) - Get template detailsprojects_list (from aap-mcp-job-management) - Verify project exists and statusinventories_list (from aap-mcp-inventory-management) - Verify inventory existsRequired Environment Variables:
AAP_MCP_SERVER - Base URL for the MCP endpoint of the AAP server (must point to the AAP MCP gateway)AAP_API_TOKEN - AAP API authentication tokenCRITICAL: Before executing, execute the /mcp-aap-validator skill to verify AAP MCP server availability.
Validation freshness: Can skip if already validated in this session..
How to invoke: Execute the /mcp-aap-validator skill
Handle validation result:
Human Notification on Failure: If prerequisites are not met:
Use this skill when:
Do NOT use when:
/mcp-aap-validator skill/job-template-creator skill/playbook-executor skillThis skill validates against the requirements documented in the playbook-executor and job-template-creator skills.
| Requirement | Description | Validation |
|---|---|---|
| Inventory | Template has inventory configured | inventory field present and non-null |
| Project | Template has project configured | project field present and non-null |
| Playbook | Template has playbook path | playbook field present, non-empty |
| Credentials | Machine credential (SSH) configured | summary_fields.credentials or credentials has at least one credential |
| Privilege Escalation | Required for package updates | become_enabled is true |
| Ask Job Type on Launch | Required for dry-run and run modes | ask_job_type_on_launch is true |
Why Ask Job Type on Launch: playbook-executor uses the same template for dry-run (job_type: "check") and actual execution (job_type: "run"). Without ask_job_type_on_launch: true, the template is locked to one mode and you would need separate templates for check vs run.
Example: Template with job_type: "check" (default) and ask_job_type_on_launch: true allows launching as check for dry-run or run for execution.
| Requirement | Description | Validation |
|---|---|---|
| Ask Variables on Launch | Enables dynamic CVE targeting | ask_variables_on_launch is true |
| Ask Limit on Launch | Enables host targeting at launch | ask_limit_on_launch is true |
| Ask Inventory on Launch | Enables inventory override at launch | ask_inventory_on_launch is true |
| Check | Description |
|---|---|
| Project Status | Project exists and is synced (status "successful") |
| Inventory Exists | Inventory exists in AAP |
| Playbook Path | Path suggests remediation playbook (e.g., contains "remediation") |
| Playbook Path Matching | When used by playbook-executor (Scenario 3), the template's playbook path is trusted to match the playbook just created via job-template-creator |
Action: Execute the /mcp-aap-validator skill
Note: Can skip if validation was performed earlier in this session and succeeded.
Handle validation result:
Goal: Get the job template to validate. User may provide template ID or name.
If user specifies a template ID (e.g., "42" or "template 42"):
MCP Tool: job_templates_retrieve (from aap-mcp-job-management)
Parameters:
id: Template ID as string (e.g., "42")Expected Output: Full job template object with fields: id, name, inventory, project, playbook, become_enabled, ask_variables_on_launch, ask_limit_on_launch, summary_fields (may include credentials), credentials (array of credential IDs)
Error Handling:
If user says "validate my remediation template" or provides a name:
MCP Tool: job_templates_list (from aap-mcp-job-management)
Parameters:
page_size: 50search: User-provided name or "remediation" (optional)Action: List templates, let user select by number or ID. If exactly one match, use it. If multiple, present list and ask user to choose.
Goal: Check each required field against the template response.
Input: Template object from job_templates_retrieve
Validation Logic:
required_checks = []
required_checks.append(("Inventory", template.get("inventory") is not None and template.get("inventory") != ""))
required_checks.append(("Project", template.get("project") is not None and template.get("project") != ""))
required_checks.append(("Playbook", template.get("playbook") is not None and len(str(template.get("playbook", "")).strip()) > 0))
required_checks.append(("Privilege Escalation", template.get("become_enabled") == True))
# Credentials: AAP API may return credentials in summary_fields.credentials or credentials array
creds = template.get("summary_fields", {}).get("credentials") or template.get("credentials") or []
has_creds = (isinstance(creds, list) and len(creds) > 0) or (isinstance(creds, dict) and creds)
required_checks.append(("Credentials", has_creds))
required_checks.append(("Ask Job Type on Launch", template.get("ask_job_type_on_launch") == True))
Note: If the AAP MCP response structure differs, adapt the field paths. Common AAP API response structures:
inventory: number (ID)project: number (ID)playbook: string (path)become_enabled: booleancredentials: array of credential IDs, or summary_fields.credentials array of objects with id, nameValidation Logic:
recommended_checks = []
recommended_checks.append(("Ask Variables on Launch", template.get("ask_variables_on_launch") == True))
recommended_checks.append(("Ask Limit on Launch", template.get("ask_limit_on_launch") == True))
recommended_checks.append(("Ask Inventory on Launch", template.get("ask_inventory_on_launch") == True))
Goal: Verify referenced project and inventory exist and are usable.
Step 4.1: Verify Project Exists and Status
MCP Tool: projects_list (from aap-mcp-job-management)
Parameters:
page_size: 100search: Optional - filter by project ID if API supports itAction: Search results for id == template["project"]. If found, check status:
"successful": ✓ Project synced, playbooks available"failed" or "error": ⚠ Project sync failed - playbooks may be stale"pending" or "running": ⚠ Project syncing - wait before useStep 4.2: Verify Inventory Exists
MCP Tool: inventories_list (from aap-mcp-inventory-management)
Parameters:
page_size: 100Action: Search results for id == template["inventory"]. If found: ✓ Inventory exists. If not found: ⚠ Inventory ID not found (may be permission issue).
Output Format:
# Job Template Remediation Validation Report
**Template**: {name} (ID: {id})
**Validated**: {timestamp}
## Required Checks
| Requirement | Status | Details |
|-------------|--------|---------|
| Inventory | ✓/✗ | {inventory_id} - {inventory_name or "configured"} |
| Project | ✓/✗ | {project_id} - {project_name or "configured"} |
| Playbook | ✓/✗ | {playbook_path} |
| Credentials | ✓/✗ | {count} credential(s) configured |
| Privilege Escalation | ✓/✗ | become_enabled: {value} |
| Ask Job Type on Launch | ✓/✗ | Required for dry-run + run modes |
## Recommended Checks
| Requirement | Status | Details |
|-------------|--------|---------|
| Ask Variables on Launch | ✓/⚠ | {value} |
| Ask Limit on Launch | ✓/⚠ | {value} |
| Ask Inventory on Launch | ✓/⚠ | {value} |
## Context Verification
| Check | Status | Details |
|-------|--------|---------|
| Project Exists | ✓/⚠/✗ | {status} |
| Inventory Exists | ✓/⚠/✗ | {details} |
## Overall Result
{✓ PASSED / ⚠ PASSED WITH WARNINGS / ✗ FAILED}
{If PASSED}: Template is ready for remediation playbook execution.
{If WARNINGS}: Template works but consider enabling ask_variables_on_launch and ask_limit_on_launch for flexibility.
{If FAILED}: Fix required checks before using with playbook-executor. See job-template-creator for setup guidance. If Ask Job Type on Launch fails: Enable "Prompt on Launch" for Job Type in AAP Web UI → Templates → [Template] → Edit → Options.
aap-mcp-job-management - AAP job template and execution managementaap-mcp-inventory-management - AAP inventory managementjob_templates_list (from aap-mcp-job-management) - List templatesjob_templates_retrieve (from aap-mcp-job-management) - Get template detailsprojects_list (from aap-mcp-job-management) - Verify projectinventories_list (from aap-mcp-inventory-management) - Verify inventorymcp-aap-validator - PREREQUISITE - Validates AAP MCP before this skillplaybook-executor - PRIMARY USER - Uses compatible templates for executionjob-template-creator - Creates templates that this skill validatesplaybook-executor skill - Template compatibility requirements (Phase 1 Step 1.2, Scenario 3 validation)job-template-creator skill - Template configuration for remediationThis skill performs read-only validation only. It does not modify AAP resources or execute playbooks.
When user input is needed:
No confirmation required for validation execution - the skill only reads and reports.
User Request: "Validate job template 42 for remediation"
Skill Response:
job_templates_retrieve(id="42") → Get templateprojects_list, inventories_list for context# Job Template Remediation Validation Report
**Template**: CVE Remediation Template (ID: 42)
**Validated**: 2026-02-24
## Required Checks
| Requirement | Status | Details |
|-------------|--------|---------|
| Inventory | ✓ | 1 - Production Inventory |
| Project | ✓ | 6 - Remediation Playbooks |
| Playbook | ✓ | playbooks/remediation/remediation-template.yml |
| Credentials | ✓ | 1 credential(s) configured |
| Privilege Escalation | ✓ | become_enabled: true |
## Recommended Checks
| Requirement | Status | Details |
|-------------|--------|---------|
| Ask Variables on Launch | ✓ | true |
| Ask Limit on Launch | ✓ | true |
| Ask Inventory on Launch | ✓ | true |
## Overall Result
✓ PASSED
Template is ready for remediation playbook execution.
User Request: "Validate template 20 for remediation"
Skill Response:
# Job Template Remediation Validation Report
**Template**: CVE Remediation (ID: 20)
**Validated**: 2026-02-24
## Required Checks
| Requirement | Status | Details |
|-------------|--------|---------|
| Inventory | ✓ | 1 - Production Inventory |
| Project | ✓ | 6 - Remediation Playbooks |
| Playbook | ✓ | playbooks/remediation/remediation-template.yml |
| Credentials | ✓ | 1 credential(s) configured |
| Privilege Escalation | ✓ | become_enabled: true |
| Ask Job Type on Launch | ✗ | ask_job_type_on_launch: false |
## Overall Result
✗ FAILED
Fix required: Enable "Prompt on Launch" for Job Type.
playbook-executor needs the same template for dry-run (job_type: "check") and actual execution (job_type: "run"). Without this, you would need separate templates for each mode.
To fix: AAP Web UI → Templates → [Template] → Edit → Options → ✓ Prompt on Launch → Job Type
User Request: "Check if template 15 works for remediation"
Skill Response:
# Job Template Remediation Validation Report
**Template**: General Playbook Runner (ID: 15)
**Validated**: 2026-02-24
## Required Checks
| Requirement | Status | Details |
|-------------|--------|---------|
| Inventory | ✓ | 1 - Production Inventory |
| Project | ✓ | 6 - Remediation Playbooks |
| Playbook | ✓ | playbooks/example.yml |
| Credentials | ✓ | 1 credential(s) configured |
| Privilege Escalation | ✗ | become_enabled: false |
## Overall Result
✗ FAILED
Fix required: Enable privilege escalation (become) on this template.
Remediation playbooks require sudo/root for package updates and system changes.
To fix: AAP Web UI → Templates → [Template] → Edit → Options → ✓ Enable Privilege Escalation
Context: playbook-executor filters templates and may invoke this skill to validate user-selected template before execution.
Workflow:
[playbook-executor] → User selects template ID 10
[playbook-executor] → Invoke job-template-remediation-validator with template 10
[job-template-remediation-validator] → Returns PASSED
[playbook-executor] → Proceeds with execution
What 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.
/mcp-aap-validatorValidate AAP (Ansible Automation Platform) MCP server connectivity. Use when the user asks to "validate AAP MCP", "check AAP connection", or when other skills need to verify AAP MCP availability before job management or inventory operations.