
Azure Cost Optimization
Analyze Azure subscriptions for orphaned resources, rightsizing opportunities, and cost spikes using Cost Management and azqr data.
Install
npx skills add https://github.com/microsoft/azure-skills --skill azure-cost-optimizationWhat is this skill?
- Requires Cost Management Reader and az costmanagement plus azqr tooling.
- Finds orphaned resources, VM rightsizing, and Redis-specific waste paths.
- Branches to dedicated Redis analysis when the user scopes to cache workloads.
Adoption & trust: 207k installs on skills.sh; 1.2k GitHub stars; 3/3 security scanners passed (skills.sh audits).
Recommended Skills
Azure Deploymicrosoft/azure-skills
Azure Preparemicrosoft/azure-skills
Azure Storagemicrosoft/azure-skills
Azure Validatemicrosoft/azure-skills
Appinsights Instrumentationmicrosoft/azure-skills
Azure Resource Lookupmicrosoft/azure-skills
Journey fit
Common Questions / FAQ
Is Azure Cost Optimization safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Azure Cost Optimization
# Azure Cost Optimization Skill Analyze Azure subscriptions to identify cost savings through orphaned resource cleanup, rightsizing, and optimization recommendations based on actual usage data. ## When to Use This Skill Use this skill when the user asks to: - Optimize Azure costs or reduce spending - Analyze Azure subscription for cost savings - Generate cost optimization report - Find orphaned or unused resources - Rightsize Azure VMs, containers, or services - Identify where they're overspending in Azure - **Optimize Redis costs specifically** - See [Azure Redis Cost Optimization](./references/azure-redis.md) for Redis-specific analysis ## Instructions Follow these steps in conversation with the user: ### Step 0: Validate Prerequisites Before starting, verify these tools and permissions are available: **Required Tools:** - Azure CLI installed and authenticated (`az login`) - Azure CLI extensions: `costmanagement`, `resource-graph` - Azure Quick Review (azqr) installed - See [Azure Quick Review](./references/azure-quick-review.md) for details **Required Permissions:** - Cost Management Reader role - Monitoring Reader role - Reader role on subscription/resource group **Verification commands:** ```powershell az --version az account show az extension show --name costmanagement azqr version ``` ### Step 1: Load Best Practices Get Azure cost optimization best practices to inform recommendations: ```javascript // 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" } }) ``` ### Step 1.5: Redis-Specific Analysis (Conditional) **If the user specifically requests Redis cost optimization**, use the specialized Redis skill: 📋 **Reference**: [Azure Redis Cost Optimization](./references/azure-redis.md) **When to use Redis-specific analysis:** - User mentions "Redis", "Azure Cache for Redis", or "Azure Managed Redis" - Focus is on Redis resource optimization, not general subscription analysis - User wants Redis-specific recommendations (SKU downgrade, failed caches, etc.) **Key capabilities:** - Interactive subscription filtering (prefix, ID, or "all subscriptions") - Redis-specific optimization rules (failed caches, oversized tiers, missing tags) - Pre-built report templates for Redis cost analysis - Uses `redis_list` command **Report templates available:** - [Subscription-level Redis summary](./templates/redis-subscription-level-report.md) - [Detailed Redis cache analysis](./templates/redis-detailed-cache-analysis.md) > **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. ### Step 1.6: Choose Analysis Scope (for Redis-specific analysis) **If performing Redis cost optimization**, ask the user to select their analysis scope: **Prompt the user with these options:** 1. **Specific Subscription ID** - Analyze a single subscription 2. **Subscription Name** - Use display name instead of ID 3. **Subscription Prefix** - Analyze all subscriptions starting with a prefix (e.g., "CacheTeam") 4. **All My Subscriptions** - Scan all accessible subscriptions 5. **Tenant-wide