Fleet inventory

From RHEcosystemAppEng/agentic-plugins · View interactive version

Fleet inventory is an AI agent skill from the GitHub repository RHEcosystemAppEng/agentic-plugins. Query 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 to use this skill

Skill file

Fleet Inventory Skill

This skill queries Red Hat Lightspeed to retrieve and display information about managed systems, registered hosts, and fleet inventory.

Prerequisites

Required MCP Servers: lightspeed-mcp (setup guide)

Required MCP Tools:

Required Environment Variables:

Prerequisite Validation

CRITICAL: Before executing any operations, execute the /mcp-lightspeed-validator skill to verify MCP server availability.

See Step 0 in the Workflow section below for implementation details.

Validation freshness: Can skip if already validated in this session..

When to Use This Skill

Use this skill directly when you need:

Use the /remediation skill when you need:

How they work together: Use this skill for discovery ("What systems are affected?"), then transition to the /remediation skill for action ("Remediate those systems").

Workflow

Step 0: Validate Lightspeed MCP Prerequisites

Action: Execute the /mcp-lightspeed-validator skill

Note: Can skip if validation was performed earlier in this session and succeeded..

How to invoke: Execute the /mcp-lightspeed-validator skill

Handle validation result:

Example:

Before retrieving fleet inventory, I'll validate the Lightspeed MCP server configuration.

[Invoke mcp-lightspeed-validator skill]

✓ Lightspeed MCP validation successful.
Proceeding with fleet inventory query...

Step 1: Retrieve System Inventory

Document Consultation (REQUIRED - Execute FIRST):

  1. Action: Read insights-api.md using the Read tool to understand inventory__list_hosts response format and pagination handling
  2. Output to user: "I consulted insights-api.md to understand the inventory__list_hosts response format and pagination handling."

MCP Tools: inventory__load_inventory_dashboard and inventory__list_hosts (from lightspeed-mcp)

Purpose: Query Lightspeed for registered hosts. Use for fleet discovery, tag filters, and environment scoping.

Parameters: per_page=10 on first call, then page for pagination. Optional filters: display_name, tags, staleness, hostname_or_id. See references/01-parameter-reference.md.

Before continuing further, call inventory__load_inventory_dashboard(...) with the same query parameters used in the list_hosts call, and examine the instruction returning from the tool.

Optional enrichment: After host UUIDs are known:

Verification Checklist:

Key Fields to Extract (from results[] on list_hosts / get_host_details):

When RHEL version or environment tags are required (not on every list_hosts record):

Step 2: Filter and Organize Systems

Document Consultation (REQUIRED - Execute FIRST):

  1. Action: Read fleet-management.md using the Read tool to understand fleet inventory reporting structure and best practices
  2. Output to user: "I consulted fleet-management.md to structure this inventory report."

Apply user-requested filters and grouping. See references/01-parameter-reference.md for filtering and sorting patterns.

Step 3: Query CVE-Affected Systems

MCP Tool: vulnerability__get_cve_systems (from lightspeed-mcp)

Purpose: Find systems affected by specific CVEs

Parameters: cve (CVE-YYYY-NNNNN, uppercase). Paginate with limit and offset. See references/01-parameter-reference.md.

Verification Checklist:

Status Interpretation:

Status: "Vulnerable"
→ CVE affects this system, patch not applied
→ Action: Suggest remediation via `/remediation` skill

Status: "Patched"
→ CVE previously affected, now remediated
→ Action: No action needed, informational only

Status: "Not Affected"
→ System not vulnerable to this CVE
→ Action: Exclude from affected count

Step 4: Present Results

If the dashboard was successful, DO NOT PRINT the inventory table, as it's covered in the dashboard. SKIP to the follow-ups.

ONLY If the dashboard was NOT successful: Create organized output. Read references/03-output-templates.md for report format (Overview, RHEL/Environment breakdown, System Details, Stale Systems).

Step 5: Follow-up

When appropriate, suggest transitioning to the /remediation skill:

## Next Steps

**For CVE Remediation**:
If you need to remediate vulnerabilities on any of these systems, I can help using the `/remediation` skill:

Examples:
- "Remediate CVE-2024-1234 on web-server-01"
- "Create playbook for all RHEL 8 production systems affected by CVE-2024-5678"
- "Batch remediate critical CVEs on staging environment"

**For System Investigation**:
- "Show CVEs affecting web-server-01" (use cve-impact skill)
- "Analyze risk for production systems" (use cve-impact skill)
- "List critical vulnerabilities across the fleet" (use cve-impact skill)

Dependencies

Required MCP Servers

Required MCP Tools

Related Skills

Reference Documentation

Skill Orchestration Pattern

Information-First Workflow:

User Query: "Show the managed fleet"
    ↓
fleet-inventory skill (discovery)
    ↓
Systems identified: 42 total, 15 affected by CVE-2024-1234
    ↓
User: "What's the risk of CVE-2024-1234?"
    ↓
cve-impact skill (analysis)
    ↓
CVSS 8.1, Critical severity, affects httpd package
    ↓
User: "Remediate CVE-2024-1234 on all production systems"
    ↓
`/remediation` skill (action)
    ↓
Playbook generated and executed

Key Principle: Always start with discovery before taking remediation actions. This ensures informed decisions based on actual fleet state.

Output, Examples, Error Handling

Read references/03-output-templates.md for report format.

Read references/04-examples.md for fleet, CVE-affected, and environment-filter examples.

Read references/05-error-handling.md for no-results, API errors, and stale system handling.

Best Practices

Start broad then filter; group by environment/RHEL/tier; highlight stale systems; offer /remediation transitions; use tables and percentages; declare document consultations; verify prerequisites first.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.