az-cost-optimize
Analyze Azure resources used in the app (IaC files and/or resources in a target rg) and optimize costs - creating GitHub issues for identified optimizations.
Skill by HenriqueOliveiraFiap
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/henriqueoliveirafiap-az-cost-optimize
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: cloud
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill name
az-cost-optimize- Description
- Analyze Azure resources used in the app (IaC files and/or resources in a target rg) and optimize costs - creating GitHub issues for identified optimizations.
- License
- MIT
- Instructions
- 302 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# 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 activity patterns
- Query: "errors" for error-level logs indicating issues
- For custom analysis, use KQL queries:
```kql
// CPU utilization for App Services
AppServiceAppLogs
| where TimeGenerated > ago(7d)
| summarize avg(CpuTime) by Resource, bin(TimeGenerated, 1h)
// Cosmos DB RU consumption
AzureDiagnostics
| where ResourceProvider == "MICROSOFT.DOCUMENTDB"
| where TimeGenerated > ago(7d)
| summarize avg(RequestCharge) by Resource
// Storage account access patterns
StorageBlobLogs
| where TimeGenerated > ago(7d)
| summarize RequestCount=count() by AccountName, bin(TimeGenerated, 1d)
```
3. **Calculate Baseline Metrics**:
- CPU/Memory utilization averages
- Database throughput patterns
- Storage access frequency
- Function execution rates
4. **VALIDATE CURRENT COSTS**:
- Using the SKU/tier configurations discovered in Step 2
- Look up current Azure pricing at https://azure.microsoft.com/pricing/ or use `az billing` commands
- Document: Resource → Current SKU → Estimated monthly cost
- Calculate realistic current monthly total before proceeding to recommendations
### Step 4: Generate Cost Optimization Recommendations
**Action**: Analyze resources to identify optimization opportunities
**Tools**: Local analysis using collected data
**Process**:
1. **Apply Optimization Patterns** based on resource types found:
**Compute Optimizations**:
- App Service Plans: Right-size based on CPU/memory usage
- Function Apps: Premium → Consumption plan for low usage
- Virtual Machines: Scale down oversized instances
**Database Optimizations**:
- Cosmos DB:
- Provisioned → Serverless for variable workloads
- Right-size RU/s based on actual usage
- SQL Database: Right-size service tiers based on DTU usage
**Storage Optimizations**:
- Implement lifecycle policies (Hot → Cool → Archive)
- Consolidate redundant storage accountsFrom HenriqueOliveiraFiap/awesome-copilot, MIT.
More from HenriqueOliveiraFiap/awesome-copilot
- 0.414score
arize-annotation
HenriqueOliveiraFiap
INVOKE THIS SKILL when creating, managing, or using annotation configs on Arize (categorical, continuous, freeform), or applying human annotations to project…
SkillDFreshness: DClaude Code +9 - 0.414score
arize-instrumentation
HenriqueOliveiraFiap
INVOKE THIS SKILL when adding Arize AX tracing to an application.
SkillDFreshness: DClaude Code +9 - 0.414score
arize-link
HenriqueOliveiraFiap
Generate deep links to the Arize UI.
SkillDFreshness: DClaude Code +9 - 0.414score
arize-ai-provider-integration
HenriqueOliveiraFiap
INVOKE THIS SKILL when creating, reading, updating, or deleting Arize AI integrations.
SkillDFreshness: DClaude Code +9 - 0.411score
arize-experiment
HenriqueOliveiraFiap
INVOKE THIS SKILL when creating, running, or analyzing Arize experiments.
SkillDFreshness: DClaude Code +9 - 0.411score
arize-prompt-optimization
HenriqueOliveiraFiap
INVOKE THIS SKILL when optimizing, improving, or debugging LLM prompts using production trace data, evaluations, and annotations.
SkillDFreshness: DClaude Code +9 - 0.411score
arize-trace
HenriqueOliveiraFiap
INVOKE THIS SKILL when downloading or exporting Arize traces and spans.
SkillDFreshness: DClaude Code +9 - 0.411score
arize-dataset
HenriqueOliveiraFiap
INVOKE THIS SKILL when creating, managing, or querying Arize datasets and examples.
SkillDFreshness: DClaude Code +9 - 0.409score
import-infrastructure-as-code
HenriqueOliveiraFiap
Import existing Azure resources into Terraform using Azure CLI discovery and Azure Verified Modules (AVM).
SkillDFreshness: DClaude Code +9 - 0.406score
azure-resource-health-diagnose
HenriqueOliveiraFiap
Analyze Azure resource health, diagnose issues from logs and telemetry, and create a remediation plan for identified problems.
SkillDFreshness: DClaude Code +9 - 0.406score
arize-evaluator
HenriqueOliveiraFiap
INVOKE THIS SKILL for LLM-as-judge evaluation workflows on Arize: creating/updating evaluators, running evaluations on spans or experiments, tasks…
SkillDFreshness: DClaude Code +9 - 0.405score
remember-interactive-programming
HenriqueOliveiraFiap
A micro-prompt that reminds the agent that it is an interactive programmer.
SkillDFreshness: DClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Apr 1, 2026 (7 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
- 0.499score
az-cost-optimize
asleekgeek
Analyze Azure resources used in the app (IaC files and/or resources in a target rg) and optimize costs - creating GitHub issues for identified optimizations.
SkillCFreshness: C★ 2Claude Code +9 - 0.244score
az-cost-optimize
raverx-dev
Analyze Azure resources used in the app (IaC files and/or resources in a target rg) and optimize costs - creating GitHub issues for identified optimizations.
SkillDFreshness: DClaude Code +9 - 0.241score
az-cost-optimize
passelin
Analyze Azure resources used in the app (IaC files and/or resources in a target rg) and optimize costs - creating GitHub issues for identified optimizations.
SkillDFreshness: DClaude Code +9
More from HenriqueOliveiraFiap
- 0.414score
arize-ai-provider-integration
HenriqueOliveiraFiap
INVOKE THIS SKILL when creating, reading, updating, or deleting Arize AI integrations.
SkillDFreshness: DClaude Code +9 - 0.414score
arize-link
HenriqueOliveiraFiap
Generate deep links to the Arize UI.
SkillDFreshness: DClaude Code +9 - 0.414score
arize-annotation
HenriqueOliveiraFiap
INVOKE THIS SKILL when creating, managing, or using annotation configs on Arize (categorical, continuous, freeform), or applying human annotations to project…
SkillDFreshness: DClaude Code +9 - 0.414score
arize-instrumentation
HenriqueOliveiraFiap
INVOKE THIS SKILL when adding Arize AX tracing to an application.
SkillDFreshness: DClaude Code +9 - 0.411score
arize-dataset
HenriqueOliveiraFiap
INVOKE THIS SKILL when creating, managing, or querying Arize datasets and examples.
SkillDFreshness: DClaude Code +9 - 0.411score
arize-experiment
HenriqueOliveiraFiap
INVOKE THIS SKILL when creating, running, or analyzing Arize experiments.
SkillDFreshness: DClaude Code +9
Cite this page
az-cost-optimize skill. Agent Mart. https://agentmart.dev/skills/henriqueoliveirafiap-az-cost-optimize (last updated 2026-10-24)