az-cost-optimize

Analyzes Azure infrastructure and IaC to generate cost optimization recommendations tracked as GitHub issues.

Updated Sep 10, 2026
One-click install
npx skills add https://github.com/serpro-workshop-fortaleza/sifap-modernization-paula --skill az-cost-optimize-serpro-workshop-fortaleza
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: az-cost-optimize
Source: https://github.com/serpro-workshop-fortaleza/sifap-modernization-paula/tree/main/.github/skills/az-cost-optimize
Command: npx skills add https://github.com/serpro-workshop-fortaleza/sifap-modernization-paula --skill az-cost-optimize-serpro-workshop-fortaleza

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Cloud bills grow silently when Azure resources are oversized, idle, or misconfigured, and teams lack a systematic way to find savings and track remediation work. This Skill audits deployed Azure resources and Terraform/Bicep files, produces evidence-based savings recommendations, and converts each opportunity into a trackable GitHub issue under a coordination epic. ## Core Features & Use Cases - Infrastructure discovery and analysis: Inventories subscriptions, resource groups, and resources via Azure MCP tools, cross-referencing Terraform (.tf) files as the source of truth. - Usage-based recommendations: Queries Log Analytics metrics (CPU, memory, RU/s, storage access) to justify right-sizing, tier changes, lifecycle policies, and removal of unused resources, each with a priority score. - GitHub work tracking: After explicit user confirmation, creates one labeled issue per opportunity plus a coordination epic with Mermaid architecture diagrams and progress tracking. - Use Case: Ask it to reduce spending on a resource group; it analyzes the App Service plan, Cosmos DB, and storage accounts, validates current costs against Azure pricing, and opens prioritized issues such as downgrading an S3 plan to B2 with estimated monthly savings. ## Quick Start Ask the assistant to analyze the Azure resources in my subscription for cost optimization opportunities and create GitHub issues for the approved savings.

Frequently Asked Questions about az-cost-optimize

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

FAQPage Schema
How do I reduce Azure costs for an existing workload?

Run an analysis that inventories your Azure resources, compares them against Terraform definitions, and queries usage metrics from Log Analytics. The result is a prioritized list of recommendations such as right-sizing SKUs, storage lifecycle policies, and removing unused resources, each with estimated monthly savings.

How to track Azure cost optimization work in GitHub?

Each approved optimization opportunity becomes an individual GitHub issue labeled cost-optimization and azure, with implementation steps, evidence, and validation checklists. A coordination epic aggregates all issues, total potential savings, and progress tracking with a Mermaid architecture diagram.

Does Azure cost analysis work with Terraform files?

Yes, Terraform .tf files are treated as the primary source of truth for resource configuration. Bicep and ARM template JSON files are also detected, and if no IaC files exist the analysis stops and reports the limitation rather than guessing.

What permissions are needed to analyze Azure resource usage?

You need an authenticated Azure MCP server with read access to subscriptions, resource groups, and Monitor workspaces, plus a GitHub MCP server or gh CLI for issue creation. Usage metrics come from Log Analytics tables queried with KQL.

When are GitHub issues created during cost analysis?

Issues are created only after you explicitly confirm the presented summary of recommendations. A negative, ambiguous, or missing response causes the recommendations to be printed to the console instead, with no changes made to the repository.