# Azure Cost > Azure cost management: query costs, forecast spending, optimize to reduce waste. WHEN: \"Azure costs\", \"Azure bill\", \"cost breakdown\", \"how much am I spending\", \"forecast spending\", \"optimize costs\", \"reduce spending\", \"orphaned resources\", \"rightsize VMs\", \"cost spike\", \"reduce storage costs\", \"AKS cost\". DO NOT USE FOR: deploying resources, provisioning, diagnostics, or security audits. Source: https://skillsagentes.com/skills/microsoft/azure-skills/azure-cost Repository: https://github.com/microsoft/azure-skills Author: microsoft License: MIT Updated: hace 17 días Context cost: 104 tok installed, 472 tok once triggered, 24.3k tok with every bundled file Bundle: 23 files, 95 KB Permissions requested: none declared ## Install ```bash npx -y skills add microsoft/azure-skills --skill azure-cost --agent claude-code ``` ## What it does - Enruta a tres flujos según la intención: consulta de costes históricos, optimización para encontrar desperdicio, y previsión de gasto futuro. - Documenta las dos APIs que usa — `Microsoft.CostManagement/query` y `/forecast`, ambas en api-version 2023-11-01 — y los cuatro ámbitos posibles: suscripción, grupo de recursos, grupo de gestión y cuenta de facturación. - Exige el rol Cost Management Reader más Monitoring Reader y Reader sobre el ámbito objetivo. - Incluye optimización específica por servicio para Redis y Storage. ## Use it when - Se pregunta por costes o facturas de Azure, desglose de gasto o cuánto se está gastando. - Se quiere prever gasto, optimizar costes, encontrar recursos huérfanos o redimensionar VMs. ## Don't bother when - Para desplegar o aprovisionar recursos, diagnósticos o auditorías de seguridad: el archivo los excluye. ## What triggers it - "¿cuánto estoy gastando en Azure?" - "desglósame la factura" - "encuentra recursos huérfanos" - "prevé el gasto del próximo trimestre" ## Before you install - Requiere los roles Cost Management Reader, Monitoring Reader y Reader sobre el ámbito consultado. ## Files - SKILL.md — 2 KB - cost-forecast/error-handling.md — 4 KB - cost-forecast/examples.md — 3 KB - cost-forecast/guardrails.md — 5 KB - cost-forecast/request-body-schema.md — 4 KB - cost-forecast/workflow.md — 5 KB - cost-optimization/auth-best-practices.md — 6 KB - cost-optimization/azure-aks-anomalies.md — 2 KB - cost-optimization/azure-aks-cost-addon.md — 1 KB - cost-optimization/azure-quick-review.md — 2 KB - cost-optimization/azure-resource-graph.md — 3 KB - cost-optimization/report-template.md — 2 KB - cost-optimization/sdk/azure-resource-manager-redis-dotnet.md — 1 KB - cost-optimization/services/redis/azure-cache-for-redis.md — 3 KB - cost-optimization/services/storage/azure-storage.md — 8 KB - cost-optimization/workflow.md — 8 KB - cost-query/dimensions-by-scope.md — 7 KB - cost-query/error-handling.md — 5 KB - cost-query/examples.md — 2 KB - cost-query/guardrails.md — 8 KB - cost-query/request-body-schema.md — 5 KB - cost-query/workflow.md — 5 KB - references/tools-and-best-practices.md — 3 KB ## SKILL.md Reproduced verbatim from microsoft/azure-skills under MIT. This section is the upstream document and is in English. # Azure Cost Management Skill Query historical costs, forecast future spending, optimize to reduce waste. ## Routing | User Intent | Workflow | |-------------|----------| | Understand current costs | [Cost Query](cost-query/workflow.md) | | Reduce costs / find waste | [Cost Optimization](cost-optimization/workflow.md) | | Project future costs | [Cost Forecast](cost-forecast/workflow.md) | ## Quick Reference | Property | Value | |----------|-------| | **Query API** | `POST {scope}/providers/Microsoft.CostManagement/query?api-version=2023-11-01` | | **Forecast API** | `POST {scope}/providers/Microsoft.CostManagement/forecast?api-version=2023-11-01` | | **Required Role** | Cost Management Reader + Monitoring Reader + Reader (on target scope) | ## Scope Patterns - Subscription: `/subscriptions/` - Resource Group: `/subscriptions//resourceGroups/` - Management Group: `/providers/Microsoft.Management/managementGroups/` - Billing Account: `/providers/Microsoft.Billing/billingAccounts/` ## Service-Specific Optimization - [Redis](cost-optimization/services/redis/azure-cache-for-redis.md) - [Storage](cost-optimization/services/storage/azure-storage.md) ## References - [MCP Tools, Best Practices, Safety](references/tools-and-best-practices.md) - [SDK: Redis .NET](cost-optimization/sdk/azure-resource-manager-redis-dotnet.md) --- Skills Agentes — https://skillsagentes.com/skills/microsoft/azure-skills/azure-cost