cost-budget

Generates per-resource-group Azure budgets from three months of spend data and tracks burn rates.

Updated Jul 22, 2026
One-click install
npx skills add https://github.com/Trigent-Software-Pvt-Ltd/trigen-aidlc --skill cost-budget-trigent-software-pvt-ltd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cost-budget
Source: https://github.com/Trigent-Software-Pvt-Ltd/trigen-aidlc/tree/main/plugins/cost-anomalies/skills/cost-budget
Command: npx skills add https://github.com/Trigent-Software-Pvt-Ltd/trigen-aidlc --skill cost-budget-trigent-software-pvt-ltd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Azure teams often lack per-resource-group budgets, making it impossible to know whether current spending is on track until the invoice arrives. This Skill analyzes actual historical spend, calculates data-driven budgets, and stores them alongside cost anomaly data in a GitLab knowledge base. ## Core Features & Use Cases - Budget Generation: Fetches 3 months of Azure Cost Management data per resource group, computes the median monthly spend, and writes a _budget.json with a 20% buffer to each RG folder in the cost-anomalies KB. - Burn Rate Status: Compares current month-to-date spend against stored budgets and classifies each RG as On track, Elevated, WARN, or ALERT with projected month-end totals. - Manual Overrides & Gap Filling: Set a specific budget for any RG manually, or run --fill-gaps to generate budgets only for RG folders missing one. - Use Case: After noticing a spike in a production resource group, run the status command to see that legacy-r6 is burning at 1.49x its budget and projected to exceed it by $5,400, then escalate before month-end. ## Quick Start Ask the assistant to generate Azure resource group budgets from recent spend, for example: "Generate budgets for all subscriptions in the cost-anomalies KB."

Frequently Asked Questions about cost-budget

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate Azure budgets per resource group from actual spend?

Run the generate command, which queries Azure Cost Management for 3 months of monthly costs grouped by ResourceGroupName, computes the median spend per RG, and writes a _budget.json with a 20% buffer to each RG folder in the GitLab cost-anomalies KB.

How to check Azure burn rate against a monthly budget?

Use the status command to compare current month-to-date spend against stored budgets. It calculates burn rate as actual spend divided by expected spend for days elapsed, then classifies each resource group as On track, Elevated, WARN, or ALERT with projected month-end totals.

Why are some Azure resource groups skipped during budget generation?

Resource groups are skipped when they have fewer than 3 complete months of spend data or a median monthly spend under $50, since there is not enough history or value to justify tracking. The current partial month is always excluded from the median calculation.

What happens when the Azure CLI session expires during budget generation?

The skill checks authentication with az account get-access-token before any API calls. If the session is expired, it prompts you to run az login with the tenant ID in your terminal, then re-verifies before continuing.

Can I manually override an Azure resource group budget?

Yes, use the set command with the RG name, subscription, and amount, for example: set legacy-r6 in Production 9000. This updates monthly_budget_usd in the existing _budget.json and marks the notes field as manually set.