
Az Cost Optimize
Scan Azure IaC and live resources in a resource group, apply cost best practices, and open trackable GitHub issues (plus an EPIC) so a solo builder can execute cloud savings without a FinOps team.
Overview
Azure Cost Optimize is an agent skill most often used in Operate (also Build integrations, Operate iterate) that analyzes Azure IaC and/or live resources and files cost-saving recommendations as GitHub issues with an EPI
Install
npx skills add https://github.com/github/awesome-copilot --skill az-cost-optimizeWhat is this skill?
- Loads Azure cost optimization best practices via `azmcp-bestpractices-get` before scanning IaC or live resources
- Discovers infrastructure dynamically from IaC files and/or resources in a target resource group
- Creates one GitHub issue per optimization opportunity plus a coordinating EPIC for implementation
- Prefers Azure MCP (`azmcp-*`) tools over raw Azure CLI when connectors are available
- Requires authenticated Azure MCP and GitHub MCP plus a known target repository
- Creates one GitHub issue per optimization plus one EPIC issue to coordinate implementation
Adoption & trust: 8.4k installs on skills.sh; 34.6k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You are paying for Azure every month but lack a prioritized, trackable list of concrete optimizations tied to your actual IaC and resource groups.
Who is it for?
Solo builders with Azure MCP and GitHub MCP wired up, a target repo for issues, and either IaC in the project or resources in a defined resource group.
Skip if: Greenfield projects with no Azure deployment yet, teams without GitHub issue workflow, or anyone who cannot authenticate Azure MCP against the subscription they want analyzed.
When should I use this skill?
You need to analyze Azure resources used in the app (IaC and/or a target resource group) and turn cost optimizations into trackable GitHub work items.
What do I get? / Deliverables
You get MCP-informed optimization findings broken into GitHub issues and an EPIC so you can implement savings incrementally without losing context.
- Per-optimization GitHub issues with actionable recommendations
- EPIC GitHub issue coordinating implementation
- Analysis informed by Azure MCP best-practices retrieval
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Canonical shelf is Operate because the workflow assumes deployed Azure workloads and targets ongoing spend—right-sizing, tier changes, and waste removal in production and shared environments. Infra is the best subphase fit: recommendations tie to resource groups, IaC definitions, and platform configuration rather than incident response or pure observability tuning.
Where it fits
Before adding a second region, scan IaC for oversized SKUs and open issues to right-size App Service and SQL tiers.
After first production deploy, run a pass on the target resource group so launch traffic does not run on dev-sized resources.
Monthly spend review: discover live resources, map to best practices, and queue savings work as labeled GitHub issues.
When unit economics tighten, use the EPIC to batch storage lifecycle and idle compute fixes without losing prioritization.
How it compares
Use instead of one-off “review my Azure bill” chat threads that never become actionable tickets.
Common Questions / FAQ
Who is az-cost-optimize for?
Indie and solo builders who deploy on Azure, use MCP-enabled agents, and want cost work tracked as GitHub issues rather than spreadsheet notes.
When should I use az-cost-optimize?
In Operate when monthly spend hurts and you need infra-level recommendations; in Build when you are tightening IaC before scale; and in Operate iterate when you revisit architecture after a growth spike.
Is az-cost-optimize safe to install?
It expects Azure and GitHub MCP access to read infrastructure and create issues—review permissions and the Security Audits panel on this Prism page before enabling it in production subscriptions.
SKILL.md
READMESKILL.md - Az Cost Optimize
# Azure Cost Optimize This workflow analyzes Infrastructure-as-Code (IaC) files and Azure resources to generate cost optimization recommendations. It creates individual GitHub issues for each optimization opportunity plus one EPIC issue to coordinate implementation, enabling efficient tracking and execution of cost savings initiatives. ## Prerequisites - Azure MCP server configured and authenticated - GitHub MCP server configured and authenticated - Target GitHub repository identified - Azure resources deployed (IaC files optional but helpful) - Prefer Azure MCP tools (`azmcp-*`) over direct Azure CLI when available ## Workflow Steps ### Step 1: Get Azure Best Practices **Action**: Retrieve cost optimization best practices before analysis **Tools**: Azure MCP best practices tool **Process**: 1. **Load Best Practices**: - Execute `azmcp-bestpractices-get` to get some of the latest Azure optimization guidelines. This may not cover all scenarios but provides a foundation. - Use these practices to inform subsequent analysis and recommendations as much as possible - Reference best practices in optimization recommendations, either from the MCP tool output or general Azure documentation ### Step 2: Discover Azure Infrastructure **Action**: Dynamically discover and analyze Azure resources and configurations **Tools**: Azure MCP tools + Azure CLI fallback + Local file system access **Process**: 1. **Resource Discovery**: - Execute `azmcp-subscription-list` to find available subscriptions - Execute `azmcp-group-list --subscription <subscription-id>` to find resource groups - Get a list of all resources in the relevant group(s): - Use `az resource list --subscription <id> --resource-group <name>` - For each resource type, use MCP tools first if possible, then CLI fallback: - `azmcp-cosmos-account-list --subscription <id>` - Cosmos DB accounts - `azmcp-storage-account-list --subscription <id>` - Storage accounts - `azmcp-monitor-workspace-list --subscription <id>` - Log Analytics workspaces - `azmcp-keyvault-key-list` - Key Vaults - `az webapp list` - Web Apps (fallback - no MCP tool available) - `az appservice plan list` - App Service Plans (fallback) - `az functionapp list` - Function Apps (fallback) - `az sql server list` - SQL Servers (fallback) - `az redis list` - Redis Cache (fallback) - ... and so on for other resource types 2. **IaC Detection**: - Use `file_search` to scan for IaC files: "**/*.bicep", "**/*.tf", "**/main.json", "**/*template*.json" - Parse resource definitions to understand intended configurations - Compare against discovered resources to identify discrepancies - Note presence of IaC files for implementation recommendations later on - Do NOT use any other file from the repository, only IaC files. Using other files is NOT allowed as it is not a source of truth. - If you do not find IaC files, then STOP and report no IaC files found to the user. 3. **Configuration Analysis**: - Extract current SKUs, tiers, and settings for each resource - Identify resource relationships and dependencies - Map resource utilization patterns where available ### Step 3: Collect Usage Metrics & Validate Current Costs **Action**: Gather utilization data AND verify actual resource costs **Tools**: Azure MCP monitoring tools + Azure CLI **Process**: 1. **Find Monitoring Sources**: - Use `azmcp-monitor-workspace-list --subscription <id>` to find Log Analytics workspaces - Use `azmcp-monitor-table-list --subscription <id> --workspace <name> --table-type "CustomLog"` to discover available data 2. **Execute Usage Queries**: - Use `azmcp-monitor-log-query` with these predefined queries: - Query: "recent" for recent a