Cost Optimization
MicrosoftOfficialCreated by Microsoft
- Skill
- Research and analysis
- Cloud and DevOps
- MIT
- No issues found
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
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/microsoft/cost-optimization/downloadUnzip 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
| Intent | Workflow | Primary tools |
|---|---|---|
| Reduce waste or rightsize | Optimization | Cost and Resource Graph tools |
| Review commitments | Commitments | list_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
Confirm scope, period, currency, and commitment intent.
Load only the matching workflow above.
Never transform MCP results in a shell or interpreter; request validated server-side projection, aggregation, or bounded follow-up queries.
Separate measured cost, reported savings, and qualitative opportunities.
Recommend changes only; do not delete, resize, purchase, or deploy resources.
Error Handling
| Error | Action |
|---|---|
| Access denied | Name the scope and permission. |
| Multiple currencies | Group and report each currency separately. |
| Missing evidence | State the gap; do not invent values. |
| Server error | Retry once; then report the trace ID. |
Files
- ATTRIBUTION.mdAdded by AutoGineer977 B
- LICENSELicence file added by AutoGineer1.1 KiB
- SKILL.md1.9 KiB
- references/commitments.md2.9 KiB
- references/optimization.md3.0 KiB
- references/report-template.md1.7 KiB
- references/resource-graph.md3.3 KiB
- references/services/redis.md2.1 KiB
- references/services/storage-lifecycle.md1.7 KiB
- references/services/storage.md3.8 KiB
- references/tool-fallback.md1.4 KiB
references/services/storage.md
Azure Storage Cost Optimization
Reference guide for identifying cost savings opportunities in Azure Storage accounts through tier analysis, lifecycle policies, and orphaned resource detection.
Scope
Resolve subscription names to subscription scope paths. For cross-subscription requests, process no more than ten accessible subscriptions per batch. Tenant IDs are not Cost Management scopes.
Resource Graph workflow
Query
AdvisorResourcesfor Cost recommendations whose resource ID belongs to a storage account or managed disk.Query
Resourcesfor matching configuration such as SKU, redundancy, kind, access tier, location, attachment state, management-policy presence when exposed, and ownership tags.Join recommendations to inventory by resource ID. Preserve the Advisor recommendation text, impact, savings fields, currency, and period.
Use access, capacity, and transaction metrics only when an Azure Resource Manager MCP (ARM MCP) operation returns them for the same resource and period.
An unattached disk, missing policy, SKU, redundancy choice, or resource tag is an inventory fact, not proof of waste. Do not classify storage as idle, underutilized, or safe to tier, resize, or delete without an authoritative recommendation or matching observed usage evidence.
Quantify opportunities with actual usage, current cost, and live prices. Do not use generic savings ranges.
When Advisor or observed access evidence supports tiering analysis, load Lifecycle guidance.
Resource Graph Queries
Find storage accounts without lifecycle policies:
Lifecycle policy contents are not queryable through Resource Graph. Use the applicable ARM MCP storage operation. If unavailable, use the Storage Resource Provider API through the fallback process.
Find Premium storage accounts in non-production:
Resources
| where type =~ 'microsoft.storage/storageaccounts'
| where sku.name contains 'Premium'
| where tags.environment in~ ('dev', 'test', 'staging', 'sandbox')
| project name, resourceGroup, sku=sku.name, tagsFind GRS/GZRS accounts in dev/test (redundancy downgrade candidates):
Resources
| where type =~ 'microsoft.storage/storageaccounts'
| where sku.name contains 'GRS' or sku.name contains 'GZRS'
| where tags.environment in~ ('dev', 'test', 'staging')
| project name, resourceGroup, sku=sku.name, location, tagsFind classic (v1) storage accounts:
Resources
| where type =~ 'microsoft.storage/storageaccounts'
| where kind =~ 'Storage'
| project name, resourceGroup, location, kindFind orphaned managed disks (unattached):
Resources
| where type =~ 'microsoft.compute/disks'
| where isempty(managedBy)
| project name, resourceGroup, location, diskSizeGb=properties.diskSizeGB, sku=sku.nameReport Templates
Subscription-Level Summary
Include: subscription name/ID, total monthly storage cost, account count by SKU/tier, total data stored (TB), top issues found.
Detailed Storage Account Analysis
Include: account name, resource group, SKU/redundancy, kind, monthly cost, capacity (GB), access tier distribution (%), lifecycle policy status, and optimization recommendations.
ARM MCP Tools
Use Azure Resource Graph (ARG) operations for inventory and configuration. Use ARM MCP storage operations for management policies and access tracking, and ARM MCP monitoring operations for capacity and transaction metrics. Use the Storage Resource Provider or Azure Monitor API fallback when needed, and report an evidence gap if neither source returns the required data.
Pricing
Use get_retail_prices for the requested region, redundancy, tier, and
currency. Include storage, transaction, retrieval, early-deletion, and
rehydration costs when relevant; never rely on embedded rates.
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.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download cost-optimization.zip