az-cost-optimize
🤖 AI Summary
This AI agent analyzes Azure IaC files and resources to identify cost optimization opportunities, then automatically creates individual GitHub issues for each recommendation plus a coordinating EPIC issue to track implementation.
How to Install
Claude Code:
git clone --depth 1 https://github.com/github/awesome-copilot.git && cp awesome-copilot/skills/az-cost-optimize ~/.claude/skills/az-cost-optimize -r# 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 ` to find resource groups
- Get a list of all resources in the relevant group(s):
- Use `az resource list --subscription --resource-group `
- For each resource type, use MCP tools first if possible, then CLI fallback:
- `azmcp-cosmos-account-list --subscription ` - Cosmos DB accounts
- `azmcp-storage-account-list --subscription ` - Storage accounts
- `azmcp-monitor-workspace-list --subscription ` - 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
Details
| Category | Data → data_proc |
| Source | github/awesome-copilot |
| SKILL.md | View on GitHub → |
| Repo Stars | ★ 35.6K |
| Est. per Skill | 712 (shared across 50 skills from this repo) |
| Difficulty | Intermediate |
| Risk Level | N/A |
Related Skills
monte-carlo-prevent
Monte Carlo Prevent Skill This skill brings Monte Carlo's data observability context directly into y
postgresql-optimization
PostgreSQL Optimization Workflow Overview Specialized workflow for PostgreSQL database optimization
fp-data-transforms
Practical Data Transformations This skill covers the data transformations you do every day: working
mathguard
mathguard — Math-Heavy Optimization for AI Code lemmaly makes you pick the right classical algorithm
Works Well With
Skills from the same repository — often designed to work together
acquire-codebase-knowledge
Acquire Codebase Knowledge Produces seven populated documents in docs/codebase/ covering everything
acreadiness-assess
/acreadiness-assess — AI-readiness assessment Use this skill whenever the user asks for an AI-readin
acreadiness-generate-instructions
/acreadiness-generate-instructions — write AI agent instructions Use this skill whenever the user wa