Official agent skill

Az Cost Optimize

by github in github/awesome-copilot

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.

OfficialMITAuto-check passedDevOps & Cloud

Install Az Cost Optimize

skills CLI
$ npx skills add github/awesome-copilot --skill az-cost-optimize -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install github/awesome-copilot az-cost-optimize --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/github/awesome-copilot.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/az-cost-optimize .claude/skills/az-cost-optimize && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
az-cost-optimize
GitHub stars
40k
Used in
1 other repo
Token cost
~3.2k tokens
SKILL.md length
924 words
Files
1
Skills in repo
417
Repo updated
First seen
Licence
MIT

At a glance

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.

  • Works in 6 steps: Get Azure Best Practices → Discover Azure Infrastructure → Collect Usage Metrics & Validate Current… → …
  • DevOps & Cloud work in your project
  • SKILL.md covers Prerequisites, Workflow Steps, 📋 Implementation Tracking and 📈 Progress Tracking, plus 2 more sections
  • Calls az

What it does

Az Cost Optimize is an agent skill from github/awesome-copilot, published by the product's own GitHub organization. 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.

Its SKILL.md is about 3.2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in DevOps & Cloud. It works with GitHub, Microsoft Azure and Model Context Protocol. The repository describes itself as: Community-contributed instructions, agents, skills, and configurations to help you make the most of GitHub Copilot. The licence is MIT.

When your agent uses it

  • DevOps & Cloud work in your project

Example prompts

  • “/az-cost-optimize”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Get Azure Best Practices
  2. Discover Azure Infrastructure
  3. Collect Usage Metrics & Validate Current Costs
  4. Generate Cost Optimization Recommendations
  5. User Confirmation
  6. Create Individual Optimization Issues

What it can do on your machine

Read from SKILL.md and the folder at commit 727ff2e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • az

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • azure.microsoft.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Az Cost Optimize loads about 3.2k tokens when it runs. Until then it costs about 44 tokens; SKILL.md has 924 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~44
When it runs · the whole SKILL.md, loaded when a task matches
~3.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from github/awesome-copilot at commit 727ff2e, republished under its MIT licence (© github). 924 words, ~3,218 tokens.

Download SKILL.mdSave it as .claude/skills/az-cost-optimize/SKILL.md (or your agent's skills folder).
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.

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 accounts
    • Right-size storage tiers based on access patterns

    Infrastructure Optimizations:

    • Remove unused/redundant resources
    • Implement auto-scaling where beneficial
    • Schedule non-production environments
  2. Calculate Evidence-Based Savings:

    • Current validated cost → Target cost = Savings
    • Document pricing source for both current and target configurations
  3. Calculate Priority Score for each recommendation:

    Priority Score = (Value Score × Monthly Savings) / (Risk Score × Implementation Days)
    
    High Priority: Score > 20
    Medium Priority: Score 5-20
    Low Priority: Score < 5
  4. Validate Recommendations:

    • Ensure Azure CLI commands are accurate
    • Verify estimated savings calculations
    • Assess implementation risks and prerequisites
    • Ensure all savings calculations have supporting evidence
Step 5: User Confirmation

Action: Present summary and get approval before creating GitHub issues Process:

  1. Display Optimization Summary:

    🎯 Azure Cost Optimization Summary
    
    📊 Analysis Results:
    • Total Resources Analyzed: X
    • Current Monthly Cost: $X 
    • Potential Monthly Savings: $Y 
    • Optimization Opportunities: Z
    • High Priority Items: N
    
    🏆 Recommendations:
    1. [Resource]: [Current SKU] → [Target SKU] = $X/month savings - [Risk Level] | [Implementation Effort]
    2. [Resource]: [Current Config] → [Target Config] = $Y/month savings - [Risk Level] | [Implementation Effort]
    3. [Resource]: [Current Config] → [Target Config] = $Z/month savings - [Risk Level] | [Implementation Effort]
    ... and so on
    
    💡 This will create:
    • Y individual GitHub issues (one per optimization)
    • 1 EPIC issue to coordinate implementation
    
    ❓ Proceed with creating GitHub issues? (y/n)
  2. Wait for User Confirmation: Only proceed if user confirms

Show full SKILL.md (524 more words)Show less
Step 6: Create Individual Optimization Issues

Action: Create separate GitHub issues for each optimization opportunity. Label them with "cost-optimization" (green color), "azure" (blue color). MCP Tools Required: create_issue for each recommendation Process:

  1. Create Individual Issues using this template:

    Title Format: [COST-OPT] [Resource Type] - [Brief Description] - $X/month savings

    Body Template:

    markdown
    ## 💰 Cost Optimization: [Brief Title]
    
    **Monthly Savings**: $X | **Risk Level**: [Low/Medium/High] | **Implementation Effort**: X days
    
    ### 📋 Description
    [Clear explanation of the optimization and why it's needed]
    
    ### 🔧 Implementation
    
    **IaC Files Detected**: [Yes/No - based on file_search results]
    
    ```bash
    # If IaC files found: Show IaC modifications + deployment
    # File: infrastructure/bicep/modules/app-service.bicep
    # Change: sku.name: 'S3' → 'B2'
    az deployment group create --resource-group [rg] --template-file infrastructure/bicep/main.bicep
    
    # If no IaC files: Direct Azure CLI commands + warning
    # ⚠️ No IaC files found. If they exist elsewhere, modify those instead.
    az appservice plan update --name [plan] --sku B2
    📊 Evidence
    • Current Configuration: [details]
    • Usage Pattern: [evidence from monitoring data]
    • Cost Impact: $X/month → $Y/month
    • Best Practice Alignment: [reference to Azure best practices if applicable]
    ✅ Validation Steps
    • Test in non-production environment
    • Verify no performance degradation
    • Confirm cost reduction in Azure Cost Management
    • Update monitoring and alerts if needed
    ⚠️ Risks & Considerations
    • [Risk 1 and mitigation]
    • [Risk 2 and mitigation]

    Priority Score: X | Value: X/10 | Risk: X/10

Step 7: Create EPIC Coordinating Issue

Action: Create master issue to track all optimization work. Label it with "cost-optimization" (green color), "azure" (blue color), and "epic" (purple color). MCP Tools Required: create_issue for EPIC Note about mermaid diagrams: Ensure you verify mermaid syntax is correct and create the diagrams taking accessibility guidelines into account (styling, colors, etc.). Process:

  1. Create EPIC Issue:

    Title: [EPIC] Azure Cost Optimization Initiative - $X/month potential savings

    Body Template:

    markdown
    # 🎯 Azure Cost Optimization EPIC
    
    **Total Potential Savings**: $X/month | **Implementation Timeline**: X weeks
    
    ## 📊 Executive Summary
    - **Resources Analyzed**: X
    - **Optimization Opportunities**: Y  
    - **Total Monthly Savings Potential**: $X
    - **High Priority Items**: N
    
    ## 🏗️ Current Architecture Overview
    
    ```mermaid
    graph TB
        subgraph "Resource Group: [name]"
            [Generated architecture diagram showing current resources and costs]
        end

    📋 Implementation Tracking

    🚀 High Priority (Implement First)
    • #[issue-number]: [Title] - $X/month savings
    • #[issue-number]: [Title] - $X/month savings
    ⚡ Medium Priority
    • #[issue-number]: [Title] - $X/month savings
    • #[issue-number]: [Title] - $X/month savings
    🔄 Low Priority (Nice to Have)
    • #[issue-number]: [Title] - $X/month savings

    📈 Progress Tracking

    • Completed: 0 of Y optimizations
    • Savings Realized: $0 of $X/month
    • Implementation Status: Not Started

    🎯 Success Criteria

    • All high-priority optimizations implemented
    • >80% of estimated savings realized
    • No performance degradation observed
    • Cost monitoring dashboard updated

    📝 Notes

    • Review and update this EPIC as issues are completed
    • Monitor actual vs. estimated savings
    • Consider scheduling regular cost optimization reviews

Error Handling

  • Cost Validation: If savings estimates lack supporting evidence or seem inconsistent with Azure pricing, re-verify configurations and pricing sources before proceeding
  • Azure Authentication Failure: Provide manual Azure CLI setup steps
  • No Resources Found: Create informational issue about Azure resource deployment
  • GitHub Creation Failure: Output formatted recommendations to console
  • Insufficient Usage Data: Note limitations and provide configuration-based recommendations only

Success Criteria

  • ✅ All cost estimates verified against actual resource configurations and Azure pricing
  • ✅ Individual issues created for each optimization (trackable and assignable)
  • ✅ EPIC issue provides comprehensive coordination and tracking
  • ✅ All recommendations include specific, executable Azure CLI commands
  • ✅ Priority scoring enables ROI-focused implementation
  • ✅ Architecture diagram accurately represents current state
  • ✅ User confirmation prevents unwanted issue creation

© github, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/az-cost-optimize of github/awesome-copilot.

Open the folder on GitHubat commit 727ff2e

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in github/awesome-copilot, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Az Cost Optimize next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Az Cost Optimize compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Az Cost Optimize this skillgithub/awesome-copilot40k1 repos~3.2kAutomated safety check: PassMIT
Azv Bicep Diagram SyncAzure/AZVerify101—~2.9kAutomated safety check: PassMIT
Azv Diagram Azure SyncAzure/AZVerify101—~3.7kAutomated safety check: PassMIT
Azv Diagram Azure Sync DeepAzure/AZVerify101—~3.9kAutomated safety check: PassMIT
Apex GitHub Operationsjonathan-vella/apex217—~1.5kAutomated safety check: PassMIT
Azv Sketch To DiagramAzure/AZVerify101—~3.5kAutomated safety check: PassMIT

Similar skills

  • Official

    Compare Bicep templates against a Draw.io Azure architecture diagram to detect resource-level divergence.

    101 GitHub stars~2.9k tokensUpdated 1 mo ago
    DevOps & CloudAuto-check passed
  • Official

    Compare a Draw.io Azure architecture diagram against a live Azure environment to detect drift.

    101 GitHub stars~3.7k tokensUpdated 1 mo ago
    DevOps & CloudAuto-check passed
  • Official

    Deep-compare a Draw.io Azure architecture diagram against a live Azure environment — checks both resource existence AND every tracked configuration property (SKU, size, settings, etc.) against…

    101 GitHub stars~3.9k tokensUpdated 1 mo ago
    DevOps & CloudAuto-check passed
  • Apex GitHub Operations

    jonathan-vella/apex

    WORKFLOW SKILL — Full GitHub contribution lifecycle: branches, conventional commits, issues, PRs, Actions, releases.

    217 GitHub stars~1.5k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Azv Sketch To Diagram

    Azure/AZVerify

    Official

    Convert a rough sketch or drawing of an Azure architecture into a professional Draw.io diagram using Azure-specific shapes.

    101 GitHub stars~3.5k tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check passed
  • Terravision Cloud Diagrams

    patrickchugh/terravision

    Draw cloud architecture diagrams for AWS, Azure or GCP with the official provider icon sets, using TerraVision.

    1.6k GitHub stars~5.6k tokensUpdated today
    DevOps & CloudAuto-check: notes

More from github/awesome-copilot

All 417 skills in this repo
  • Acquire Codebase Knowledge

    github/awesome-copilot

    Official

    Maps an unfamiliar codebase into seven evidence-backed documents in docs/codebase/, using a scan script and templates, for onboarding or architecture write-ups.

    40k GitHub starsUsed in 1 repo~2.3k tokens
    Auto-check passed
  • Azure Architecture Autopilot

    github/awesome-copilot

    Official

    Designs Azure infrastructure from a natural-language description, or diagrams an existing resource group, then refines the design through conversation and deploys it with Bicep.

    40k GitHub starsUsed in 1 repo~1.9k tokens
    Auto-check passed
  • Draw.io Diagram Generator

    github/awesome-copilot

    Official

    Generates, edits and validates draw.io files with correct mxGraph XML, covering flowcharts, architecture, sequence, ER and UML class diagrams.

    40k GitHub starsUsed in 1 repo~4.9k tokens
    Auto-check passed
  • Credit Risk Data Cleaning

    github/awesome-copilot

    Official

    Cleans raw credit data and screens variables before loan modeling, dropping unstable, noisy or redundant features and writing an Excel report of every step.

    40k GitHub starsUsed in 1 repo~1.5k tokens
    Auto-check passed
  • Daily Focus Board

    github/awesome-copilot

    Official

    Builds a warm, browser-based daily focus board the user updates by talking to their agent, with Eisenhower priorities, a brain-dump box and kind not-today carryover.

    40k GitHub stars~3k tokensUpdated today
    Auto-check passed
  • Python Pypi Package Builder

    github/awesome-copilot

    Official

    End-to-end skill for building, testing, linting, versioning, and publishing a production-grade Python library to PyPI.

    40k GitHub starsUsed in 1 repo~4.6k tokens
    Auto-check passed

Categories

Questions about Az Cost Optimize

What does Az Cost Optimize do?

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. Az Cost Optimize is an agent skill from github/awesome-copilot, published by the product's own GitHub organization. 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.

When should I use Az Cost Optimize?

Az Cost Optimize fits situations like: devOps & Cloud work in your project.

How do I install Az Cost Optimize in Claude Code?

Run `npx skills add github/awesome-copilot --skill az-cost-optimize -a claude-code`. Or copy the skill folder (skills/az-cost-optimize in github/awesome-copilot) into .claude/skills/az-cost-optimize in your project. Claude Code loads it when a task matches its description.

How do I install Az Cost Optimize in Codex?

Run `npx skills add github/awesome-copilot --skill az-cost-optimize -a codex`. Or copy the skill folder (skills/az-cost-optimize in github/awesome-copilot) into .agents/skills/az-cost-optimize in your project. Codex loads it when a task matches its description.

Can I use Az Cost Optimize in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add github/awesome-copilot --skill az-cost-optimize -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/az-cost-optimize, .gemini/skills/az-cost-optimize, .github/skills/az-cost-optimize and .opencode/skills/az-cost-optimize in your project.

What does Az Cost Optimize need to run?

Going by SKILL.md and its folder, Az Cost Optimize needs the command-line tools its instructions call (az).

Does Az Cost Optimize access the network?

SKILL.md names 1 domain. As links in the text: azure.microsoft.com. This is read from the text; nothing was executed.

Is Az Cost Optimize safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Az Cost Optimize use?

Az Cost Optimize is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Az Cost Optimize use?

About 3.2k tokens (SKILL.md is roughly 13k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Az Cost Optimize?

Skills that share tags, products or a category with Az Cost Optimize: Azv Bicep Diagram Sync (Azure/AZVerify, 101 stars), Azv Diagram Azure Sync (Azure/AZVerify, 101 stars), Azv Diagram Azure Sync Deep (Azure/AZVerify, 101 stars) and Apex GitHub Operations (jonathan-vella/apex, 217 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Az Cost Optimize?

github (a GitHub organization, an official publisher) maintains it in github/awesome-copilot, which has 39,748 GitHub stars. The repository holds 417 skills in this directory. The repository was last updated on October 7, 2026.

Source: github/awesome-copilot on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.