azure-cost-optimization

Analyzes Azure subscriptions to identify cost savings through orphaned resource cleanup and rightsizing recommendations.

Updated May 12, 2026
One-click install
npx skills add https://github.com/sohamda/apex-try-out-demo-repo --skill azure-cost-optimization-sohamda
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: azure-cost-optimization
Source: https://github.com/sohamda/apex-try-out-demo-repo/tree/main/.github/skills/azure-cost-optimization
Command: npx skills add https://github.com/sohamda/apex-try-out-demo-repo --skill azure-cost-optimization-sohamda

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Azure subscriptions accumulate waste over time: orphaned disks, unattached IPs, oversized VMs, and forgotten test resources silently drain budgets. This Skill performs read-only cost and utilization analysis across subscriptions to surface concrete savings opportunities backed by actual billing data. ## Core Features & Use Cases - Orphaned Resource Discovery: Uses Azure Quick Review (azqr) and Azure Resource Graph KQL queries to find unattached disks, idle NICs, unused public IPs, and empty load balancers. - Data-Grounded Recommendations: Queries the Azure Cost Management API for actual 30-day costs and Azure Monitor for 14-day utilization metrics, validating pricing against official Azure pricing pages. - Redis-Specific Analysis: A dedicated branch for Azure Cache for Redis with prioritized rules (failed caches, Premium-in-dev, oversized Enterprise tiers) and pre-built report templates. - Use Case: Ask to analyze a production subscription and receive a timestamped Markdown report with prioritized savings recommendations, Portal links, safety classifications (Safe/Review/Risky), and a JSON audit trail of every cost query. ## Quick Start Ask the agent to analyze your Azure subscription for cost savings and generate a cost optimization report with rightsizing recommendations.

Frequently Asked Questions about azure-cost-optimization

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find orphaned resources in my Azure subscription?▼

Run Azure Quick Review (azqr) with a filters.yaml targeting the Orphaned and Costs sections, or query Azure Resource Graph with KQL to find unattached disks, unused NICs, and idle public IPs. This Skill automates both approaches and cross-references findings with actual cost data.

How to reduce Azure costs with rightsizing recommendations?▼

Query the Azure Cost Management API for 30 days of actual costs, then pull 14 days of CPU and memory metrics from Azure Monitor. Compare utilization against validated pricing from official Azure pricing pages to recommend smaller SKUs with estimated monthly savings.

What permissions are needed for Azure cost analysis?▼

You need the Cost Management Reader, Monitoring Reader, and Reader roles on the target subscription or resource group. You also need Azure CLI authenticated with the costmanagement and resource-graph extensions, plus azqr installed.

Does this skill delete or modify Azure resources?▼

No. The analysis phase is strictly read-only and never deletes or modifies resources. Recommendations are classified as Safe, Review, or Risky, and any remediation requires separate explicit user approval with dry-run commands and rollback procedures.

Can I optimize Azure Cache for Redis costs specifically?▼

Yes. A dedicated Redis branch analyzes caches by subscription, prefix, or tenant-wide scope, applying rules for failed caches, Premium SKUs in dev environments, and unused Enterprise tiers. It generates subscription-level summaries and detailed per-cache analysis reports.

Why do Azure cost queries fail with az costmanagement?▼

The az costmanagement query command is unreliable for complex queries. Use az rest with a JSON body against the Cost Management query API (api-version 2023-11-01) instead, which this Skill does by default for consistent results.