Rightsize recommendation

From Raishin/vanguard-frontier-agentic · View interactive version

Rightsize recommendation is an AI agent skill from the GitHub repository Raishin/vanguard-frontier-agentic. Emit pod CPU and memory request/limit recommendations from user-pasted p50, p95, and p99 utilization metrics over a 7-14 day window. Outputs recommended requests at p95 plus 20% headroom, limits at p99 plus 30%, estimated monthly savings, and Karpenter consolidation eligibility flag. Read-only, no k

How to use this skill

Skill file

Rightsize Recommendation

Purpose

Produce CPU and memory rightsizing recommendations for Kubernetes pods based on user-supplied utilization percentile metrics. All math is performed on the inputs provided by the caller; no cluster connection or live metric fetch is performed.

No kubectl. No WebFetch. No cluster credentials accepted.

When to use

Use this skill when:

Operating rules

Required input

The caller must supply, per pod or workload:

If any field is missing, ask one clarifying question per gap. Do not fabricate metric values.

Recommendation methodology

CPU

| Output | Formula | Rationale |

|---|---|---|

| Recommended CPU request | p95 CPU + 20% | p95 covers normal burst; 20% headroom absorbs measurement noise and brief spikes |

| Recommended CPU limit | p99 CPU + 30% | p99 covers rare spikes; 30% headroom prevents throttling during outlier bursts |

Memory

| Output | Formula | Rationale |

|---|---|---|

| Recommended memory request | p95 memory + 20% | Same headroom logic as CPU; memory pressure leads to OOMKill rather than throttling |

| Recommended memory limit | p99 memory + 30% | Tighter limits risk OOMKill; 30% buffer is conservative for stateful workloads |

Round all recommendations up to the nearest 10 millicores (CPU) or 16 MiB (memory) for cleaner manifests.

Monthly savings estimate

If the caller supplies unit price ($/vCPU-hour and $/GiB-hour):

cpu_savings_per_month = (current_cpu_request - recommended_cpu_request) / 1000
                       × unit_price_per_vcpu_hour × 730

memory_savings_per_month = (current_memory_request - recommended_memory_request) / 1024
                          × unit_price_per_gib_hour × 730

Label: inference. Note: savings are approximate; they assume the freed capacity is not replaced by new workloads and that the node pool scales down proportionally.

If unit price is not supplied, state the savings formula and mark the $/mo cell as excluded — unit price not provided by caller.

Karpenter consolidation eligibility

A pod is flagged as consolidation-eligible when all of the following are true:

If the caller has not supplied enough information to confirm all five conditions, state which conditions could not be verified and flag as not-verified — [missing conditions]. Do not assume eligibility when data is incomplete; unknown blockers present a consolidation risk.

Response shape

Return, per pod or workload:

Pod / Workload: <name> (<namespace>)

  CPU
    Current request:     <current> m
    Recommended request: <p95 × 1.20, rounded> m  [inference]
    Current limit:       <current> m  (or "no-limit")
    Recommended limit:   <p99 × 1.30, rounded> m  [inference]

  Memory
    Current request:     <current> MiB
    Recommended request: <p95 × 1.20, rounded> MiB  [inference]
    Current limit:       <current> MiB  (or "no-limit")
    Recommended limit:   <p99 × 1.30, rounded> MiB  [inference]

  Monthly savings estimate
    CPU:    $<amount>/mo  [inference]  or  [excluded — unit price not provided]
    Memory: $<amount>/mo  [inference]  or  [excluded — unit price not provided]
    Total:  $<amount>/mo

  Karpenter consolidation
    Eligible: <Yes | No | Not-verified>
    Blockers: <list any confirmed blockers, or list missing data preventing verification, or "None confirmed">

  Metric window: <N days>  [inference: window meets 7-14 day requirement]
  Confidence:   <Normal | Reduced — window < 7 days>

References

Load these only when needed:

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.