Claude
Skills
Sign in
Back

azure-cost-calculator

Included with Lifetime
$97 forever

Helps estimate and calculate Azure resource costs. Use this skill when users ask about Azure pricing, cost estimation, resource sizing costs, comparing pricing tiers, budgeting for Azure deployments, or understanding Azure billing. Triggers include questions like "how much will this cost in Azure", "estimate Azure costs", "compare Azure pricing", "budget for Azure resources".

Cloud & DevOpsscripts

What this skill does


# Azure Cost Calculator

Deterministic Azure cost estimation using the public Retail Prices API. Never guess prices; always query the live API via the scripts.

## Runtime Detection

Choose the script runtime based on what is available:

| Runtime                    | Condition                                                                                                                                                | Pricing script                 | Explore script                     |
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ | ---------------------------------- |
| **Bash** (preferred)       | `curl` and `jq` available                                                                                                                                | `scripts/get-azure-pricing.sh` | `scripts/explore-azure-pricing.sh` |
| **PowerShell 7+**          | `pwsh` available                                                                                                                                         | `scripts/Get-AzurePricing.ps1` | `scripts/Explore-AzurePricing.ps1` |
| **Windows PowerShell 5.1** | `powershell.exe` available (Windows only). Add `-ExecutionPolicy RemoteSigned` before `-File` to avoid silent failures from default policy restrictions. | `scripts/Get-AzurePricing.ps1` | `scripts/Explore-AzurePricing.ps1` |

Both produce identical JSON output. Bash flags use `--kebab-case` equivalents of PowerShell `-PascalCase` parameters (e.g., `-ServiceName` → `--service-name`).

### Declarative Parameters

Service reference files specify query parameters as `Key: Value` pairs. Translate to Bash `--kebab-case` or PowerShell `-PascalCase` flags; quote string values with spaces. See [workflow.md](references/workflow.md) for the full parameter table, translation examples, and output formats.

## Workflow

### Phase 1: Analysis (no API queries)

1. **Parse**: extract resource types, quantities, and sizing from user's architecture
2. **Clarify**: if any of these are true, stop and ask before continuing:
   - A resource maps to a category but not a specific service (e.g., "a database") → list 2–4 options
   - A resource has no count, no sizing/tier, or no workload scale → ask for specifics
   - A resource has no expected monthly volume: data transferred/ingested (GB), transactions, requests, messages, tokens, or users/devices → ask for estimated volume
   - A multi-model or multi-feature service (e.g., Azure OpenAI, AI Services, Defender for Cloud) has no model or feature variant specified → ask which one (cost can vary 15–30×)
   - User describes a goal without a hosting model (e.g., "a web app") → present 2–3 options with trade-offs
   - Batch all gaps into one prompt. Offer concrete choices with sensible options (e.g., "100 GB/month?", "GPT-4o or GPT-4o-mini?"). One round max; if user declines a specific parameter, apply safe defaults only for **Safe-default** gaps and disclose them; if any **Never-assume** gap remains, do NOT proceed; state what cannot be estimated without the missing input.
3. **Locate** each service reference using the lookup workflow in [shared.md](references/shared.md) (file search → routing map → category browse → broad search → discovery)
4. **Read** matched service files; check `billingNeeds` and follow dependency chains (e.g., AKS → VMs → Managed Disks)
5. **Classify** each parameter using the Disambiguation Protocol in [shared.md](references/shared.md):
   - **Specified**: user provided value (use verbatim)
   - **Never-assume gap**: required parameter missing (must ask)
   - **Safe-default gap**: optional parameter missing (use default, disclose)
6. **Specification Review**: present a summary:

   | Service | Specified | Missing (will ask) | Defaults (will assume) |
   | ------- | --------- | ------------------ | ---------------------- |
   - If **any never-assume parameter** is missing → ask user before proceeding
   - If only safe-default gaps remain → disclose defaults and proceed to Phase 2
   - **Single-service shortcut**: skip this table for single-service estimates where all parameters are specified

### Phase 2: Estimation

7. **Query**: run the pricing script for each service using parameters from service files + user input + resolved defaults
8. **Calculate**: apply cost formulas from service files; multiply by quantities
9. **Verify arithmetic**: for each line item, restate the formula with actual numbers, compute, and confirm the result. If any intermediate calculation involves multiplication of two numbers > 10, compute it step-by-step (e.g., `14.5 × 640 → 14 × 640 → 10 × 640 = 6,400; 4 × 640 = 2,560; subtotal = 8,960; 0.5 × 640 = 320; total = 9,280`). Do not rely on mental math for multi-digit operations.
10. **Present**: output the estimate with:

- **Assumptions block** (see Disambiguation Protocol in shared.md), listed before cost numbers
- **Line items**: service, unit price, quantity/hours, monthly cost
- **Grand total**: re-sum all line-item monthly costs independently; if discrepancy, use re-summed value

### Post-Estimate Iteration

After presenting the estimate, the user may request changes (switch region, add RI, resize instances, add/remove services). Re-run only the affected queries; do not restart the full workflow.

## Reference Index (load on demand)

| Condition                                                                       | Read                                                                                                                                                                                                                             |
| ------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Always (entry point)                                                            | [references/shared.md](references/shared.md): constants, category index, alias lookup                                                                                                                                           |
| Query returned 0 results or wrong data                                          | [references/pitfalls.md](references/pitfalls.md): troubleshooting and traps                                                                                                                                                     |
| User asks about Reserved Instances or savings plans                             | [references/reserved-instances.md](references/reserved-instances.md)                                                                                                                                                             |
| Non-USD currency or non-eastus region                                           | [references/regions-and-currencies.md](references/regions-and-currencies.md)                                                                                                                                                     |
| User requests private endpoints or private access; confirm PE intent with user | [references/services/networking/private-link.md](references/services/networking/private-link.md): PE pricing, [references/services/networking/private-dns.md](references/services/networking/private-dns.md): DNS zone pricing |
| File search returned 0 or ambiguous results                                     | [references/service-routing.md](references/service-routing.md) - implemented services routing                                                                                                                                    |
| First time running scripts or unfam

Related in Cloud & DevOps