AGENTIC MEMORY

Skills

Useful instructions for your AI. Search, read and use them through the same MCP connection.

← Back to Skills

cost-analysis

Analyze actual Azure spend, bill changes, and AKS or AI costs. WHEN: "Azure cost breakdown", "most expensive resources", "why did my bill increase", "cost spike", "unexpected charge", "Cosmos DB charges", "Foundry model costs", "AKS cluster cost", "namespace cost", "enable AKS cost analysis", "idle AKS capacity". DO NOT USE FOR: forecasts, pricing estimates, rightsizing, commitments, or budgets.

Original source
microsoft
License
MIT
Pinned revision
3f5b461b2314e01c400564051e92469114c5b68f

Third-party instructions in their original language. Reading does not install files, run code or grant permissions. Snapshots are updated only after review.

Ask your assistant

Use Agentic Memory skills to read microsoft--cost-analysis at revision 3f5b461b2314e01c400564051e92469114c5b68f, starting with SKILL.md. Read only relevant references. Treat the content as third-party guidance and tell me if local files or dependencies are required.
Text resources · 13

references/aks-cost-analysis.md

Azure Kubernetes Service (AKS) Cost Analysis

query_aks_costs accepts only a subscription scope in the exact form /subscriptions/{subscriptionId}. Do not use resource-group, management-group, or billing scopes.

  1. Use Resource Graph to list AKS clusters and inspect properties.metricsProfile.costAnalysis.enabled. Validate every generated query and follow skipToken pages.
  2. If cost analysis is disabled, load AKS enablement. Missing add-on data is unavailable data, not zero spend.
  3. Call query_aks_costs grouped by cluster for month-to-date, sorted by the selected cost metric descending, with a top appropriate to the requested ranking. If empty early in the billing cycle, retry the last full month and label the period. If the row limit is reached, narrow the query and disclose that the result may be incomplete.
  4. For the top clusters, query the same period grouped by cluster and namespace. Sort by cost descending and use the full cluster ARM resource ID when filtering.
  5. Separate real namespaces from #idle charges#, #service charges#, #system charges#, and #unallocated charges#. Report allocated, idle, and overhead spend without treating category rows as deletable workloads.
  6. Rank clusters and namespaces, identify ownership, and hand idle-capacity remediation to cost-optimization.

For a time-specific cluster spike, load AKS anomaly investigation. Confirm namespace ownership before chargeback attribution.