azure-cost-calculator

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".

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "azure-cost-calculator" with this command: npx skills add ahmadabdalla/azure-cost-calculator-skill/ahmadabdalla-azure-cost-calculator-skill-azure-cost-calculator

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:

RuntimeConditionPricing scriptExplore script
Bash (preferred)curl and jq availablescripts/get-azure-pricing.shscripts/explore-azure-pricing.sh
PowerShell 7+pwsh availablescripts/Get-AzurePricing.ps1scripts/Explore-AzurePricing.ps1
Windows PowerShell 5.1powershell.exe available (Windows only)scripts/Get-AzurePricing.ps1scripts/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. To execute a query, translate each parameter to the detected runtime's syntax:

  • Bash: --kebab-case flags (e.g., ServiceName: Virtual Machines--service-name 'Virtual Machines')
  • PowerShell: -PascalCase flags (e.g., ServiceName: Virtual Machines-ServiceName 'Virtual Machines')

String values with spaces require quoting when passed to scripts. Numeric values (Quantity, InstanceCount) do not.

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 (RU/s, executions, DTUs) → ask for specifics
    • 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. One round max — if user declines, carry gaps forward as never-assume items in Step 6.
  3. Locate each service reference: a. File search — search for files matching references/services/**/*<keyword>*.md b. Routing map — if search returns 0 or ambiguous results, check references/service-routing.md for the authoritative category and filename c. Category browse — if not found in routing map, read the category index in references/shared.md d. Broad search — list or search references/services/**/*.md to see all available files e. Discovery — if no file exists, use the explore script to find the service in the API

  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:

    • 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:

    ServiceSpecifiedMissing (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

  1. Query — run the pricing script for each service using parameters from service files + user input + resolved defaults
  2. Calculate — apply cost formulas from service files; multiply by quantities
  3. 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.
  4. 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)

ConditionRead
Always (entry point)references/shared.md — constants, category index, alias lookup
Query returned 0 results or wrong datareferences/pitfalls.md — troubleshooting and traps
User asks about Reserved Instances or savings plansreferences/reserved-instances.md
Non-USD currency or non-eastus regionreferences/regions-and-currencies.md
User requests private endpoints or private access — confirm PE intent with userreferences/services/networking/private-link.md — PE pricing, references/services/networking/private-dns.md — DNS zone pricing
File search returned 0 or ambiguous resultsreferences/service-routing.md - implemented services routing
First time running scripts or unfamiliar with parametersreferences/workflow.md — script parameters and output formats

Critical Rules

  1. Never guess prices — always run the script against the live API
  2. Infer currency and region from user context — if unspecified, ask the user or default to USD and eastus
  3. Ask before assuming — if a required parameter is ambiguous or missing (tier, SKU, quantity, currency, node count, traffic volume), stop and ask the user. At the request level, clarify vague inputs (Step 2). At the parameter level, apply the Disambiguation Protocol (Step 5).
  4. Default output format is Json — never use Summary (invisible to agents)
  5. Lazy-load service references — only read files from references/services/ directly required by the user's query. Use the file-search workflow (Step 2) to locate specific files.
  6. PowerShell: use -File, not -Command — run scripts with pwsh -File or powershell.exe -File; on Linux/macOS, bash strips OData quotes from inline commands. PS 5.1 caveat: use -Command instead of -File when passing array parameters (e.g., -Region 'eastus','australiaeast'), because -File mode does not parse PowerShell expression syntax and collapses the array into a single string.
  7. Use exact category names — group line items using the exact Category Index names from shared.md verbatim (e.g., "Compute", "Databases", "AI + ML"). Do not paraphrase, abbreviate, or rename them.
  8. Scope to user-specified resources — only include resources explicitly stated in the user's architecture. Companion resources from billingNeeds are included automatically.

Service File Metadata

YAML front matter fields. Optional fields use default elision — omitted means the default applies.

FieldRequiredDefaultAction
billingNeedsomitRead and price listed dependency services
billingConsiderationsomitAsk user about listed pricing factors before calculating
primaryCostOne-line billing summary for quick cost context
apiServiceNameomitUse instead of serviceName in API queries
hasMeterstruefalse → skip API, use Known Rates table
pricingRegionregionalglobalRegion: Global; api-unavailable → skip API; empty-region → omit region
hasKnownRatesfalsetrue → file contains manual pricing table
hasFreeGrantfalsetrue → apply free grant deduction from Cost Formula
privateEndpointfalsetrue → aggregate PE costs via networking/private-link.md

Universal Traps

These apply to EVERY query:

  1. serviceName and all filter values are case-sensitive — use exact values from service reference files
  2. Unfiltered queries return mixed SKU variants — always filter with productName/skuName to the specific variant needed
  3. Multi-meter resources need separate queries — run one query per meter with -MeterName

Batch Estimation Mode

When estimating 3 or more services, use these rules to reduce token consumption:

  1. Partial reads — read only lines 1–45 of each service file (YAML front matter, trap, first query pattern).
  2. Front matter routing — use YAML metadata to skip unnecessary work:
    • hasMeters: false / pricingRegion: api-unavailable → skip API; use Known Rates or primaryCost
    • pricingRegion: globalRegion: Global; empty-region → omit region
    • apiServiceName → use instead of serviceName in queries
    • hasFreeGrant: true → apply grant deduction; privateEndpoint: true → add PE line item
  3. Full read triggers — no query pattern in partial read, non-default config, 0/unexpected results, or billingConsiderations applies.
  4. Parallel queries — run independent service queries in parallel.
  5. Skip redundant references — read shared.md and pitfalls.md once at the start, not between services.
  6. Progressive distillation — after each service query returns, emit a summary row before proceeding: | Category | Service | Resource | Unit Price | Unit | Qty | Monthly Cost | Notes | Multi-meter services get one row per line item. After all queries complete, assemble the final estimate from the accumulated rows. Do not re-read service files already distilled unless a full read trigger is needed. During Post-Estimate Iteration, replace the distillation row(s) for any re-queried service.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Lyrics

Lyrics - command-line tool for everyday use

Registry SourceRecently Updated
General

Lint

Lint - command-line tool for everyday use

Registry SourceRecently Updated
General

Linkedin Post

LinkedIn文案生成、开头Hook、热门话题标签、轮播内容规划、高质量评论、个人简介优化。LinkedIn post writer with hooks, hashtags, carousel planning, comment templates, profile optimization. Use whe...

Registry SourceRecently Updated
1790ckchzh
General

Linkbox

Bookmark and link manager for saving, organizing, and searching your favorite URLs. Tag links by category, add descriptions, search across your collection, v...

Registry SourceRecently Updated