Generated banner for Cost Optimization
Generated logo for Cost Optimization

Cost Optimization

MicrosoftOfficialCreated by Microsoft

  • Skill
  • Research and analysis
  • Cloud and DevOps
  • MIT
  • No issues found

From the author

Optimize existing Azure resources and analyze Reservations or Savings Plans. WHEN: "optimize Azure costs", "reduce cloud spending", "rightsize resources", "find idle resources", "orphaned disk", "deleted VM still charged", "public IP still charging", "reservation utilization", "Savings Plan coverage", "commitment recommendation", "why is pay-as-you-go still charged". DO NOT USE FOR: cost spikes, forecasts, pricing estimates, budgets, or governance.
— the description by Microsoft

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

The cost-optimization skill provides a systematic approach to reducing Azure cloud spending. It focuses on two primary areas: identifying waste through resource rightsizing and evaluating the efficiency of existing Reservations and Savings Plans. The skill emphasizes data-driven analysis using Azure Resource Graph and cost management tools, requiring users to validate findings before taking action. It strictly prohibits automated resource modifications, ensuring that all recommendations for resizing, deletion, or commitment changes are presented with clear evidence, feasibility assessments, and potential trade-offs.

What it does

  • Analyzes Azure resource utilization to identify potential cost savings.
  • Evaluates the performance and coverage of existing Reservations and Savings Plans.
  • Provides a structured process for rightsizing resources based on factual inventory and usage data.
  • Distinguishes between utilization, coverage, and savings metrics for financial reporting.
  • Integrates with service-specific guidance for storage and caching resources.
  • Ensures that cost-saving actions do not conflict with existing commitments or reliability requirements.

When to use it

  • When you need to identify and eliminate waste in your Azure environment.
  • When investigating why pay-as-you-go costs are higher than expected.
  • When evaluating whether to purchase, exchange, or adjust Azure Reservations or Savings Plans.
  • When looking for orphaned resources like unattached disks or idle public IPs.
  • When you need to rightsize existing virtual machines or services to match actual demand.

Advantages

  • Promotes safe, evidence-based decision-making by requiring owner confirmation.
  • Prevents double-counting savings between rightsizing actions and commitment benefits.
  • Provides clear separation between measured costs and projected savings.
  • Standardizes the analysis of complex billing scopes and commitment terms.
  • Reduces the risk of accidental resource deletion or service disruption.

Usage examples

“How can I reduce my Azure spending for this month?”
The agent will initiate a cost analysis workflow, querying current resource usage and Advisor recommendations to identify high-impact, feasible savings opportunities.
“Are my Azure Reservations being used effectively?”
The agent will analyze your billing scope to report on reservation utilization and coverage, highlighting underutilized commitments for potential adjustment.

Install

  1. Download the skill as a ZIP:

    https://autogineer.com/agent-skills/microsoft/cost-optimization/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip cost-optimization.zip -d .agents/skills

Documentation by Microsoft

Azure Cost Optimization

Quick Reference

IntentWorkflowPrimary tools
Reduce waste or rightsizeOptimizationCost and Resource Graph tools
Review commitmentsCommitmentslist_benefit_utilization, list_reservation_transactions, get_benefit_recommendations

When to Use This Skill

Use for waste, rightsizing, and commitments.

MCP Tools

Use cost and Resource Graph tools for optimization and benefit tools for commitments. Validate queries. Fallback: API mappings.

Workflow

  1. Confirm scope, period, currency, and commitment intent.

  2. Load only the matching workflow above.

  3. Never transform MCP results in a shell or interpreter; request validated server-side projection, aggregation, or bounded follow-up queries.

  4. Separate measured cost, reported savings, and qualitative opportunities.

  5. Recommend changes only; do not delete, resize, purchase, or deploy resources.

Error Handling

ErrorAction
Access deniedName the scope and permission.
Multiple currenciesGroup and report each currency separately.
Missing evidenceState the gap; do not invent values.
Server errorRetry once; then report the trace ID.

Files

references/commitments.md

Commitment Analysis

Resolve Scope and Terms

  1. Require an accessible billing scope for portfolio utilization. If the user supplies only a subscription, resolve or ask for its billing account and billing profile before calling list_benefit_utilization.

  2. Keep Reservations and Savings Plans separate. Report commitment name, term, scope, region or service constraints, quantity or hourly commitment, utilization period, currency, and expiration when available.

  3. Distinguish:

    • utilization: how much purchased commitment was consumed;

    • coverage: how much eligible usage received commitment pricing;

    • savings: tool-reported benefit for its stated period. High utilization can coexist with low coverage, and low utilization does not prove that a new purchase is needed.

  4. When the target usage includes AKS, check the host skill inventory and invoke aks-cost-optimization for its commitment-demand handoff when available. Reuse its time-aligned SKU or compatible compute group, region and zone, Spot/on-demand capacity type, observed hours and node counts, lookback coverage, exact resource mapping, planned changes, CRG impact, variability, and evidence gaps. If representative compute history is missing, report stable demand as unverified and do not validate an AKS commitment recommendation. Do not install the optional plugin without user consent.

Analyze Current Commitments

  1. Report utilization per commitment. Treat less than 90% as an investigation signal, not an automatic exchange or refund recommendation.

  2. Call query_costs with AmortizedCost, grouped by PricingModel, for the same period. Report committed and eligible on-demand spend per currency. Compare actual and amortized views when a recent purchase distorts cash cost.

  3. For low utilization, inspect list_reservation_transactions over the supported lookback and correlate purchases, refunds, or exchanges with scope, region, family, and resource-inventory changes. Missing history is inconclusive.

Evaluate New Recommendations

  1. Call get_benefit_recommendations. Preserve lookback, term, scope, savings amount and percentage, coverage, and expected utilization. Do not relabel period savings as monthly savings or combine currencies.

  2. Check whether rightsizing, shutdowns, migrations, expiring commitments, or policy restrictions would invalidate the recommendation. Present exchange, scope adjustment, workload alignment, expiration planning, or a new purchase as distinct options with evidence and tradeoffs.

Report and Safety

Present utilization and coverage separately, eligible on-demand spend, current commitment risks, new recommendations, confidence, and the next review date. Never purchase, exchange, or refund without explicit approval.

If a benefit or reservation tool is unavailable, use the API mapped in tool fallback. Preserve its period and scope semantics.

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Security

No issues found by our static scan· No issues found

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Created by
Microsoft
Publisher
Microsoft (Official)
Source
microsoft/skills · .github/plugins/azure-cost/skills/cost-optimization · commit 0696600
Licence
MIT License (redistribution allowed)
  • LICENSE (added by AutoGineer from .github/plugins/azure-cost/LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Microsoft or Microsoft.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download cost-optimization.zip