/rh-sre:job-template-creatorfrom rh-sre
Create 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.
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.
Read when SKILL.md points to them.
This skill helps SREs create AAP job templates for executing Ansible playbooks, particularly for CVE remediation workflows.
Required AAP Components:
Required MCP Servers: aap-mcp-job-management (setup guide)
Currently Available MCP Tools (read-only):
job_templates_list - List existing templatesjob_templates_retrieve - Get template detailsprojects_list - List available projectsinventories_list - List available inventoriesMissing MCP Tools (needed for creation):
job_templates_create - NOT CURRENTLY AVAILABLEjob_templates_update - NOT CURRENTLY AVAILABLERequired 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 operations, 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:
⚠️ IMPORTANT: The current AAP MCP implementation does NOT include tools to create job templates programmatically. The available MCP tools are read-only (list, retrieve, launch).
Current Approach:
This skill documents both the current manual workflow and the intended automated workflow for when creation tools become available.
Use this skill when you need:
Do NOT use this skill when:
/playbook-executor skill instead)job_templates_launch_retrieve)When invoked from the playbook-executor skill (Scenario 3 - No suitable template), this skill receives playbook content in context. The playbook-executor invokes with an instruction such as:
Create a job template for this remediation playbook. Playbook: [content]. Filename: [filename]. Path: [our_playbook_path]. CVE: [cve_id]. Target systems: [list].
When playbook content is provided:
Phase 0 - Check context: If playbook content is provided by the invoking skill, execute the git flow (write, add, commit with confirmation checkpoint, push) before guiding template creation. Otherwise, use the existing manual flow where the user supplies the playbook.
Action: Execute the /mcp-aap-validator skill
Note: Can skip if validation was performed earlier in this session and succeeded..
How to invoke: Execute the /mcp-aap-validator skill
Handle validation result:
Goal: Add playbook to a Git repository AAP can access.
Read references/01-git-setup.md for Option A (existing repo) and Option B (new repo).
Verification: Playbook committed, pushed, AAP synced, playbook path noted.
Before creating a job template, collect:
Playbook Information:
remediation-CVE-2025-49794.yml)Target Information:
Credentials:
Execution Settings:
Step 1: List Available Projects
MCP Tool: projects_list (from aap-mcp-job-management)
Parameters:
page_size: 50 (retrieve up to 50 projects)search: "remediation" (optional - filter by keyword)Expected Output:
{
"count": 1,
"results": [
{
"id": 6,
"name": "Remediation Playbooks",
"scm_type": "git",
"scm_url": "https://github.com/org/playbooks.git",
"status": "successful"
}
]
}
Action: Identify the project ID where your playbook is stored.
Step 2: List Available Inventories
MCP Tool: inventories_list (from aap-mcp-inventory-management)
Parameters:
page_size: 50search: "production" (optional - filter by keyword)Expected Output:
{
"count": 1,
"results": [
{
"id": 1,
"name": "Production Inventory",
"total_hosts": 150,
"has_active_failures": false
}
]
}
Action: Identify the inventory ID containing your target hosts.
Step 3: Verify Credentials
Note: The current AAP MCP doesn't expose credential listing tools. You'll need credential IDs from AAP Web UI or administrator.
⚠️ CURRENT LIMITATION: AAP MCP has no create tools. Template creation must be done via AAP Web UI.
Read references/02-web-ui-form.md for form fields and steps.
Required: Name, Inventory, Project, Playbook, Credentials. Enable Privilege Escalation. Prompt on Launch: Job Type (REQUIRED), Variables, Limit.
MCP Tool: job_templates_list (from aap-mcp-job-management)
Parameters:
search: "CVE-2025-49794" (search for your template)page_size: 10Expected Output:
{
"results": [
{
"id": 42,
"name": "Remediate CVE-2025-49794",
"playbook": "remediation-CVE-2025-49794.yml",
"project": 6,
"inventory": 1,
"status": "never updated"
}
]
}
Success Criteria:
MCP Tool: job_templates_launch_retrieve (from aap-mcp-job-management)
Parameters:
id: "42" (template ID from Phase 5)Expected Output:
{
"job": 1234,
"status": "pending",
"url": "/api/controller/v2/jobs/1234/"
}
Follow-up: Use playbook-executor skill to track job execution.
Read references/03-output-template.md for report format. Read references/04-examples.md for CVE remediation and dynamic variable examples.
aap-mcp-job-management - AAP job management API accessjob_templates_list - List existing templates (verification)job_templates_retrieve - Get template details (verification)projects_list - List available projects (prerequisite)inventories_list (from aap-mcp-inventory-management) - List inventories (prerequisite)job_templates_create - Create new job templatesjob_templates_update - Modify existing templatescredentials_list - List available credentialsmcp-aap-validator - PREREQUISITE - Validates AAP MCP server before creation (invoke in Phase 0 if not validated in session)job-template-remediation-validator - Validates created template meets remediation requirementsplaybook-executor - Execute templates after creationplaybook-generator - Generate remediation playbooks for templatessystem-context - Identify target systems for inventory selectionThis skill requires user confirmation for:
Git Operations (adding playbook to repository):
Manual Template Creation (AAP Web UI):
Test Execution (optional verification):
Never assume approval - always wait for explicit user confirmation.
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-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`).
/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.