az-cost-optimize

github/awesome-copilot · updated Apr 8, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/github/awesome-copilot --skill az-cost-optimize
0 commentsdiscussion
summary

Analyze Azure resources and IaC files to identify cost optimizations, creating tracked GitHub issues for implementation.

  • Discovers Azure resources across subscriptions and resource groups, analyzes IaC files (Bicep, Terraform, ARM templates), and collects usage metrics from Log Analytics to validate current costs
  • Generates evidence-based optimization recommendations with priority scoring based on monthly savings, implementation effort, and risk assessment
  • Creates individual GitHub is
skill.md

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:
    // 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

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:

    ## 💰 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:

    # 🎯 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
how to use az-cost-optimize

How to use az-cost-optimize on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add az-cost-optimize
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/github/awesome-copilot --skill az-cost-optimize

The skills CLI fetches az-cost-optimize from GitHub repository github/awesome-copilot and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/az-cost-optimize

Reload or restart Cursor to activate az-cost-optimize. Access the skill through slash commands (e.g., /az-cost-optimize) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

User Story & Requirements Generation

Create detailed user stories, acceptance criteria, and feature specs

Example

Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios

Reduce spec writing time by 50%, ensure comprehensive coverage

Competitive Analysis

Research competitors, compare features, identify gaps

Example

Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities

Complete competitive research in 2 hours instead of 2 days

Roadmap Prioritization

Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs

Example

Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale

Make data-driven prioritization decisions faster

Stakeholder Communication

Draft PRDs, status updates, and stakeholder presentations

Example

Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement

Save 3-5 hours/week on communication overhead

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client
  • Access to product documentation and roadmap tools (Jira, Notion, etc.)
  • Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
  • Stakeholder contact information and communication channels

Time Estimate

30-60 minutes to see productivity improvements

Installation Steps

  1. 1.Install product management skill
  2. 2.Start with user story generation for known feature
  3. 3.Progress to competitive analysis: research 2-3 competitors
  4. 4.Use for roadmap prioritization: apply RICE/ICE scoring
  5. 5.Draft stakeholder communications and refine based on feedback
  6. 6.Build template library for recurring PM tasks
  7. 7.Share effective prompts with product team

Common Pitfalls

  • Not validating competitive research—verify facts before sharing
  • Accepting user stories without involving engineering team
  • Over-relying on frameworks without qualitative judgment
  • Not customizing outputs to company culture and communication style
  • Skipping stakeholder validation of generated requirements

Best Practices

✓ Do

  • +Validate research and competitive analysis with real data
  • +Collaborate with engineering when generating technical requirements
  • +Customize frameworks and templates to your company context
  • +Use skill for first drafts, refine with stakeholder input
  • +Document successful prompt patterns for PM tasks
  • +Combine AI efficiency with human judgment and intuition

✗ Don't

  • Don't publish competitive analysis without fact-checking
  • Don't finalize user stories without engineering review
  • Don't make prioritization decisions solely on AI scoring
  • Don't skip customer validation of generated requirements
  • Don't ignore company-specific context and culture

💡 Pro Tips

  • Provide context: company goals, constraints, customer feedback
  • Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
  • Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
  • Use skill for 70% generation + 30% customization to company needs

When to Use This

✓ Use When

Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.

✗ Avoid When

Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.

Learning Path

  1. 1Basic: user stories, feature specs, status updates
  2. 2Intermediate: competitive analysis, prioritization frameworks, PRDs
  3. 3Advanced: product strategy, go-to-market planning, OKR setting
  4. 4Expert: product vision, market positioning, business model innovation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.556 reviews
  • Harper Li· Dec 28, 2024

    We added az-cost-optimize from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Anika Bansal· Dec 16, 2024

    az-cost-optimize is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Kofi Sharma· Dec 12, 2024

    Useful defaults in az-cost-optimize — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Emma Mensah· Dec 4, 2024

    az-cost-optimize reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Liam Chawla· Nov 23, 2024

    Registry listing for az-cost-optimize matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Harper Thomas· Nov 19, 2024

    az-cost-optimize fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Rahul Santra· Nov 15, 2024

    Solid pick for teams standardizing on skills: az-cost-optimize is focused, and the summary matches what you get after install.

  • Emma Rao· Nov 7, 2024

    Useful defaults in az-cost-optimize — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Emma Singh· Nov 3, 2024

    az-cost-optimize is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Chen Thompson· Oct 26, 2024

    Registry listing for az-cost-optimize matched our evaluation — installs cleanly and behaves as described in the markdown.

showing 1-10 of 56

1 / 6