az-cost-optimize

Analyzes Azure resources and IaC files to generate cost optimization recommendations as GitHub issues.

Updated Mar 25, 2026
One-click install
npx skills add https://github.com/lettucebo/Skills --skill az-cost-optimize-lettucebo
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: az-cost-optimize
Source: https://github.com/lettucebo/Skills/tree/main/skills/azure/az-cost-optimize
Command: npx skills add https://github.com/lettucebo/Skills --skill az-cost-optimize-lettucebo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Azure environments often accumulate oversized SKUs, idle resources, and misconfigured tiers that inflate monthly bills, and identifying these savings manually across subscriptions is slow and error-prone. ## Core Features & Use Cases - Resource Discovery: Enumerates subscriptions, resource groups, and resources via Azure MCP tools with Azure CLI fallbacks, and detects Bicep, Terraform, and ARM template files. - Usage & Cost Validation: Queries Log Analytics workspaces for utilization metrics and validates current SKU costs against Azure pricing before recommending changes. - Prioritized Recommendations: Scores each optimization by savings, risk, and implementation effort, then creates individual GitHub issues plus a coordinating EPIC issue with an architecture diagram. - Use Case: Point the agent at a resource group running App Services, Cosmos DB, and Storage accounts; it analyzes usage, proposes right-sizing and tier changes, and files trackable GitHub issues after your confirmation. ## Quick Start Ask the agent to analyze the Azure resources in my resource group for cost optimization opportunities and create GitHub issues for each recommendation.

Frequently Asked Questions about az-cost-optimize

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

FAQPage Schema
How do I analyze Azure resources for cost optimization?▼

Run this workflow with Azure MCP and GitHub MCP servers configured. It discovers resources in your subscriptions and resource groups, collects usage metrics from Log Analytics, validates current SKU costs, and produces prioritized savings recommendations.

How does the skill create GitHub issues for Azure cost savings?▼

After you confirm the optimization summary, it creates one GitHub issue per recommendation using a structured template with implementation commands, evidence, and validation steps, plus one EPIC issue with a mermaid architecture diagram to coordinate all work.

Does it work with Bicep and Terraform IaC files?▼

Yes. It scans the repository for Bicep, Terraform, and ARM template files to understand intended configurations and tailors implementation steps to modify IaC rather than running direct CLI changes. If no IaC files are found, it stops and reports that.

What prerequisites are required to run Azure cost optimization analysis?▼

You need an authenticated Azure MCP server, an authenticated GitHub MCP server, a target GitHub repository, and deployed Azure resources. The workflow prefers Azure MCP tools and falls back to Azure CLI commands when no MCP tool exists for a resource type.

How are Azure cost optimization recommendations prioritized?▼

Each recommendation receives a priority score calculated from value, monthly savings, risk, and implementation days. Scores above 20 are high priority, 5-20 are medium, and below 5 are low, enabling ROI-focused implementation ordering.