[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7A7CDQFGTYJQ86S64YYJJJZ":3,"skill-same:01M7A7CDQFGTYJQ86S64YYJJJZ":148},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":47,"repositoryHtmlUrl":48,"repositoryHomepageUrl":6,"ownerHtmlUrl":49,"ownerBlogUrl":6,"ownerDescription":50,"updatedAt":51,"install":52,"resources":65},"01M7A7CDQFGTYJQ86S64YYJJJZ","ec2-rightsizing-optimizer",null,"Right-sizes EC2 instances for cost optimization using a structured utilization-driven decision framework — gathers 14-30 day CloudWatch utilization data (CPUUtilization, NetworkIn\u002FOut, DiskReadOps\u002FWriteOps, and the load-bearing MemoryUtilization that requires the CloudWatch Agent), interprets Compute Optimizer findings (Optimized, Underprovisioned, Overprovisioned, Not-enough-data) with confidence gating, applies a rightsizing decision matrix (CPU \u003C 30% + Memory \u003C 50% → downsize; CPU > 70% sustained OR Memory > 80% → upsize; network-bound → Enhanced Networking or larger instance; burstable t-family → CPU credit balance check), selects instance families by workload shape (general-purpose m7i\u002Fm6i, compute c7i\u002Fc7a, memory r7i\u002Fr7a\u002Fx2idn, storage i4i\u002Fim4gn, GPU g5\u002Fp5), evaluates Graviton (ARM) migration opportunities with up to 40% better price-performance, and recommends pricing-model optimizations (On-Demand → Reserved Instance 1\u002F3yr for steady-state with 30-72% savings, Compute\u002FInstance Savings Plans for...","jhkchan\u002Faws-agent-skills","jhkchan","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1083902?v=4","01M7A2SVQYP9GQTPTDXP5JKYQ4","Jacky Chan","01M7A2SVS117YWCTZABB75HZR1",4,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fec2-rightsizing-optimizer\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: ec2-rightsizing-optimizer\ndescription: Right-sizes EC2 instances for cost optimization using a structured utilization-driven decision framework — gathers 14-30 day CloudWatch utilization data (CPUUtilization, NetworkIn\u002FOut, DiskReadOps\u002FWriteOps, and the load-bearing MemoryUtilization that requires the CloudWatch Agent), interprets Compute Optimizer findings (Optimized, Underprovisioned, Overprovisioned, Not-enough-data) with confidence gating, applies a rightsizing decision matrix (CPU \u003C 30% + Memory \u003C 50% → downsize; CPU > 70% sustained OR Memory > 80% → upsize; network-bound → Enhanced Networking or larger instance; burstable t-family → CPU credit balance check), selects instance families by workload shape (general-purpose m7i\u002Fm6i, compute c7i\u002Fc7a, memory r7i\u002Fr7a\u002Fx2idn, storage i4i\u002Fim4gn, GPU g5\u002Fp5), evaluates Graviton (ARM) migration opportunities with up to 40% better price-performance, and recommends pricing-model optimizations (On-Demand → Reserved Instance 1\u002F3yr for steady-state with 30-72% savings, Compute\u002FInstance Savings Plans for...\nlicense: Apache-2.0\ncompatibility: Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). Offline recommendation-document classification works from pasted Compute Optimizer findings and CloudWatch metrics. Live-account optimization uses aws ec2 describe-instances, aws cloudwatch get-metric-statistics, aws compute-optimizer get-ec2-instance-recommendations, aws ce get-cost-and-usage, and aws ec2 describe-instance-types (AWS CLI v2, SSO or key-based credentials).\nmetadata:\n  domain: aws-cloudops\n  complexity: high\n  requires_llm: 'true'\n  phase: '3'\n  supports_pipeline: 'true'\n  entry_point: 'false'\n  family: Compute\n  task_type: optimize\n  skill_class: capability\n  verdict_shape: OPTIMIZED | OPPORTUNITY_FOUND | ALREADY_OPTIMAL\n  when_to_use: Right-sizing EC2 instances for cost optimization, planning a FinOps rightsizing batch, interpreting Compute Optimizer EC2 findings, evaluating Graviton (ARM) migration opportunities, selecting an instance family for a new workload, comparing pricing models (On-Demand \u002F RI \u002F Savings Plans \u002F Spot), or building a monthly savings estimate for an optimization initiative.\n  when_not_to_use: Auditing Compute Optimizer finding confidence on a single resource (use compute-optimizer-findings-auditor), EBS volume right-sizing (use compute-optimizer-findings-auditor for EBS findings), Lambda memory tuning (use compute-optimizer-findings-auditor), Fargate task sizing (use compute-optimizer-findings-auditor for ECS), or performance troubleshooting for a slow instance (use rds-connectivity-troubleshooter for database reachability, or Performance Insights \u002F CloudWatch metrics directly for EC2). This skill focuses on cost-driven EC2 rightsizing decisions, not single-finding confidence audits or non-EC2 resources.\n  activation_triggers: right-size EC2 instances, EC2 cost optimization, Compute Optimizer EC2 recommendations, EC2 underutilized, EC2 overprovisioned, FinOps EC2 savings, Graviton migration opportunity, EC2 Reserved Instance, Savings Plan recommendation, EC2 instance family selection, EC2 monthly savings estimate, EC2 fleet rightsizing, t-family CPU credit exhaustion, m5 to m7i migration, EC2 pricing model optimization, spot instance opportunity\n  invocation_schema: 'Input: either (a) an EC2 instance identifier + live-account context, (b) a Compute Optimizer EC2 finding document, OR (c) CloudWatch utilization metrics (CPU, Memory, Network, Disk) for one or more instances with at least 14 days of observation. Output: a deterministic TARGET\u002FVERDICT\u002FREASON\u002FRECOMMENDATION\u002FESTIMATED_SAVINGS\u002F MIGRATION_STEPS block per instance, where VERDICT ∈ {OPTIMIZED, OPPORTUNITY_FOUND, ALREADY_OPTIMAL} and RECOMMENDATION includes the target instance type, family, pricing model, and Graviton flag.'\n  invocation_example: \"# Minimal valid input (offline finding classification):\\nInstanceId: i-0abc123\\nCurrent instance type: m5.2xlarge\\nRegion: us-east-1\\nCompute Optimizer finding: Overprovisioned\\nFinding reasons: [\\\"CPUOverprovisioned\\\", \\\"MemoryOverprovisioned\\\"]\\nUtilization metrics (last 30 days):\\n  - CPUUtilization: avg=8%, max=15%, source=CloudWatch\\n  - MemoryUtilization: avg=22%, max=30%, source=CloudWatchAgent\\n  - NetworkIn: avg=0.05 MB\u002Fs, max=0.1 MB\u002Fs\\n  - DiskReadOps+DiskWriteOps: avg=10\u002Fs, max=20\u002Fs\\nRecommendation options:\\n  - rank: 1, instanceType: t3.large, performanceRisk: 1,\\n    savingsOpportunity: {savingsPercentage: 75, estimatedMonthlySavings: 150}\\nPricing: On-Demand, no RI\u002FSavings Plan commitment.\\nEmit the standard optimization block (TARGET, VERDICT, REASON,\\nRECOMMENDATION, ESTIMATED_SAVINGS, MIGRATION_STEPS).\"\n  version: 0.1.0\n  author: Jacky Chan — AWS Community Builder\n  keywords: EC2, right-sizing, cost optimization, Compute Optimizer, CloudWatch Agent, MemoryUtilization, CPUUtilization, NetworkIn, Graviton, ARM, m7i, c7i, r7i, i4i, g5, p5, Reserved Instance, Savings Plans, Spot Instances, FinOps, instance family selection, EBS-optimized, Enhanced Networking, burstable, t-family, CPU credit balance, price-performance\n  tags: ec2, compute, cost-optimization, finops, right-sizing, graviton, compute-optimizer\n---\n\n# EC2 Rightsizing Optimizer\n\n## Quick start\n\nMoved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) - load on demand (see References below).\n\n## Mindset\n\nMoved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) - load on demand (see References below).\n\n## Philosophy\n\nMoved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) - load on demand (see References below).\n\n## Quick reference — verdict thresholds\n\n| Observation (14-30 day window) | Verdict | Recommendation |\n|---|---|---|\n| CPU \u003C 30% avg AND Memory \u003C 50% avg AND Network \u003C 30% limit AND Disk low | **OPPORTUNITY_FOUND** (downsize) | Step 4 — downsize 1-2 sizes, prefer Graviton equivalent |\n| CPU > 70% sustained OR Memory > 80% OR Network > 50% limit | **OPPORTUNITY_FOUND** (upsize — performance risk) | Step 5 — upsize to next class that resolves the bottleneck |\n| Burstable t-family with CPUCreditBalance chronically near 0 | **OPPORTUNITY_FOUND** (architecture change) | Step 6 — migrate to m-family or enable Unlimited |\n| Graviton-compatible workload on x86 with stable utilization | **OPPORTUNITY_FOUND** (price-performance) | Step 7 — Graviton migration during next AMI refresh |\n| On-Demand pricing on steady-state workload | **OPPORTUNITY_FOUND** (pricing model) | Step 8 — RI or Compute Savings Plan |\n| MemoryUtilization metric absent | **NEED_MORE_INFO** (BLOCKED — not ALREADY_OPTIMAL) | Install CloudWatch Agent, wait 14-30 days, re-evaluate |\n| Compute Optimizer finding `Optimized` + metrics present + already on RI\u002FSP | **ALREADY_OPTIMAL** | None — continue monitoring |\n| Compute Optimizer finding `NotOptimized` (insufficient data) | **NEED_MORE_INFO** | Wait for additional observation |\n| All thresholds pass for current type AND pricing already optimized | **OPTIMIZED** | None required |\n\nSee the ordered steps for edge cases (cross-family migration, EBS-bound\nworkloads, Spot-eligible workloads, multi-AZ fleets).\n\n## Pre-flight: data gate (run before any right-sizing decision)\n\nRight-sizing decisions are only as good as the underlying data. Several\ndata-quality conditions short-circuit the optimization — misclassifying\nthem produces recommendations that fail at runtime.\n\n### Required data sources\n\nMoved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) - load on demand (see References below).\n\n### Data-quality short-circuits\n\n| Condition | Effect on optimization |\n|---|---|\n| `MemoryUtilization` metric absent (CWAgent not installed) | **NEED_MORE_INFO**: Install CWAgent, wait 14-30 days, re-evaluate. Do NOT recommend a downsize. |\n| Observation window \u003C 14 days | **NEED_MORE_INFO**: workload may reflect atypical load (deploy week, incident response, seasonal dip). Minimum 14 days; 30 days preferred. |\n| Instance stopped for > 50% of window | Metrics are skewed. Re-pull after a stable 14-day running window. |\n| Compute Optimizer enrollment `Inactive` | No Compute Optimizer findings to cross-reference. Rely on CloudWatch metrics directly. |\n| Compute Optimizer `lastRefreshTimestamp` > 30 days old | Stale finding — workload may have changed. Re-run `get-ec2-instance-recommendations`. |\n| Instance in `Stopped` state at evaluation time | Right-sizing is moot until the instance restarts. Note and skip. |\n\n### Conflicting-data arbitration\n\nWhen CloudWatch metrics and Compute Optimizer findings disagree (e.g.,\nCloudWatch shows CPU 60% but Compute Optimizer says Overprovisioned),\ntrust CloudWatch. Compute Optimizer averages over 30 days and may smooth\nout recent workload spikes. The freshest signal wins.\n\n## Process — Optimization logic (apply in order)\n\n### Step 0: Non-obvious behaviours that change the recommendation\n\nMoved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) - load on demand (see References below).\n\n### Step 1: Validate input and data sufficiency\n\nIf `MemoryUtilization` is absent from the input metrics (CWAgent not\ninstalled), emit NEED_MORE_INFO with a specific installation instruction:\n\nMoved verbatim to [references\u002Fworked-examples.md](references\u002Fworked-examples.md) - load on demand (see References below).\n\nIf the observation window is \u003C 14 days, emit NEED_MORE_INFO: \"Observation\nwindow is N days; minimum 14 days required for representative data.\"\nProceed only if both conditions are met.\n\n### Step 2: Compute Optimizer reconciliation\n\nIf a Compute Optimizer finding is provided, reconcile with CloudWatch\nmetrics. Compute Optimizer's 30-day analysis is a sanity check; the\nfresh CloudWatch signal wins on disagreement.\n\nMoved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) - load on demand (see References below).\n\n| Field to verify | What it tells you | Action if missing\u002Fstale |\n|---|---|---|\n| `finding` | High-level classification (Optimized\u002FUnder\u002FOver) | If absent, finding is `NotOptimized` due to insufficient data → emit NEED_MORE_INFO. |\n| `recommendationOptions[].performanceRisk` | Risk that the recommended type cannot handle the workload (1=low ... 5=high) | Always prefer options with `performanceRisk ≤ 2` for production. If only risk ≥ 4 options exist, emit NEED_MORE_INFO and investigate manually. |\n| `lastRefreshTimestamp` | When Compute Optimizer last re-analyzed | If > 30 days old, treat as stale; re-run `get-ec2-instance-recommendations` or rely on CloudWatch. |\n| `utilizationMetrics[]` | Source data Compute Optimizer used | Cross-check against your CloudWatch pull. If they disagree, freshest CloudWatch wins. |\n| `savingsOpportunity.estimatedMonthlySavings` | Dollar savings estimate | Sanity-check against your own hourly math (Step 9). Compute Optimizer uses list price; your actual RI\u002FSP rate may differ. |\n\n| Compute Optimizer finding | CloudWatch agreement | Action |\n|---|---|---|\n| `Overprovisioned` + HIGH confidence (Memory metric present, performanceRisk ≤ 2) | CPU \u003C 30% AND Memory \u003C 50% | Proceed to Step 4 (downsize). |\n| `Overprovisioned` + LOW confidence (Memory inferred, performanceRisk ≥ 4) | — | Treat as NEED_MORE_INFO per the compute-optimizer-findings-auditor. Install CWAgent first. |\n| `Underprovisioned` | CPU > 70% OR Memory > 80% | Proceed to Step 5 (upsize). |\n| `Optimized` | All thresholds pass for current type | Proceed to Step 8 (pricing model check). |\n| `NotOptimized` (insufficient data) | — | NEED_MORE_INFO: wait for additional observation. |\n\n### Step 3: Workload classification\n\nClassify the workload shape to guide family selection (Step 4-5):\n\n| Workload shape | Indicators | Recommended family |\n|---|---|---|\n| Balanced (web server, app server, dev) | CPU ~ Memory ~ Network balanced | General purpose: m7i, m7a, m7g (Graviton), m6i, m6a |\n| Compute-bound (batch, HPC, CI runners, video encoding) | CPU > Memory utilization | Compute optimized: c7i, c7a, c7g, c6i, c6a |\n| Memory-bound (in-memory cache, big-data analytics, relational DB) | Memory > CPU utilization, large working set | Memory optimized: r7i, r7a, r7g, r6i, x2idn, x2iedn |\n| Storage-bound (NoSQL, data warehousing, OLAP) | High disk ops, large local storage need | Storage optimized: i4i, im4gn, i4g |\n| GPU (ML training\u002Finference, rendering) | GPU utilization, CUDA workloads | GPU: g5, g6, p5, p4d |\n| Network-bound (real-time streaming, HFT) | NetworkIn + NetworkOut > 50% of limit | Network optimized: c6n, m6n, r6n; or Enhanced Networking (ENA) |\n| Bursty (dev\u002Ftest, low-traffic web) | t-family with healthy CPUCreditBalance | Burstable: t3, t3a, t4g |\n\n### Step 4: Downsize decision (CPU\u002FMemory\u002FNetwork\u002FDisk all low)\n\nApply the downsize matrix when CPU \u003C 30% avg AND Memory \u003C 50% avg AND\nNetwork \u003C 30% of limit AND Disk \u003C 30% of provisioned IOPS.\n\n**Downsize magnitude:**\n- If CPU \u003C 10% AND Memory \u003C 30%: downsize 2 sizes (e.g., m5.4xlarge → m5.large).\n- If CPU \u003C 30% AND Memory \u003C 50%: downsize 1 size (e.g., m5.2xlarge → m5.large).\n- Conservative default: downsize 1 size, observe 7 days, downsize again\n  if utilization remains low. This staged approach catches edge cases\n  that a 2-size jump misses.\n\n**Family selection for downsize:**\n- Prefer staying within the same family (m5.2xlarge → m5.large) for\n  lowest migration risk.\n- If the workload is bursty with healthy credit balance, consider\n  migrating to t-family (t3\u002Fxlarge saves 60%+ vs m5.xlarge).\n- If Graviton-compatible, prefer the g-suffix equivalent (m7g.large vs\n  m7i.large: ~20% additional savings).\n\n**Burstable family (t3\u002Ft3a\u002Ft4g) check:**\n- Verify the workload's burst pattern: average CPU \u003C 20% baseline (below\n  credit-earning rate) and burst duration \u003C 1 hour\u002Fday.\n- If the workload sustains > 20% CPU, do NOT migrate to t-family — use\n  Unlimited mode (charges for overage) or stay on m-family.\n\n### Step 5: Upsize decision (CPU or Memory high)\n\nApply the upsize matrix when CPU > 70% sustained OR Memory > 80% OR\nNetwork > 50% of limit.\n\n**Upsize magnitude:**\n- Identify the bottleneck dimension (CPU, Memory, Network, or Disk).\n- Upsize to the next instance class that addresses the bottleneck:\n  - CPU-bound: same family, more vCPUs (m5.large → m5.xlarge).\n  - Memory-bound: switch to memory-optimized family if Memory > 80%\n    persistently (m5.xlarge → r6i.xlarge, doubling memory per vCPU).\n  - Network-bound: switch to network-optimized family\n    (m5.xlarge → c5n.large or enable Enhanced Networking).\n  - Disk-bound: migrate to storage-optimized family OR move the\n    workload to EBS-optimized io2 volumes.\n\n**Severity grading for upsizing:**\n- HIGH: CPU sustained > 90% OR Memory > 95% — active performance\n  degradation; upsize immediately.\n- MEDIUM: CPU 70-90% OR Memory 80-95% — performance risk; upsize at\n  next maintenance window.\n- LOW: peaks above 70% but average \u003C 50% — investigate via Performance\n  Insights \u002F CloudWatch before upsizing (might be a query optimization\n  issue, not capacity).\n\n### Step 6: Burstable t-family architecture change\n\nIf the current instance is t-family AND CPUCreditBalance chronically\ndrops below ~50 credits (visible in CloudWatch), the workload is not\nburst-compatible. Two remediation paths:\n\n1. **Enable Unlimited mode** (cheapest, preserves instance):\n   `aws ec2 modify-instance-credit-specification --instance-id \u003Cid>\n   --cpu-credits unlimited`. Charges for overage credits but maintains\n   baseline performance. Recommended for workloads with occasional\n   sustained-CPU bursts.\n2. **Migrate to m-family** (most robust, higher baseline cost):\n   migrate from t3.large to m6i.large (or m7g.large for Graviton).\n   Eliminates the credit-balance cliff entirely. Recommended for\n   workloads with sustained CPU > 20%.\n\n### Step 7: Graviton (ARM) migration evaluation\n\nMoved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) - load on demand (see References below).\n\n### Step 8: Pricing model optimization\n\nMoved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) - load on demand (see References below).\n\n### Step 9: Impact estimation\n\nCompute the monthly savings for each recommendation:\n\n```\nMonthly savings = (current_hourly - new_hourly) * 730 hours\n```\n\nInclude EBS implications (instance-type change may unlock\u002Finclude\nEBS-optimization costs; current-gen instances have EBS-optimized built\nin, legacy may not).\n\nInclude data transfer implications (instance-type change may have\ndifferent network performance characteristics — usually a non-issue for\nsame-family right-sizes, material for cross-family).\n\nFor pricing-model changes (RI\u002FSavings Plan), compute savings separately:\n```\nRI savings = On-Demand hourly * (1 - RI discount) * hours\n```\n\nTotal savings = rightsize savings + pricing-model savings.\n\n### Step 10: Final verdict\n\nThe verdict is the worst-case (most-actionable) finding across all\ndimensions:\n\n- If any dimension recommends a change (downsize, upsize, architecture,\n  Graviton, pricing model), verdict is **OPPORTUNITY_FOUND**.\n- If all dimensions pass AND pricing is already optimized (RI\u002FSavings\n  Plan in place), verdict is **OPTIMIZED**.\n- If all dimensions pass for current type but pricing model could be\n  improved, verdict is **OPPORTUNITY_FOUND** (pricing dimension).\n- If data is insufficient (memory absent, window \u003C 14 days), verdict\n  is **NEED_MORE_INFO**.\n\n## Output format\n\n```text\nTARGET: \u003Cinstance-id or fleet-description>\nVERDICT: OPTIMIZED | OPPORTUNITY_FOUND | ALREADY_OPTIMAL\nREASON: \u003C1-2 sentences naming the recommendation and the supporting data>\nRECOMMENDATION:\n  Current: \u003Cinstance-type> at \u003Cpricing-model> in \u003Cregion>\n  Proposed: \u003Cinstance-type> at \u003Cpricing-model> in \u003Cregion>\n  Graviton: \u003Cyes\u002Fno\u002FN\u002FA>\n  Family change: \u003Cyes\u002Fno>\n  Confidence: \u003CHIGH\u002FMEDIUM\u002FLOW> — \u003Cone-line rationale>\nESTIMATED_SAVINGS:\n  Monthly (rightsize): $\u003Camount>\n  Monthly (pricing model): $\u003Camount>\n  Annual total: $\u003Camount>\n  Assumptions: \u003Clist (730h\u002Fmonth, On-Demand baseline, etc.)>\nMIGRATION_STEPS:\n  1. \u003Cspecific action with CLI command>\n  2. \u003Cverification step>\nCONFIRM: Before executing any state-changing CLI, emit and await operator\n  approval: \"CONFIRM: About to \u003Caction> on \u003Cinstance-id> in \u003Cregion>.\n  Proceed? (yes\u002Fno)\"\n```\n\n### Worked example — overprovisioned, high-confidence downsize + Graviton\n\n```text\nTARGET: i-0abc123\nVERDICT: OPPORTUNITY_FOUND\nREASON: m5.2xlarge at 8% CPU \u002F 22% Memory \u002F low Network\u002FDisk over 30 days\n  is a clear downsize candidate. Graviton-compatible workload (Java 17);\n  m7g.large saves 75% on the rightsize plus 20% on Graviton price-\n  performance. Adding a 3-year Compute Savings Plan captures additional\n  40% on the residual spend (Step 4 + Step 7 + Step 8).\nRECOMMENDATION:\n  Current: m5.2xlarge at On-Demand in us-east-1\n  Proposed: m7g.large at 3-year Compute Savings Plan in us-east-1\n  Graviton: yes (Java 17, multi-arch AMI available)\n  Family change: yes (m5 → m7g)\n  Confidence: HIGH — Memory metric present (CWAgent), CPU+Memory both\n    well below thresholds, Compute Optimizer cross-check agrees\n    (Overprovisioned, performanceRisk 1).\nESTIMATED_SAVINGS:\n  Monthly (rightsize): $232.32  (m5.2xlarge $0.384\u002Fh → m7g.large $0.0644\u002Fh;\n                                 730h × $0.3196 delta)\n  Monthly (pricing model): $35.96  (40% off m7g.large On-Demand via\n                                    3-yr Compute Savings Plan)\n  Annual total: $3,219.84\n  Assumptions: 730h\u002Fmonth, us-east-1 On-Demand pricing as of 2026-08-07,\n    workload steady-state, no significant growth expected.\nMIGRATION_STEPS:\n  1. Provision the new instance:\n     aws ec2 run-instances --image-id \u003Cami-arm64> --instance-type m7g.large\n       --key-name \u003Ckey> --security-group-ids \u003Csg> --subnet-id \u003Csubnet>\n       --tag-specifications \"ResourceType=instance,Tags=[{Key=Name,\n       Value=i-0abc123-m7g}]\"\n  2. Migrate application data \u002F EBS volumes:\n     - Create an AMI from i-0abc123 (for rollback).\n     - Or attach the existing EBS volume to the new instance (requires\n       stop\u002Fdetach\u002Fattach).\n  3. Validate application functionality on m7g.large for 24-48 hours\n     (focus on memory leaks, JIT behaviour, GC pauses under load).\n  4. Cutover DNS \u002F load balancer to the new instance.\n  5. Purchase a 3-year Compute Savings Plan for the m7g.large commit:\n     aws savingsplans create-savings-plan --savings-plan-offering-id \u003Cid>\n       --commitment \u003Camount>\n  6. Decommission i-0abc123 once the new instance is verified.\nCONFIRM: Before provisioning the new instance, emit and await:\n  \"CONFIRM: About to run-instances m7g.large in us-east-1 for rightsize\n   of i-0abc123. This will incur ~$47\u002Fmonth On-Demand until the Savings\n   Plan is in place. Proceed? (yes\u002Fno)\"\n  Do NOT run the CLI until the operator confirms.\n```\n\n### Worked example — already optimal\n\nMoved verbatim to [references\u002Fworked-examples.md](references\u002Fworked-examples.md) - load on demand (see References below).\n\n### Worked example — NEED_MORE_INFO (memory data missing)\n\nMoved verbatim to [references\u002Fworked-examples.md](references\u002Fworked-examples.md) - load on demand (see References below).\n\n## Verdict semantics — reconciling the verdict_shape\n\nThe `verdict_shape` metadata declares the three primary verdicts\n(`OPTIMIZED | OPPORTUNITY_FOUND | ALREADY_OPTIMAL`). Two additional\n**data-gating** verdicts (`NEED_MORE_INFO`, `BLOCKED`) appear in the\nworkflow when the data required for a confident decision is missing.\nTreat them as pre-decision guards, not as alternatives to the primary\nthree:\n\n| Verdict | When to emit | Position in workflow |\n|---|---|---|\n| `OPPORTUNITY_FOUND` | At least one dimension (size, family, Graviton, pricing) has a concrete, savings-bearing recommendation. | Primary — terminal for actionable findings. |\n| `OPTIMIZED` | A change was applied and verified this session; metrics confirm the new size lands within healthy bands. | Primary — only emitted post-remediation. |\n| `ALREADY_OPTIMAL` | All dimensions pass for the current type AND the pricing model is already committed (RI\u002FSavings Plan covering ≥ 95% of steady-state spend). | Primary — terminal for healthy findings. |\n| `NEED_MORE_INFO` | Data gate failed: MemoryUtilization absent, observation window \u003C 14 days, Compute Optimizer `NotOptimized` due to insufficient data, or freshest CloudWatch signal disagrees with an old Compute Optimizer finding. | Pre-decision — emit before any sizing recommendation; the next action is data collection, not remediation. |\n| `BLOCKED` | A hard precondition prevents evaluation: Compute Optimizer enrollment `Inactive` AND no CloudWatch metrics retrievable, instance is in `Stopped`\u002F`Terminated` for > 50% of the window, or IAM denies `cloudwatch:GetMetricStatistics`. | Pre-decision — emit when no reliable signal exists at all. |\n\n**Rule:** never emit `OPPORTUNITY_FOUND` without first discharging every\n`NEED_MORE_INFO`\u002F`BLOCKED` gate in Step 1. A downsize recommendation\nthat hides a missing MemoryUtilization signal is the single highest-\nrisk misclassification the skill can make.\n\n## Network-limit calculation (concrete formula)\n\nMoved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) - load on demand (see References below).\n\n## Error handling — CLI and data-source failures\n\nMoved verbatim to [references\u002Ferror-handling.md](references\u002Ferror-handling.md) - load on demand (see References below).\n\n## Anti-Patterns — NEVER\n\n- NEVER recommend a downsize without MemoryUtilization data. CPU is the\n  visible signal; memory is the load-bearing constraint. A downsize\n  based on CPU alone may crash a memory-bound workload.\n\n- NEVER recommend Spot Instances for stateful workloads. Databases,\n  message queues, singleton services, and any instance holding local\n  state will lose data on Spot interruption. Spot is for stateless,\n  fault-tolerant workloads only.\n\n- NEVER assume Graviton compatibility without verification. Most JVM\u002F\n  Python\u002FGo workloads work; C\u002FC++ and any code with platform-specific\n  binaries need recompilation. Always check `describe-instance-types`\n  and the application runtime support matrix.\n\n- NEVER recommend migrating to a t-family (t3\u002Ft3a\u002Ft4g) without checking\n  the workload's burst pattern. Sustained CPU > 20% baseline will\n  exhaust CPUCreditBalance and trigger the 20% baseline performance\n  cliff. Use Unlimited mode or stay on m-family for sustained workloads.\n\n- NEVER recommend a Standard RI for a workload with uncertain growth.\n  Standard RIs cannot be exchanged across families. Use Convertible RI\n  or Compute Savings Plan for flexibility insurance.\n\n- NEVER assume a 30-day observation window is sufficient for seasonal\n  workloads. E-commerce (holiday peaks), tax software (April), and\n  education (semester starts) all have seasonal patterns invisible in\n  a generic 30-day window. Pull data from peak and off-peak periods\n  before right-sizing.\n\n- NEVER right-size based on a single metric (CPU only, Memory only,\n  Network only). Require at minimum CPU + Memory + one more dimension\n  for HIGH-confidence downsize recommendations.\n\n- NEVER skip the rollback plan for production right-sizes. Always\n  create an AMI before stopping\u002Fmodifying; always keep the original\n  instance for 24-48 hours post-cutover; always document the rollback\n  procedure.\n\n- NEVER trust memorized instance specs. AWS releases new generations\n  frequently; always query `aws ec2 describe-instance-types` for current\n  vCPU, memory, network, and storage specs.\n\n- NEVER recommend a Zonal RI for a workload that may need to migrate\n  AZs. Zonal RIs are tied to a specific AZ; Regional RIs and Compute\n  Savings Plans apply across AZs in the region. Default to Regional\n  unless there's a specific capacity-reservation need.\n\n- NEVER stack a right-size and a pricing-model change in a single step.\n  Right-size first (utilization change), verify for 7 days, then\n  adjust the pricing model commitment. Stacking both at once obscures\n  which change produced the savings.\n\n- NEVER recommend Compute Savings Plan commitments beyond the steady-\n  state baseline. The flexible nature of Savings Plans means the\n  commitment applies regardless of instance mix, but committing beyond\n  steady-state leaves you paying for unused capacity. Right-size first,\n  identify the steady-state, then commit.\n\n- NEVER ignore EBS-optimization costs in legacy migrations. m4.10xlarge\n  and earlier (some m4\u002Fc4 generations) charge hourly for EBS-optimized\n  status; current-gen (m5+) includes it free. A migration from m4 to\n  m6i unlocks \"free\" EBS optimization in addition to other savings.\n\n- NEVER treat Compute Optimizer's recommendation options at rank 1 as\n  the safest. Rank 1 is the cheapest (highest savings); it may carry\n  the highest performanceRisk. Always check `performanceRisk` on each\n  option and prefer risk ≤ 2 for production workloads.\n\n- NEVER right-size without considering cross-AZ transfer costs. A\n  right-size that moves an instance to a different AZ (via replacement)\n  may shift cross-AZ data-transfer patterns. Same-AZ right-sizes have\n  no transfer impact.\n\n- NEVER recommend Unlimited mode as a permanent fix for a t-family\n  workload with sustained CPU > 50%. Unlimited charges for overage\n  credits indefinitely; migrating to m-family is cheaper above ~40%\n  sustained utilization.\n\n- NEVER recommend Spot without checking the Spot Placement Score (SPS)\n  for the target instance type and AZ. SPS predicts the likelihood of\n  Spot capacity being available; a low score (≤ 10) means Spot requests\n  in that AZ\u002Ftype are frequently unfulfilled or interrupted. Without\n  SPS, a \"90% savings\" Spot recommendation may be unlaunchable in\n  practice, or may interrupt so frequently that the workload fails.\n  Always pull\n  `aws ec2 get-spot-placement-scores --instance-types \u003Ctype>\n  --target-capacity 1 --region-name \u003Cregion>` and surface the SPS in\n  the recommendation. Prefer types with SPS ≥ 50 for production-\n  adjacent Spot workloads.\n\n- NEVER recommend a Standard RI when the workload may need to change\n  instance families within the commitment term. **Why Standard RIs\n  cannot be exchanged:** AWS models Standard RIs as a fixed\n  reservation of a specific instance family + size + AZ (Zonal) or\n  family + size (Regional). The discount is bound to that exact\n  configuration for the full 1- or 3-year term because AWS uses the\n  commitment to provision underlying capacity. Convertible RIs allow\n  exchanges (family, size, OS, tenancy) but charge a slightly lower\n  discount in exchange for the optionality. If a right-size may\n  trigger a family migration (e.g., m5 → r6i for memory-bound drift),\n  default to Convertible RI or Compute Savings Plan. Standard RI is\n  only appropriate when the workload is locked to a single family for\n  the full term (e.g., a vendor-certified appliance that pins to c6i).\n\n- NEVER interpret Compute Optimizer `Optimized` as ALREADY_OPTIMAL\n  without checking the pricing model separately. Compute Optimizer\n  evaluates utilization only — it does not flag On-Demand spend that\n  could move to an RI or Savings Plan. An \"Optimized\" instance may\n  still be 100% On-Demand, missing 30-72% in commitment savings.\n  Always run Step 8 (pricing model) before emitting ALREADY_OPTIMAL.\n\n## Pre-flight safety checks (run before any remediation CLI)\n\nMoved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) - load on demand (see References below).\n\n## Remediation guidance\n\nMoved verbatim to [references\u002Ferror-handling.md](references\u002Ferror-handling.md) - load on demand (see References below).\n\n## Deep reference: EC2 instance selection\n\nMoved verbatim to [references\u002Finstance-selection-reference.md](references\u002Finstance-selection-reference.md) - load on demand (see References below).\n\n## Recent AWS features (2024-2026)\n\nMoved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) - load on demand (see References below).\n\n## References (load on demand)\n\n- [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — Quick start rules, Mindset, Philosophy, Step 0 expert behaviours, Step 7 Graviton and Step 8 pricing deep-dives, network-limit formula, and 2024-2026 features, moved verbatim from SKILL.md\n- [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — secondary worked examples (already optimal, NEED_MORE_INFO memory-missing) and the Step 1 NEED_MORE_INFO emit template, moved verbatim from SKILL.md\n- [references\u002Ferror-handling.md](references\u002Ferror-handling.md) — CloudWatch\u002FCompute Optimizer\u002FEC2 API failure tables and per-verdict remediation guidance, moved verbatim from SKILL.md\n- [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — pre-flight data-source CLI, Compute Optimizer parsing, and pre-flight safety checks, moved verbatim from SKILL.md\n- [references\u002Finstance-selection-reference.md](references\u002Finstance-selection-reference.md) — extended with the instance family taxonomy, Graviton generations, pricing comparison, credit math, and network tiers, moved verbatim from SKILL.md\n\n## Domain\n\nAWS CloudOps \u002F EC2 Compute Cost Optimization, FinOps & Right-Sizing.\n\n## AWS documentation\n\n- **Amazon EC2 User Guide — Instance types** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAWSEC2\u002Flatest\u002FUserGuide\u002Finstance-types.html\n- **AWS Compute Optimizer User Guide** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcompute-optimizer\u002Flatest\u002Fug\u002Fwhat-is.html\n- **AWS CloudWatch Agent User Guide** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAmazonCloudWatch\u002Flatest\u002Fmonitoring\u002FInstall-CloudWatch-Agent.html\n- **AWS Savings Plans User Guide** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fsavingsplans\u002Flatest\u002Fuserguide\u002F\n- **Amazon EC2 pricing** — https:\u002F\u002Faws.amazon.com\u002Fec2\u002Fpricing\u002F\n- **AWS Graviton** — https:\u002F\u002Faws.amazon.com\u002Fec2\u002Fgraviton\u002F\n- **AWS CLI EC2 reference** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcli\u002Flatest\u002Freference\u002Fec2\u002F\n- **AWS Well-Architected Framework — Cost Optimization** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fwellarchitected\u002Flatest\u002Fcost-optimization-pillar\u002Fwelcome.html\n","# EC2 Rightsizing Optimizer\n\n## Quick start\n\nMoved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) - load on demand (see References below).\n\n## Mindset\n\nMoved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) - load on demand (see References below).\n\n## Philosophy\n\nMoved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) - load on demand (see References below).\n\n## Quick reference — verdict thresholds\n\n| Observation (14-30 day window) | Verdict | Recommendation |\n|---|---|---|\n| CPU \u003C 30% avg AND Memory \u003C 50% avg AND Network \u003C 30% limit AND Disk low | **OPPORTUNITY_FOUND** (downsize) | Step 4 — downsize 1-2 sizes, prefer Graviton equivalent |\n| CPU > 70% sustained OR Memory > 80% OR Network > 50% limit | **OPPORTUNITY_FOUND** (upsize — performance risk) | Step 5 — upsize to next class that resolves the bottleneck |\n| Burstable t-family with CPUCreditBalance chronically near 0 | **OPPORTUNITY_FOUND** (architecture change) | Step 6 — migrate to m-family or enable Unlimited |\n| Graviton-compatible workload on x86 with stable utilization | **OPPORTUNITY_FOUND** (price-performance) | Step 7 — Graviton migration during next AMI refresh |\n| On-Demand pricing on steady-state workload | **OPPORTUNITY_FOUND** (pricing model) | Step 8 — RI or Compute Savings Plan |\n| MemoryUtilization metric absent | **NEED_MORE_INFO** (BLOCKED — not ALREADY_OPTIMAL) | Install CloudWatch Agent, wait 14-30 days, re-evaluate |\n| Compute Optimizer finding `Optimized` + metrics present + already on RI\u002FSP | **ALREADY_OPTIMAL** | None — continue monitoring |\n| Compute Optimizer finding `NotOptimized` (insufficient data) | **NEED_MORE_INFO** | Wait for additional observation |\n| All thresholds pass for current type AND pricing already optimized | **OPTIMIZED** | None required |\n\nSee the ordered steps for edge cases (cross-family migration, EBS-bound\nworkloads, Spot-eligible workloads, multi-AZ fleets).\n\n## Pre-flight: data gate (run before any right-sizing decision)\n\nRight-sizing decisions are only as good as the underlying data. Several\ndata-quality conditions short-circuit the optimization — misclassifying\nthem produces recommendations that fail at runtime.\n\n### Required data sources\n\nMoved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) - load on demand (see References below).\n\n### Data-quality short-circuits\n\n| Condition | Effect on optimization |\n|---|---|\n| `MemoryUtilization` metric absent (CWAgent not installed) | **NEED_MORE_INFO**: Install CWAgent, wait 14-30 days, re-evaluate. Do NOT recommend a downsize. |\n| Observation window \u003C 14 days | **NEED_MORE_INFO**: workload may reflect atypical load (deploy week, incident response, seasonal dip). Minimum 14 days; 30 days preferred. |\n| Instance stopped for > 50% of window | Metrics are skewed. Re-pull after a stable 14-day running window. |\n| Compute Optimizer enrollment `Inactive` | No Compute Optimizer findings to cross-reference. Rely on CloudWatch metrics directly. |\n| Compute Optimizer `lastRefreshTimestamp` > 30 days old | Stale finding — workload may have changed. Re-run `get-ec2-instance-recommendations`. |\n| Instance in `Stopped` state at evaluation time | Right-sizing is moot until the instance restarts. Note and skip. |\n\n### Conflicting-data arbitration\n\nWhen CloudWatch metrics and Compute Optimizer findings disagree (e.g.,\nCloudWatch shows CPU 60% but Compute Optimizer says Overprovisioned),\ntrust CloudWatch. Compute Optimizer averages over 30 days and may smooth\nout recent workload spikes. The freshest signal wins.\n\n## Process — Optimization logic (apply in order)\n\n### Step 0: Non-obvious behaviours that change the recommendation\n\nMoved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) - load on demand (see References below).\n\n### Step 1: Validate input and data sufficiency\n\nIf `MemoryUtilization` is absent from the input metrics (CWAgent not\ninstalled), emit NEED_MORE_INFO with a specific installation instruction:\n\nMoved verbatim to [references\u002Fworked-examples.md](references\u002Fworked-examples.md) - load on demand (see References below).\n\nIf the observation window is \u003C 14 days, emit NEED_MORE_INFO: \"Observation\nwindow is N days; minimum 14 days required for representative data.\"\nProceed only if both conditions are met.\n\n### Step 2: Compute Optimizer reconciliation\n\nIf a Compute Optimizer finding is provided, reconcile with CloudWatch\nmetrics. Compute Optimizer's 30-day analysis is a sanity check; the\nfresh CloudWatch signal wins on disagreement.\n\nMoved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) - load on demand (see References below).\n\n| Field to verify | What it tells you | Action if missing\u002Fstale |\n|---|---|---|\n| `finding` | High-level classification (Optimized\u002FUnder\u002FOver) | If absent, finding is `NotOptimized` due to insufficient data → emit NEED_MORE_INFO. |\n| `recommendationOptions[].performanceRisk` | Risk that the recommended type cannot handle the workload (1=low ... 5=high) | Always prefer options with `performanceRisk ≤ 2` for production. If only risk ≥ 4 options exist, emit NEED_MORE_INFO and investigate manually. |\n| `lastRefreshTimestamp` | When Compute Optimizer last re-analyzed | If > 30 days old, treat as stale; re-run `get-ec2-instance-recommendations` or rely on CloudWatch. |\n| `utilizationMetrics[]` | Source data Compute Optimizer used | Cross-check against your CloudWatch pull. If they disagree, freshest CloudWatch wins. |\n| `savingsOpportunity.estimatedMonthlySavings` | Dollar savings estimate | Sanity-check against your own hourly math (Step 9). Compute Optimizer uses list price; your actual RI\u002FSP rate may differ. |\n\n| Compute Optimizer finding | CloudWatch agreement | Action |\n|---|---|---|\n| `Overprovisioned` + HIGH confidence (Memory metric present, performanceRisk ≤ 2) | CPU \u003C 30% AND Memory \u003C 50% | Proceed to Step 4 (downsize). |\n| `Overprovisioned` + LOW confidence (Memory inferred, performanceRisk ≥ 4) | — | Treat as NEED_MORE_INFO per the compute-optimizer-findings-auditor. Install CWAgent first. |\n| `Underprovisioned` | CPU > 70% OR Memory > 80% | Proceed to Step 5 (upsize). |\n| `Optimized` | All thresholds pass for current type | Proceed to Step 8 (pricing model check). |\n| `NotOptimized` (insufficient data) | — | NEED_MORE_INFO: wait for additional observation. |\n\n### Step 3: Workload classification\n\nClassify the workload shape to guide family selection (Step 4-5):\n\n| Workload shape | Indicators | Recommended family |\n|---|---|---|\n| Balanced (web server, app server, dev) | CPU ~ Memory ~ Network balanced | General purpose: m7i, m7a, m7g (Graviton), m6i, m6a |\n| Compute-bound (batch, HPC, CI runners, video encoding) | CPU > Memory utilization | Compute optimized: c7i, c7a, c7g, c6i, c6a |\n| Memory-bound (in-memory cache, big-data analytics, relational DB) | Memory > CPU utilization, large working set | Memory optimized: r7i, r7a, r7g, r6i, x2idn, x2iedn |\n| Storage-bound (NoSQL, data warehousing, OLAP) | High disk ops, large local storage need | Storage optimized: i4i, im4gn, i4g |\n| GPU (ML training\u002Finference, rendering) | GPU utilization, CUDA workloads | GPU: g5, g6, p5, p4d |\n| Network-bound (real-time streaming, HFT) | NetworkIn + NetworkOut > 50% of limit | Network optimized: c6n, m6n, r6n; or Enhanced Networking (ENA) |\n| Bursty (dev\u002Ftest, low-traffic web) | t-family with healthy CPUCreditBalance | Burstable: t3, t3a, t4g |\n\n### Step 4: Downsize decision (CPU\u002FMemory\u002FNetwork\u002FDisk all low)\n\nApply the downsize matrix when CPU \u003C 30% avg AND Memory \u003C 50% avg AND\nNetwork \u003C 30% of limit AND Disk \u003C 30% of provisioned IOPS.\n\n**Downsize magnitude:**\n- If CPU \u003C 10% AND Memory \u003C 30%: downsize 2 sizes (e.g., m5.4xlarge → m5.large).\n- If CPU \u003C 30% AND Memory \u003C 50%: downsize 1 size (e.g., m5.2xlarge → m5.large).\n- Conservative default: downsize 1 size, observe 7 days, downsize again\n  if utilization remains low. This staged approach catches edge cases\n  that a 2-size jump misses.\n\n**Family selection for downsize:**\n- Prefer staying within the same family (m5.2xlarge → m5.large) for\n  lowest migration risk.\n- If the workload is bursty with healthy credit balance, consider\n  migrating to t-family (t3\u002Fxlarge saves 60%+ vs m5.xlarge).\n- If Graviton-compatible, prefer the g-suffix equivalent (m7g.large vs\n  m7i.large: ~20% additional savings).\n\n**Burstable family (t3\u002Ft3a\u002Ft4g) check:**\n- Verify the workload's burst pattern: average CPU \u003C 20% baseline (below\n  credit-earning rate) and burst duration \u003C 1 hour\u002Fday.\n- If the workload sustains > 20% CPU, do NOT migrate to t-family — use\n  Unlimited mode (charges for overage) or stay on m-family.\n\n### Step 5: Upsize decision (CPU or Memory high)\n\nApply the upsize matrix when CPU > 70% sustained OR Memory > 80% OR\nNetwork > 50% of limit.\n\n**Upsize magnitude:**\n- Identify the bottleneck dimension (CPU, Memory, Network, or Disk).\n- Upsize to the next instance class that addresses the bottleneck:\n  - CPU-bound: same family, more vCPUs (m5.large → m5.xlarge).\n  - Memory-bound: switch to memory-optimized family if Memory > 80%\n    persistently (m5.xlarge → r6i.xlarge, doubling memory per vCPU).\n  - Network-bound: switch to network-optimized family\n    (m5.xlarge → c5n.large or enable Enhanced Networking).\n  - Disk-bound: migrate to storage-optimized family OR move the\n    workload to EBS-optimized io2 volumes.\n\n**Severity grading for upsizing:**\n- HIGH: CPU sustained > 90% OR Memory > 95% — active performance\n  degradation; upsize immediately.\n- MEDIUM: CPU 70-90% OR Memory 80-95% — performance risk; upsize at\n  next maintenance window.\n- LOW: peaks above 70% but average \u003C 50% — investigate via Performance\n  Insights \u002F CloudWatch before upsizing (might be a query optimization\n  issue, not capacity).\n\n### Step 6: Burstable t-family architecture change\n\nIf the current instance is t-family AND CPUCreditBalance chronically\ndrops below ~50 credits (visible in CloudWatch), the workload is not\nburst-compatible. Two remediation paths:\n\n1. **Enable Unlimited mode** (cheapest, preserves instance):\n   `aws ec2 modify-instance-credit-specification --instance-id \u003Cid>\n   --cpu-credits unlimited`. Charges for overage credits but maintains\n   baseline performance. Recommended for workloads with occasional\n   sustained-CPU bursts.\n2. **Migrate to m-family** (most robust, higher baseline cost):\n   migrate from t3.large to m6i.large (or m7g.large for Graviton).\n   Eliminates the credit-balance cliff entirely. Recommended for\n   workloads with sustained CPU > 20%.\n\n### Step 7: Graviton (ARM) migration evaluation\n\nMoved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) - load on demand (see References below).\n\n### Step 8: Pricing model optimization\n\nMoved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) - load on demand (see References below).\n\n### Step 9: Impact estimation\n\nCompute the monthly savings for each recommendation:\n\n```\nMonthly savings = (current_hourly - new_hourly) * 730 hours\n```\n\nInclude EBS implications (instance-type change may unlock\u002Finclude\nEBS-optimization costs; current-gen instances have EBS-optimized built\nin, legacy may not).\n\nInclude data transfer implications (instance-type change may have\ndifferent network performance characteristics — usually a non-issue for\nsame-family right-sizes, material for cross-family).\n\nFor pricing-model changes (RI\u002FSavings Plan), compute savings separately:\n```\nRI savings = On-Demand hourly * (1 - RI discount) * hours\n```\n\nTotal savings = rightsize savings + pricing-model savings.\n\n### Step 10: Final verdict\n\nThe verdict is the worst-case (most-actionable) finding across all\ndimensions:\n\n- If any dimension recommends a change (downsize, upsize, architecture,\n  Graviton, pricing model), verdict is **OPPORTUNITY_FOUND**.\n- If all dimensions pass AND pricing is already optimized (RI\u002FSavings\n  Plan in place), verdict is **OPTIMIZED**.\n- If all dimensions pass for current type but pricing model could be\n  improved, verdict is **OPPORTUNITY_FOUND** (pricing dimension).\n- If data is insufficient (memory absent, window \u003C 14 days), verdict\n  is **NEED_MORE_INFO**.\n\n## Output format\n\n```text\nTARGET: \u003Cinstance-id or fleet-description>\nVERDICT: OPTIMIZED | OPPORTUNITY_FOUND | ALREADY_OPTIMAL\nREASON: \u003C1-2 sentences naming the recommendation and the supporting data>\nRECOMMENDATION:\n  Current: \u003Cinstance-type> at \u003Cpricing-model> in \u003Cregion>\n  Proposed: \u003Cinstance-type> at \u003Cpricing-model> in \u003Cregion>\n  Graviton: \u003Cyes\u002Fno\u002FN\u002FA>\n  Family change: \u003Cyes\u002Fno>\n  Confidence: \u003CHIGH\u002FMEDIUM\u002FLOW> — \u003Cone-line rationale>\nESTIMATED_SAVINGS:\n  Monthly (rightsize): $\u003Camount>\n  Monthly (pricing model): $\u003Camount>\n  Annual total: $\u003Camount>\n  Assumptions: \u003Clist (730h\u002Fmonth, On-Demand baseline, etc.)>\nMIGRATION_STEPS:\n  1. \u003Cspecific action with CLI command>\n  2. \u003Cverification step>\nCONFIRM: Before executing any state-changing CLI, emit and await operator\n  approval: \"CONFIRM: About to \u003Caction> on \u003Cinstance-id> in \u003Cregion>.\n  Proceed? (yes\u002Fno)\"\n```\n\n### Worked example — overprovisioned, high-confidence downsize + Graviton\n\n```text\nTARGET: i-0abc123\nVERDICT: OPPORTUNITY_FOUND\nREASON: m5.2xlarge at 8% CPU \u002F 22% Memory \u002F low Network\u002FDisk over 30 days\n  is a clear downsize candidate. Graviton-compatible workload (Java 17);\n  m7g.large saves 75% on the rightsize plus 20% on Graviton price-\n  performance. Adding a 3-year Compute Savings Plan captures additional\n  40% on the residual spend (Step 4 + Step 7 + Step 8).\nRECOMMENDATION:\n  Current: m5.2xlarge at On-Demand in us-east-1\n  Proposed: m7g.large at 3-year Compute Savings Plan in us-east-1\n  Graviton: yes (Java 17, multi-arch AMI available)\n  Family change: yes (m5 → m7g)\n  Confidence: HIGH — Memory metric present (CWAgent), CPU+Memory both\n    well below thresholds, Compute Optimizer cross-check agrees\n    (Overprovisioned, performanceRisk 1).\nESTIMATED_SAVINGS:\n  Monthly (rightsize): $232.32  (m5.2xlarge $0.384\u002Fh → m7g.large $0.0644\u002Fh;\n                                 730h × $0.3196 delta)\n  Monthly (pricing model): $35.96  (40% off m7g.large On-Demand via\n                                    3-yr Compute Savings Plan)\n  Annual total: $3,219.84\n  Assumptions: 730h\u002Fmonth, us-east-1 On-Demand pricing as of 2026-08-07,\n    workload steady-state, no significant growth expected.\nMIGRATION_STEPS:\n  1. Provision the new instance:\n     aws ec2 run-instances --image-id \u003Cami-arm64> --instance-type m7g.large\n       --key-name \u003Ckey> --security-group-ids \u003Csg> --subnet-id \u003Csubnet>\n       --tag-specifications \"ResourceType=instance,Tags=[{Key=Name,\n       Value=i-0abc123-m7g}]\"\n  2. Migrate application data \u002F EBS volumes:\n     - Create an AMI from i-0abc123 (for rollback).\n     - Or attach the existing EBS volume to the new instance (requires\n       stop\u002Fdetach\u002Fattach).\n  3. Validate application functionality on m7g.large for 24-48 hours\n     (focus on memory leaks, JIT behaviour, GC pauses under load).\n  4. Cutover DNS \u002F load balancer to the new instance.\n  5. Purchase a 3-year Compute Savings Plan for the m7g.large commit:\n     aws savingsplans create-savings-plan --savings-plan-offering-id \u003Cid>\n       --commitment \u003Camount>\n  6. Decommission i-0abc123 once the new instance is verified.\nCONFIRM: Before provisioning the new instance, emit and await:\n  \"CONFIRM: About to run-instances m7g.large in us-east-1 for rightsize\n   of i-0abc123. This will incur ~$47\u002Fmonth On-Demand until the Savings\n   Plan is in place. Proceed? (yes\u002Fno)\"\n  Do NOT run the CLI until the operator confirms.\n```\n\n### Worked example — already optimal\n\nMoved verbatim to [references\u002Fworked-examples.md](references\u002Fworked-examples.md) - load on demand (see References below).\n\n### Worked example — NEED_MORE_INFO (memory data missing)\n\nMoved verbatim to [references\u002Fworked-examples.md](references\u002Fworked-examples.md) - load on demand (see References below).\n\n## Verdict semantics — reconciling the verdict_shape\n\nThe `verdict_shape` metadata declares the three primary verdicts\n(`OPTIMIZED | OPPORTUNITY_FOUND | ALREADY_OPTIMAL`). Two additional\n**data-gating** verdicts (`NEED_MORE_INFO`, `BLOCKED`) appear in the\nworkflow when the data required for a confident decision is missing.\nTreat them as pre-decision guards, not as alternatives to the primary\nthree:\n\n| Verdict | When to emit | Position in workflow |\n|---|---|---|\n| `OPPORTUNITY_FOUND` | At least one dimension (size, family, Graviton, pricing) has a concrete, savings-bearing recommendation. | Primary — terminal for actionable findings. |\n| `OPTIMIZED` | A change was applied and verified this session; metrics confirm the new size lands within healthy bands. | Primary — only emitted post-remediation. |\n| `ALREADY_OPTIMAL` | All dimensions pass for the current type AND the pricing model is already committed (RI\u002FSavings Plan covering ≥ 95% of steady-state spend). | Primary — terminal for healthy findings. |\n| `NEED_MORE_INFO` | Data gate failed: MemoryUtilization absent, observation window \u003C 14 days, Compute Optimizer `NotOptimized` due to insufficient data, or freshest CloudWatch signal disagrees with an old Compute Optimizer finding. | Pre-decision — emit before any sizing recommendation; the next action is data collection, not remediation. |\n| `BLOCKED` | A hard precondition prevents evaluation: Compute Optimizer enrollment `Inactive` AND no CloudWatch metrics retrievable, instance is in `Stopped`\u002F`Terminated` for > 50% of the window, or IAM denies `cloudwatch:GetMetricStatistics`. | Pre-decision — emit when no reliable signal exists at all. |\n\n**Rule:** never emit `OPPORTUNITY_FOUND` without first discharging every\n`NEED_MORE_INFO`\u002F`BLOCKED` gate in Step 1. A downsize recommendation\nthat hides a missing MemoryUtilization signal is the single highest-\nrisk misclassification the skill can make.\n\n## Network-limit calculation (concrete formula)\n\nMoved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) - load on demand (see References below).\n\n## Error handling — CLI and data-source failures\n\nMoved verbatim to [references\u002Ferror-handling.md](references\u002Ferror-handling.md) - load on demand (see References below).\n\n## Anti-Patterns — NEVER\n\n- NEVER recommend a downsize without MemoryUtilization data. CPU is the\n  visible signal; memory is the load-bearing constraint. A downsize\n  based on CPU alone may crash a memory-bound workload.\n\n- NEVER recommend Spot Instances for stateful workloads. Databases,\n  message queues, singleton services, and any instance holding local\n  state will lose data on Spot interruption. Spot is for stateless,\n  fault-tolerant workloads only.\n\n- NEVER assume Graviton compatibility without verification. Most JVM\u002F\n  Python\u002FGo workloads work; C\u002FC++ and any code with platform-specific\n  binaries need recompilation. Always check `describe-instance-types`\n  and the application runtime support matrix.\n\n- NEVER recommend migrating to a t-family (t3\u002Ft3a\u002Ft4g) without checking\n  the workload's burst pattern. Sustained CPU > 20% baseline will\n  exhaust CPUCreditBalance and trigger the 20% baseline performance\n  cliff. Use Unlimited mode or stay on m-family for sustained workloads.\n\n- NEVER recommend a Standard RI for a workload with uncertain growth.\n  Standard RIs cannot be exchanged across families. Use Convertible RI\n  or Compute Savings Plan for flexibility insurance.\n\n- NEVER assume a 30-day observation window is sufficient for seasonal\n  workloads. E-commerce (holiday peaks), tax software (April), and\n  education (semester starts) all have seasonal patterns invisible in\n  a generic 30-day window. Pull data from peak and off-peak periods\n  before right-sizing.\n\n- NEVER right-size based on a single metric (CPU only, Memory only,\n  Network only). Require at minimum CPU + Memory + one more dimension\n  for HIGH-confidence downsize recommendations.\n\n- NEVER skip the rollback plan for production right-sizes. Always\n  create an AMI before stopping\u002Fmodifying; always keep the original\n  instance for 24-48 hours post-cutover; always document the rollback\n  procedure.\n\n- NEVER trust memorized instance specs. AWS releases new generations\n  frequently; always query `aws ec2 describe-instance-types` for current\n  vCPU, memory, network, and storage specs.\n\n- NEVER recommend a Zonal RI for a workload that may need to migrate\n  AZs. Zonal RIs are tied to a specific AZ; Regional RIs and Compute\n  Savings Plans apply across AZs in the region. Default to Regional\n  unless there's a specific capacity-reservation need.\n\n- NEVER stack a right-size and a pricing-model change in a single step.\n  Right-size first (utilization change), verify for 7 days, then\n  adjust the pricing model commitment. Stacking both at once obscures\n  which change produced the savings.\n\n- NEVER recommend Compute Savings Plan commitments beyond the steady-\n  state baseline. The flexible nature of Savings Plans means the\n  commitment applies regardless of instance mix, but committing beyond\n  steady-state leaves you paying for unused capacity. Right-size first,\n  identify the steady-state, then commit.\n\n- NEVER ignore EBS-optimization costs in legacy migrations. m4.10xlarge\n  and earlier (some m4\u002Fc4 generations) charge hourly for EBS-optimized\n  status; current-gen (m5+) includes it free. A migration from m4 to\n  m6i unlocks \"free\" EBS optimization in addition to other savings.\n\n- NEVER treat Compute Optimizer's recommendation options at rank 1 as\n  the safest. Rank 1 is the cheapest (highest savings); it may carry\n  the highest performanceRisk. Always check `performanceRisk` on each\n  option and prefer risk ≤ 2 for production workloads.\n\n- NEVER right-size without considering cross-AZ transfer costs. A\n  right-size that moves an instance to a different AZ (via replacement)\n  may shift cross-AZ data-transfer patterns. Same-AZ right-sizes have\n  no transfer impact.\n\n- NEVER recommend Unlimited mode as a permanent fix for a t-family\n  workload with sustained CPU > 50%. Unlimited charges for overage\n  credits indefinitely; migrating to m-family is cheaper above ~40%\n  sustained utilization.\n\n- NEVER recommend Spot without checking the Spot Placement Score (SPS)\n  for the target instance type and AZ. SPS predicts the likelihood of\n  Spot capacity being available; a low score (≤ 10) means Spot requests\n  in that AZ\u002Ftype are frequently unfulfilled or interrupted. Without\n  SPS, a \"90% savings\" Spot recommendation may be unlaunchable in\n  practice, or may interrupt so frequently that the workload fails.\n  Always pull\n  `aws ec2 get-spot-placement-scores --instance-types \u003Ctype>\n  --target-capacity 1 --region-name \u003Cregion>` and surface the SPS in\n  the recommendation. Prefer types with SPS ≥ 50 for production-\n  adjacent Spot workloads.\n\n- NEVER recommend a Standard RI when the workload may need to change\n  instance families within the commitment term. **Why Standard RIs\n  cannot be exchanged:** AWS models Standard RIs as a fixed\n  reservation of a specific instance family + size + AZ (Zonal) or\n  family + size (Regional). The discount is bound to that exact\n  configuration for the full 1- or 3-year term because AWS uses the\n  commitment to provision underlying capacity. Convertible RIs allow\n  exchanges (family, size, OS, tenancy) but charge a slightly lower\n  discount in exchange for the optionality. If a right-size may\n  trigger a family migration (e.g., m5 → r6i for memory-bound drift),\n  default to Convertible RI or Compute Savings Plan. Standard RI is\n  only appropriate when the workload is locked to a single family for\n  the full term (e.g., a vendor-certified appliance that pins to c6i).\n\n- NEVER interpret Compute Optimizer `Optimized` as ALREADY_OPTIMAL\n  without checking the pricing model separately. Compute Optimizer\n  evaluates utilization only — it does not flag On-Demand spend that\n  could move to an RI or Savings Plan. An \"Optimized\" instance may\n  still be 100% On-Demand, missing 30-72% in commitment savings.\n  Always run Step 8 (pricing model) before emitting ALREADY_OPTIMAL.\n\n## Pre-flight safety checks (run before any remediation CLI)\n\nMoved verbatim to [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) - load on demand (see References below).\n\n## Remediation guidance\n\nMoved verbatim to [references\u002Ferror-handling.md](references\u002Ferror-handling.md) - load on demand (see References below).\n\n## Deep reference: EC2 instance selection\n\nMoved verbatim to [references\u002Finstance-selection-reference.md](references\u002Finstance-selection-reference.md) - load on demand (see References below).\n\n## Recent AWS features (2024-2026)\n\nMoved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) - load on demand (see References below).\n\n## References (load on demand)\n\n- [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — Quick start rules, Mindset, Philosophy, Step 0 expert behaviours, Step 7 Graviton and Step 8 pricing deep-dives, network-limit formula, and 2024-2026 features, moved verbatim from SKILL.md\n- [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — secondary worked examples (already optimal, NEED_MORE_INFO memory-missing) and the Step 1 NEED_MORE_INFO emit template, moved verbatim from SKILL.md\n- [references\u002Ferror-handling.md](references\u002Ferror-handling.md) — CloudWatch\u002FCompute Optimizer\u002FEC2 API failure tables and per-verdict remediation guidance, moved verbatim from SKILL.md\n- [references\u002Fdiagnostic-commands.md](references\u002Fdiagnostic-commands.md) — pre-flight data-source CLI, Compute Optimizer parsing, and pre-flight safety checks, moved verbatim from SKILL.md\n- [references\u002Finstance-selection-reference.md](references\u002Finstance-selection-reference.md) — extended with the instance family taxonomy, Graviton generations, pricing comparison, credit math, and network tiers, moved verbatim from SKILL.md\n\n## Domain\n\nAWS CloudOps \u002F EC2 Compute Cost Optimization, FinOps & Right-Sizing.\n\n## AWS documentation\n\n- **Amazon EC2 User Guide — Instance types** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAWSEC2\u002Flatest\u002FUserGuide\u002Finstance-types.html\n- **AWS Compute Optimizer User Guide** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcompute-optimizer\u002Flatest\u002Fug\u002Fwhat-is.html\n- **AWS CloudWatch Agent User Guide** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAmazonCloudWatch\u002Flatest\u002Fmonitoring\u002FInstall-CloudWatch-Agent.html\n- **AWS Savings Plans User Guide** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fsavingsplans\u002Flatest\u002Fuserguide\u002F\n- **Amazon EC2 pricing** — https:\u002F\u002Faws.amazon.com\u002Fec2\u002Fpricing\u002F\n- **AWS Graviton** — https:\u002F\u002Faws.amazon.com\u002Fec2\u002Fgraviton\u002F\n- **AWS CLI EC2 reference** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcli\u002Flatest\u002Freference\u002Fec2\u002F\n- **AWS Well-Architected Framework — Cost Optimization** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fwellarchitected\u002Flatest\u002Fcost-optimization-pillar\u002Fwelcome.html\n",{"name":5,"license":15,"metadata":24,"description":7,"compatibility":43},{"tags":25,"phase":26,"author":27,"domain":28,"family":29,"version":30,"keywords":31,"task_type":32,"complexity":33,"entry_point":34,"skill_class":35,"when_to_use":36,"requires_llm":37,"verdict_shape":38,"when_not_to_use":39,"invocation_schema":40,"supports_pipeline":37,"invocation_example":41,"activation_triggers":42},"ec2, compute, cost-optimization, finops, right-sizing, graviton, compute-optimizer","3","Jacky Chan — AWS Community Builder","aws-cloudops","Compute","0.1.0","EC2, right-sizing, cost optimization, Compute Optimizer, CloudWatch Agent, MemoryUtilization, CPUUtilization, NetworkIn, Graviton, ARM, m7i, c7i, r7i, i4i, g5, p5, Reserved Instance, Savings Plans, Spot Instances, FinOps, instance family selection, EBS-optimized, Enhanced Networking, burstable, t-family, CPU credit balance, price-performance","optimize","high","false","capability","Right-sizing EC2 instances for cost optimization, planning a FinOps rightsizing batch, interpreting Compute Optimizer EC2 findings, evaluating Graviton (ARM) migration opportunities, selecting an instance family for a new workload, comparing pricing models (On-Demand \u002F RI \u002F Savings Plans \u002F Spot), or building a monthly savings estimate for an optimization initiative.","true","OPTIMIZED | OPPORTUNITY_FOUND | ALREADY_OPTIMAL","Auditing Compute Optimizer finding confidence on a single resource (use compute-optimizer-findings-auditor), EBS volume right-sizing (use compute-optimizer-findings-auditor for EBS findings), Lambda memory tuning (use compute-optimizer-findings-auditor), Fargate task sizing (use compute-optimizer-findings-auditor for ECS), or performance troubleshooting for a slow instance (use rds-connectivity-troubleshooter for database reachability, or Performance Insights \u002F CloudWatch metrics directly for EC2). This skill focuses on cost-driven EC2 rightsizing decisions, not single-finding confidence audits or non-EC2 resources.","Input: either (a) an EC2 instance identifier + live-account context, (b) a Compute Optimizer EC2 finding document, OR (c) CloudWatch utilization metrics (CPU, Memory, Network, Disk) for one or more instances with at least 14 days of observation. Output: a deterministic TARGET\u002FVERDICT\u002FREASON\u002FRECOMMENDATION\u002FESTIMATED_SAVINGS\u002F MIGRATION_STEPS block per instance, where VERDICT ∈ {OPTIMIZED, OPPORTUNITY_FOUND, ALREADY_OPTIMAL} and RECOMMENDATION includes the target instance type, family, pricing model, and Graviton flag.","# Minimal valid input (offline finding classification):\nInstanceId: i-0abc123\nCurrent instance type: m5.2xlarge\nRegion: us-east-1\nCompute Optimizer finding: Overprovisioned\nFinding reasons: [\"CPUOverprovisioned\", \"MemoryOverprovisioned\"]\nUtilization metrics (last 30 days):\n  - CPUUtilization: avg=8%, max=15%, source=CloudWatch\n  - MemoryUtilization: avg=22%, max=30%, source=CloudWatchAgent\n  - NetworkIn: avg=0.05 MB\u002Fs, max=0.1 MB\u002Fs\n  - DiskReadOps+DiskWriteOps: avg=10\u002Fs, max=20\u002Fs\nRecommendation options:\n  - rank: 1, instanceType: t3.large, performanceRisk: 1,\n    savingsOpportunity: {savingsPercentage: 75, estimatedMonthlySavings: 150}\nPricing: On-Demand, no RI\u002FSavings Plan commitment.\nEmit the standard optimization block (TARGET, VERDICT, REASON,\nRECOMMENDATION, ESTIMATED_SAVINGS, MIGRATION_STEPS).","right-size EC2 instances, EC2 cost optimization, Compute Optimizer EC2 recommendations, EC2 underutilized, EC2 overprovisioned, FinOps EC2 savings, Graviton migration opportunity, EC2 Reserved Instance, Savings Plan recommendation, EC2 instance family selection, EC2 monthly savings estimate, EC2 fleet rightsizing, t-family CPU credit exhaustion, m5 to m7i migration, EC2 pricing model optimization, spot instance opportunity","Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). Offline recommendation-document classification works from pasted Compute Optimizer findings and CloudWatch metrics. Live-account optimization uses aws ec2 describe-instances, aws cloudwatch get-metric-statistics, aws compute-optimizer get-ec2-instance-recommendations, aws ce get-cost-and-usage, and aws ec2 describe-instance-types (AWS CLI v2, SSO or key-based credentials).","main","eeace51bd5dd1db2030729d83eeab988861553aa","skills\u002Fec2-rightsizing-optimizer",0,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills","https:\u002F\u002Fgithub.com\u002Fjhkchan","CTO & Co-Founder @Beever-AI  & @votee. CAISP. AWS Community Builder. Organizer@GDGCloudHK. MongoDB Champion. Technopreneur + Infornographer.","2026-09-24 08:54:10",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add jhkchan\u002Faws-agent-skills --skill ec2-rightsizing-optimizer",{"tool":58,"command":59},"bunx","bunx skills add jhkchan\u002Faws-agent-skills --skill ec2-rightsizing-optimizer",{"tool":61,"command":62},"pnpm","pnpm dlx skills add jhkchan\u002Faws-agent-skills --skill ec2-rightsizing-optimizer","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fec2-rightsizing-optimizer\u002FSKILL.md",true,[66,72,76,80,84,88,92,96,100,104,108,112,116,120,124,128,132,136,140,144],{"path":67,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":70,"sourceHtmlUrl":71},"eval\u002Ftest-cases.yaml","REFERENCE","参考文档",8663,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fec2-rightsizing-optimizer\u002Feval\u002Ftest-cases.yaml",{"path":73,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":74,"sourceHtmlUrl":75},"evals\u002Fbaselines\u002Falready-optimal-with-savings-plan.md",445,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fec2-rightsizing-optimizer\u002Fevals\u002Fbaselines\u002Falready-optimal-with-savings-plan.md",{"path":77,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":78,"sourceHtmlUrl":79},"evals\u002Fbaselines\u002Fmemory-data-missing-blocked.md",428,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fec2-rightsizing-optimizer\u002Fevals\u002Fbaselines\u002Fmemory-data-missing-blocked.md",{"path":81,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":82,"sourceHtmlUrl":83},"evals\u002Fbaselines\u002Foverprovisioned-downsize-graviton.md",798,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fec2-rightsizing-optimizer\u002Fevals\u002Fbaselines\u002Foverprovisioned-downsize-graviton.md",{"path":85,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":86,"sourceHtmlUrl":87},"evals\u002Fbaselines\u002Ft-family-credit-exhaustion.md",454,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fec2-rightsizing-optimizer\u002Fevals\u002Fbaselines\u002Ft-family-credit-exhaustion.md",{"path":89,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":90,"sourceHtmlUrl":91},"evals\u002Fbaselines\u002Funderprovisioned-upsize-memory.md",411,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fec2-rightsizing-optimizer\u002Fevals\u002Fbaselines\u002Funderprovisioned-upsize-memory.md",{"path":93,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":94,"sourceHtmlUrl":95},"evals\u002Feval_config.yaml",1827,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fec2-rightsizing-optimizer\u002Fevals\u002Feval_config.yaml",{"path":97,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":98,"sourceHtmlUrl":99},"evals\u002Fevals.json",4529,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fec2-rightsizing-optimizer\u002Fevals\u002Fevals.json",{"path":101,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":102,"sourceHtmlUrl":103},"evals\u002Fprompts\u002Falready-optimal-with-savings-plan.md",900,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fec2-rightsizing-optimizer\u002Fevals\u002Fprompts\u002Falready-optimal-with-savings-plan.md",{"path":105,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":106,"sourceHtmlUrl":107},"evals\u002Fprompts\u002Fmemory-data-missing-blocked.md",845,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fec2-rightsizing-optimizer\u002Fevals\u002Fprompts\u002Fmemory-data-missing-blocked.md",{"path":109,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":110,"sourceHtmlUrl":111},"evals\u002Fprompts\u002Foverprovisioned-downsize-graviton.md",1136,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fec2-rightsizing-optimizer\u002Fevals\u002Fprompts\u002Foverprovisioned-downsize-graviton.md",{"path":113,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":114,"sourceHtmlUrl":115},"evals\u002Fprompts\u002Ft-family-credit-exhaustion.md",997,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fec2-rightsizing-optimizer\u002Fevals\u002Fprompts\u002Ft-family-credit-exhaustion.md",{"path":117,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":118,"sourceHtmlUrl":119},"evals\u002Fprompts\u002Funderprovisioned-upsize-memory.md",1030,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fec2-rightsizing-optimizer\u002Fevals\u002Fprompts\u002Funderprovisioned-upsize-memory.md",{"path":121,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":122,"sourceHtmlUrl":123},"examples\u002FREADME.md",8186,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fec2-rightsizing-optimizer\u002Fexamples\u002FREADME.md",{"path":125,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":126,"sourceHtmlUrl":127},"references\u002Fadvanced-patterns.md",17556,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fec2-rightsizing-optimizer\u002Freferences\u002Fadvanced-patterns.md",{"path":129,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":130,"sourceHtmlUrl":131},"references\u002Fdiagnostic-commands.md",5090,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fec2-rightsizing-optimizer\u002Freferences\u002Fdiagnostic-commands.md",{"path":133,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":134,"sourceHtmlUrl":135},"references\u002Ferror-handling.md",6829,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fec2-rightsizing-optimizer\u002Freferences\u002Ferror-handling.md",{"path":137,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":138,"sourceHtmlUrl":139},"references\u002Finstance-selection-reference.md",16715,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fec2-rightsizing-optimizer\u002Freferences\u002Finstance-selection-reference.md",{"path":141,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":142,"sourceHtmlUrl":143},"references\u002Fworked-examples.md",3400,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fec2-rightsizing-optimizer\u002Freferences\u002Fworked-examples.md",{"path":145,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":146,"sourceHtmlUrl":147},"skill.usf.yaml",4670,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fec2-rightsizing-optimizer\u002Fskill.usf.yaml",[149,156,163,170,177,184],{"skillNo":150,"name":151,"nameZh":6,"description":152,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":153,"categories":154,"keywords":155,"publishedAt":19},"01M7ADVD60X4PCAPKSE58P9NDC","xray-tracing-deployer","Deploys AWS X-Ray distributed tracing with production-grade configuration: X-Ray daemon deployment (EC2 systemd, ECS sidecar, EKS DaemonSet, Lambda built-in), SDK instrumentation (Java, Python, Node.js, Go, .NET) with annotations and metadata, sampling rules (default reservoir + rate vs custom rules with URL \u002F method \u002F service-name predicates), service map generation, trace query and retrieval, groups and insights, CloudWatch ServiceLens integration, IAM permissions (PutTraceSegments, GetSamplingRules), and latest features (Lambda Powertools tracing, OpenTelemetry \u002F ADOT Collector support, W3C trace context). Emits a READY_TO_DEPLOY checklist with every configuration item verified. Use when enabling X-Ray on a new application, adding tracing to ECS \u002F EKS \u002F Lambda, validating a sampling configuration, or generating daemon deployment CLI and IaC templates. Triggers: X-Ray, distributed tracing, X-Ray daemon, sampling rules, service map, X-Ray SDK, OpenTelemetry, ADOT, Lambda Powertools, CloudWatch ServiceLens.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxray-tracing-deployer\u002FSKILL.md",[],[],{"skillNo":157,"name":158,"nameZh":6,"description":159,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":160,"categories":161,"keywords":162,"publishedAt":19},"01M7ADTVJ7DCBM9CB1FY51GH7J","wellarchitected-workload-auditor","Audits AWS Well-Architected Tool workloads for review staleness, per-pillar high-risk issue counts, milestone tracking gaps, and remediation plan completeness. Emits a deterministic verdict (STALE_REVIEW | HIGH_RISK | CONFIG_GAP | OK) per workload with per-pillar risk breakdown, milestone trend analysis, and specific remediation. Use when reviewing Well-Architected workloads, checking WA review freshness, auditing high-risk issues per pillar, validating milestone coverage, or tracking remediation plans.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwellarchitected-workload-auditor\u002FSKILL.md",[],[],{"skillNo":164,"name":165,"nameZh":6,"description":166,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":167,"categories":168,"keywords":169,"publishedAt":19},"01M7ADT59G6FTTNZYHT2QRPNNP","wellarchitected-review-operator","Operates AWS Well-Architected Tool reviews end-to-end — creates workloads, runs pillar reviews (operational excellence, security, reliability, performance, cost optimization, sustainability, Prosperity), answers questions with risk-tier rationale, generates reports and improvement plans, creates milestones, and integrates with Trusted Advisor and Well-Architected Labs. Runs deterministic pre-checks (workload existence, lens availability, pillar coverage), emits the exact update-answer \u002F get-consolidated-report CLI behind a CONFIRM gate, and verifies risk-tier transitions. Emits READY | BLOCKED | COMPLETED. Use when creating a workload, answering pillar questions, generating an improvement plan, creating a milestone, or integrating with Trusted Advisor. Triggers: well-architected tool, well architected review, workload review, pillar, operational excellence, security, reliability, performance, cost optimization, sustainability, prosperity, improvement plan, milestone, trusted advisor.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwellarchitected-review-operator\u002FSKILL.md",[],[],{"skillNo":171,"name":172,"nameZh":6,"description":173,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":174,"categories":175,"keywords":176,"publishedAt":19},"01M7ADSH5JA9QHNPPHQCD7EVA7","wafv2-web-acl-deployer","Provisions AWS WAFv2 Web ACLs with correct production defaults: scope selection (CLOUDFRONT vs REGIONAL), managed rule groups (AWSManagedRulesCommonRuleSet, SQLiRuleSet, LinuxRuleSet, WindowsRuleSet, IPReputationList, BotControlRuleSet, AmazonIpReputationList, ATP), custom rules (byte match, IP set, regex pattern, geo match, size constraint, rate-based), rule priority ordering, logging destinations (Kinesis Firehose, CloudWatch Logs, S3), resource association (ALB, API Gateway, CloudFront), rate-based rules with aggregate keys (IP, forwarded IP), Challenge and CAPTCHA actions, and account takeover prevention. Emits a READY_TO_DEPLOY checklist. Use when creating a Web ACL, attaching managed rules, configuring rate limiting, enabling WAF logging, associating a Web ACL with an ALB\u002FAPI Gateway\u002FCloudFront, or configuring CAPTCHA\u002FChallenge actions. Triggers: create WAF Web ACL, WAFv2, managed rule groups, WAF rate limiting, WAF logging, WAF CAPTCHA, WAF Challenge action, bot control, ATP managed rules.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwafv2-web-acl-deployer\u002FSKILL.md",[],[],{"skillNo":178,"name":179,"nameZh":6,"description":180,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":181,"categories":182,"keywords":183,"publishedAt":19},"01M7ADRYFAT8R73FBNCHRC573X","wafv2-web-acl-auditor","Audits AWS WAFv2 Web ACL configurations to determine whether the ACL provides effective protection: default-action posture (Allow vs Block), managed-rule-group coverage gaps, rule effectiveness (BLOCK vs COUNT, shadow\u002Fbypass rules, stale exclusions), rate-based rule correctness, logging and visibility configuration, and text-transformation bypass vectors. Emits a deterministic verdict per Web ACL. Use when reviewing a WAFv2 Web ACL for security posture, checking managed-rule coverage, validating rate-limit configuration, auditing WAF logging, or hardening a WAF before production deployment. Triggers: WAF, WAFv2, Web ACL, managed rule group, AWSManagedRules, rate-based rule, CAPTCHA, Challenge, OverrideAction, Count mode, forwarded IP, Bot Control, ATP, text transformation, WAF logging, WAF visibility, OWASP, SQLi, XSS, RFI.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwafv2-web-acl-auditor\u002FSKILL.md",[],[],{"skillNo":185,"name":186,"nameZh":6,"description":187,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":188,"categories":189,"keywords":190,"publishedAt":19},"01M7ADR8W7G72JX4KFGN03QK8Q","waf-rule-deployer","Provisions AWS WAFv2 rule sets with production defaults: Web ACL creation (CloudFront scope in us-east-1 vs Regional scope), rule groups (managed vs custom) with capacity planning in WCU (Web ACL Capacity Units, 1500 default per ACL), managed rule groups (AWSManagedRulesCommonRuleSet, AWSManagedRulesSQLiRuleSet, AWSManagedRulesAmazonIpReputationList, AWSManagedRulesLinuxRuleSet, AWSManagedRulesWindowsRuleSet, AWSManagedRulesUnixRuleSet), custom rules (byte-match, regex pattern set, geo-match, rate-based), IP set and regex pattern set resources, rule priority ordering (lowest number evaluated first), action types (allow, block, count, CAPTCHA, Challenge), bot control managed rule group, account takeover. Triggers: create WAF rule, WAF managed rule group, WAF custom rule, WAF byte match, WAF geo match, WAF rate based rule, WAF IP set, WAF regex pattern set, WAF WCU budget, WAF CloudFront ACL, WAF logging Kinesis Firehose, WAF bot control, WAF ATP, WAF label matching, WAF Challenge action, WAF CAPTCHA.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwaf-rule-deployer\u002FSKILL.md",[],[]]