Zum Inhalt springen
Skillpedia
Deployment & Cloud (DevOps)40k · #7077

az-cost-optimize

Was er macht

Dieses Tool analysiert deine Azure-Cloud-Ressourcen, um Möglichkeiten zum Sparen zu finden. Es schlägt Anpassungen vor und erstellt Aufgaben, damit du die Verbesserungen umsetzen kannst.

Wann du ihn nutzt

  • ✓Wenn du deine monatliche Azure-Rechnung senken möchtest.
  • ✓Vor dem Deploy neuer Ressourcen, um sicherzustellen, dass sie effizient sind.
  • ✓Wenn du die Ressourcennutzung prüfst, um Verschwendung zu finden.

Link zum Skill

https://github.com/github/awesome-copilot/blob/main/skills/az-cost-optimize/SKILL.md

Kopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.

So nutzt du ihn

Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.

Fertige Nachricht zum Einfügen

Nutze diesen Skill, um mir zu helfen: https://github.com/github/awesome-copilot/blob/main/skills/az-cost-optimize/SKILL.md Lies die SKILL.md unter diesem Link und folge ihren Anweisungen für meine Aufgabe.
Soll deine KI Skills wie diesen selbst finden?Installiere den kostenlosen Skillpedia-MCP: eine Zeile, und sie durchsucht vor jeder Aufgabe 15.000+ Skills.In 1 Minute installieren →

Beispielanfrage an deine KI

“Analysiere meine Azure-Ressourcen, schlag Kostenoptimierungen vor und erstelle GitHub-Issues.”

5 neue Skills pro Woche. 1 Minute Lesezeit.

So funktioniert es

Das Tool prüft deine Azure-Ressourcen und Konfigurationsdateien und vergleicht sie mit Best Practices und Nutzungsdaten, um Sparmöglichkeiten zu finden. Anschließend erstellt es detaillierte Aufgaben, um diese Einsparungen umzusetzen.

Technischer Inhalt (originale SKILL.md)

Originaltext des Autors, auf Englisch, direkt von GitHub.

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:

…

Häufige Fragen

Was sind 'IaC-Dateien'?

IaC steht für 'Infrastructure as Code'. Das sind Dateien, die beschreiben, wie deine Cloud-Ressourcen konfiguriert sein sollen, ähnlich wie Programmcode.

Was sind 'Azure-Ressourcen'?

Das sind die Dienste, die du in Microsofts Cloud Azure nutzt, etwa virtuelle Maschinen, Datenbanken, Speicher usw.

Was sind 'GitHub-Issues'?

Das sind Aufgaben oder Probleme, die in einem GitHub-Projekt erstellt und nachverfolgt werden können. Das Tool erstellt diese Aufgaben für dich, damit du die vorgeschlagenen Einsparungen umsetzen kannst.

Details

Originalbeschreibung des Autors

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.

repo: github/awesome-copilot

Beliebtheit

GitHub-Sterne
40k
Platz im Ranking
#7077
Lizenz
MIT
Aktualisiert
15.10.2026

Ist dieser Skill nützlich?

0

Anmelden um abzustimmen.

Kommentare

  • …

Weitere Skills aus diesem Repository

Ähnliche Skills