Identify and quantify cost savings across Azure subscriptions by analyzing actual costs, utilization metrics, and generating actionable optimization recommendations. USE FOR: optimize Azure costs, reduce Azure spending, reduce Azure expenses, analyze Azure costs, find cost savings, generate cost optimization report, find orphaned resources, rightsize VMs, cost analysis, reduce waste, Azure spending analysis, find unused resources, optimize Redis costs. DO NOT USE FOR: deploying resources (use azure-deploy), general Azure diagnostics (use azure-diagnostics), security issues (use azure-security)
83
78%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Passed
No known issues
Optimize this skill with Tessl
npx tessl skill review --optimize ./.github/skills/azure-cost-optimization/SKILL.mdAnalyze Azure subscriptions to identify cost savings through orphaned resource cleanup, rightsizing, and optimization recommendations based on actual usage data.
Use this skill when the user asks to:
Follow these steps in conversation with the user:
Before starting, verify these tools and permissions are available:
Required Tools:
az login)costmanagement, resource-graphRequired Permissions:
Verification commands:
az --version
az account show
az extension show --name costmanagement
azqr versionGet Azure cost optimization best practices to inform recommendations:
// Use Azure MCP best practices tool
mcp_azure_mcp_get_azure_bestpractices({
intent: "Get cost optimization best practices",
command: "get_bestpractices",
parameters: { resource: "cost-optimization", action: "all" },
});If the user specifically requests Redis cost optimization, use the specialized Redis skill:
📋 Reference: Azure Redis Cost Optimization
When to use Redis-specific analysis:
Key capabilities:
redis_list commandReport templates available:
Note: For general subscription-wide cost optimization (including Redis), continue with Step 2. For Redis-only focused analysis, follow the instructions in the Redis-specific reference document.
If performing Redis cost optimization, ask the user to select their analysis scope:
Prompt the user with these options:
Wait for user response before proceeding to Step 2.
Run azqr to find orphaned resources (immediate cost savings):
📋 Reference: Azure Quick Review - Detailed instructions for running azqr scans
// Use Azure MCP extension_azqr tool
extension_azqr({
subscription: "<SUBSCRIPTION_ID>",
"resource-group": "<RESOURCE_GROUP>", // optional
});What to look for in azqr results:
Note: The Azure Quick Review reference document includes instructions for creating filter configurations, saving output to the
output/folder, and interpreting results for cost optimization.
For efficient cross-subscription resource discovery, use Azure Resource Graph. See Azure Resource Graph Queries for orphaned resource detection and cost optimization patterns.
List all resources in the subscription using Azure MCP tools or CLI:
# Get subscription info
az account show
# List all resources
az resource list --subscription "<SUBSCRIPTION_ID>" --resource-group "<RESOURCE_GROUP>"
# Use MCP tools for specific services (preferred):
# - Storage accounts, Cosmos DB, Key Vaults: use Azure MCP tools
# - Redis caches: use mcp_azure_mcp_redis tool (see ./references/azure-redis.md)
# - Web apps, VMs, SQL: use az CLI commands📋 Reference: Read references/detailed-workflow-steps.md for cost query execution, pricing validation, metrics collection, report generation, audit trail, and cleanup procedures.
The skill generates:
Cost Optimization Report (output/costoptimizereport<timestamp>.md)
Cost Query Results (output/cost-query-result<timestamp>.json)
📋 Reference: Read references/best-practices-notes.md for data classification labels, best practices, common pitfalls, and safety requirements.
Load these on demand — do NOT read all at once:
| Reference | When to Load |
|---|---|
references/auth-best-practices.md | Auth Best Practices |
references/azure-quick-review.md | Azure Quick Review |
references/azure-redis.md | Azure Redis |
references/azure-resource-graph.md | Azure Resource Graph |
references/detailed-workflow-steps.md | Steps 4-9: cost queries, pricing, metrics, report, audit, cleanup |
references/best-practices-notes.md | Data classification, best practices, pitfalls, safety |
ec7b8ff
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.