azure-cost-calculator by ahmadabdalla/azure-cost-calculator-skill
npx skills add https://github.com/ahmadabdalla/azure-cost-calculator-skill --skill azure-cost-calculator使用公共零售价格 API 进行确定性的 Azure 成本估算。绝不猜测价格——始终通过脚本查询实时 API。
根据可用环境选择脚本运行时:
| 运行时 | 条件 | 定价脚本 | 探索脚本 |
|---|---|---|---|
| Bash (首选) | curl 和 jq 可用 | scripts/get-azure-pricing.sh | scripts/explore-azure-pricing.sh |
| PowerShell 7+ | pwsh 可用 |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
scripts/Get-AzurePricing.ps1 |
scripts/Explore-AzurePricing.ps1 |
| Windows PowerShell 5.1 | powershell.exe 可用 (仅限 Windows) | scripts/Get-AzurePricing.ps1 | scripts/Explore-AzurePricing.ps1 |
两者产生相同的 JSON 输出。Bash 标志使用 --kebab-case 等效于 PowerShell 的 -PascalCase 参数(例如,-ServiceName → --service-name)。
服务参考文件将查询参数指定为 Key: Value 对。要执行查询,请将每个参数转换为检测到的运行时的语法:
--kebab-case 标志(例如,ServiceName: Virtual Machines → --service-name 'Virtual Machines')-PascalCase 标志(例如,ServiceName: Virtual Machines → -ServiceName 'Virtual Machines')包含空格的字符串值在传递给脚本时需要引号。数值(Quantity, InstanceCount)则不需要。
解析 — 从用户的架构中提取资源类型、数量和规模
澄清 — 如果以下任何一项为真,则在继续之前停止并询问:
定位 每个服务参考:a. 文件搜索 — 搜索匹配 references/services/**/*<keyword>*.md 的文件 b. 路由映射 — 如果搜索返回 0 个或模糊的结果,请检查 references/service-routing.md 以获取权威类别和文件名 c. 类别浏览 — 如果在路由映射中未找到,请阅读 references/shared.md 中的类别索引 d. 广泛搜索 — 列出或搜索 references/services/**/*.md 以查看所有可用文件 e. 发现 — 如果文件不存在,使用探索脚本在 API 中查找服务
读取 匹配的服务文件;检查 billingNeeds 并遵循依赖链(例如,AKS → VMs → Managed Disks)
分类 每个参数,使用 shared.md 中的消歧协议:
规格审查 — 呈现摘要:
| 服务 | 已指定 | 缺失(将询问) | 默认值(将假设) |
|---|
* 如果**有任何永不假设参数**缺失 → 在继续之前询问用户
* 如果只剩下安全默认缺口 → 披露默认值并进入阶段 2
* **单服务快捷方式**:对于所有参数都已指定的单服务估算,跳过此表格
14.5 × 640 → 14 × 640 → 10 × 640 = 6,400; 4 × 640 = 2,560; 小计 = 8,960; 0.5 × 640 = 320; 总计 = 9,280)。不要依赖心算进行多位数运算。呈现估算结果后,用户可能请求更改(切换区域、添加 RI、调整实例大小、添加/删除服务)。仅重新运行受影响的查询——不要重新启动完整的工作流程。
| 条件 | 阅读 |
|---|---|
| 始终(入口点) | references/shared.md — 常量、类别索引、别名查找 |
| 查询返回 0 个结果或错误数据 | references/pitfalls.md — 故障排除和陷阱 |
| 用户询问关于预留实例或节省计划 | references/reserved-instances.md |
| 非 USD 货币或非 eastus 区域 | references/regions-and-currencies.md |
| 用户请求私有端点或私有访问 — 向用户确认 PE 意图 | references/services/networking/private-link.md — PE 定价,references/services/networking/private-dns.md — DNS 区域定价 |
| 文件搜索返回 0 个或模糊的结果 | references/service-routing.md - 已实现的服务路由 |
| 首次运行脚本或不熟悉参数 | references/workflow.md — 脚本参数和输出格式 |
references/services/ 中的文件。使用文件搜索工作流程(步骤 2)来定位特定文件。-File,而不是 -Command — 使用 pwsh -File 或 powershell.exe -File 运行脚本;在 Linux/macOS 上,bash 会从内联命令中剥离 OData 引号。PS 5.1 注意事项:传递数组参数时(例如,-Region 'eastus','australiaeast'),使用 -Command 而不是 -File,因为 -File 模式不解析 PowerShell 表达式语法,并将数组折叠为单个字符串。billingNeeds 的配套资源会自动包含。YAML 前置字段。可选字段使用默认省略——省略意味着应用默认值。
| 字段 | 必需 | 默认 | 操作 |
|---|---|---|---|
billingNeeds | — | 省略 | 读取并定价列出的依赖服务 |
billingConsiderations | — | 省略 | 在计算前询问用户关于列出的定价因素 |
primaryCost | ✔ | — | 单行计费摘要,用于快速成本上下文 |
apiServiceName | — | 省略 | 在 API 查询中代替 serviceName 使用 |
hasMeters | — | true | false → 跳过 API,使用已知费率表 |
pricingRegion | — | regional | global → Region: Global;api-unavailable → 跳过 API;empty-region → 省略区域 |
hasKnownRates | — | false | true → 文件包含手动定价表 |
hasFreeGrant | — | false | true → 从成本公式中应用免费授予扣除 |
privateEndpoint | — | false | true → 通过 networking/private-link.md 汇总 PE 成本 |
这些适用于每一个查询:
serviceName 和所有过滤器值区分大小写 — 使用服务参考文件中的确切值productName/skuName 过滤到所需的特定变体-MeterName 为每个计量运行一个查询当估算3 个或更多服务时,使用以下规则以减少令牌消耗:
hasMeters: false / pricingRegion: api-unavailable → 跳过 API;使用已知费率或 primaryCostpricingRegion: global → Region: Global;empty-region → 省略区域apiServiceName → 在查询中代替 serviceName 使用hasFreeGrant: true → 应用授予扣除;privateEndpoint: true → 添加 PE 行项目billingConsiderations 适用。| 类别 | 服务 | 资源 | 单价 | 单位 | 数量 | 月度成本 | 备注 | 多计量服务每个行项目获得一行。所有查询完成后,从累积的行中组装最终估算。除非需要完整读取触发器,否则不要重新读取已经提炼过的服务文件。在估算后迭代期间,替换任何重新查询的服务的提炼行。每周安装次数
80
代码仓库
GitHub Stars
12
首次出现
2026年2月9日
安全审计
安装于
github-copilot79
opencode77
codex77
gemini-cli77
kimi-cli76
amp76
Deterministic Azure cost estimation using the public Retail Prices API. Never guess prices — always query the live API via the scripts.
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) | 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).
Service reference files specify query parameters as Key: Value pairs. To execute a query, translate each parameter to the detected runtime's syntax:
--kebab-case flags (e.g., ServiceName: Virtual Machines → --service-name 'Virtual Machines')-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.
Parse — extract resource types, quantities, and sizing from user's architecture
Clarify — if any of these are true, stop and ask before continuing:
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
| 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
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.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.
| Condition | Read |
|---|---|
| Always (entry point) | references/shared.md — constants, category index, alias lookup |
| Query returned 0 results or wrong data | references/pitfalls.md — troubleshooting and traps |
| User asks about Reserved Instances or savings plans | references/reserved-instances.md |
| Non-USD currency or non-eastus region | references/regions-and-currencies.md |
| User requests private endpoints or private access — confirm PE intent with user | references/services/networking/private-link.md — PE pricing, references/services/networking/private-dns.md — DNS zone pricing |
| File search returned 0 or ambiguous results |
references/services/ directly required by the user's query. Use the file-search workflow (Step 2) to locate specific files.-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 when passing array parameters (e.g., ), because mode does not parse PowerShell expression syntax and collapses the array into a single string.YAML front matter fields. Optional fields use default elision — omitted means the default applies.
| Field | Required | Default | Action |
|---|---|---|---|
billingNeeds | — | omit | Read and price listed dependency services |
billingConsiderations | — | omit | Ask user about listed pricing factors before calculating |
primaryCost | ✔ | — | One-line billing summary for quick cost context |
apiServiceName | — | omit | Use instead of in API queries |
These apply to EVERY query:
serviceName and all filter values are case-sensitive — use exact values from service reference filesproductName/skuName to the specific variant needed-MeterNameWhen estimating 3 or more services , use these rules to reduce token consumption:
hasMeters: false / pricingRegion: api-unavailable → skip API; use Known Rates or primaryCostpricingRegion: global → Region: Global; empty-region → omit regionapiServiceName → use instead of serviceName in querieshasFreeGrant: true → apply grant deduction; → add PE line itemWeekly Installs
80
Repository
GitHub Stars
12
First Seen
Feb 9, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
github-copilot79
opencode77
codex77
gemini-cli77
kimi-cli76
amp76
Azure Data Explorer (Kusto) 查询技能:KQL数据分析、日志遥测与时间序列处理
138,800 周安装
ActiveCampaign自动化集成指南:通过Rube MCP实现CRM与营销自动化
72 周安装
通过Rube MCP实现Make自动化:集成Composio工具包管理场景与操作
72 周安装
Microsoft Teams自动化指南:通过Rube MCP实现频道消息、聊天与会议管理
72 周安装
Electrobun 最佳实践:TypeScript + Bun 跨平台桌面应用开发指南
72 周安装
ATXP Memory:AI代理记忆管理工具 - 云端备份与本地向量搜索
72 周安装
Brave Search Spellcheck API:智能拼写检查与查询纠正,提升搜索准确性
72 周安装
Read matched service files; check billingNeeds and follow dependency chains (e.g., AKS → VMs → Managed Disks)
Classify each parameter using the Disambiguation Protocol in shared.md:
Specification Review — present a summary:
| references/service-routing.md - implemented services routing |
| First time running scripts or unfamiliar with parameters | references/workflow.md — script parameters and output formats |
-File-Region 'eastus','australiaeast'-FilebillingNeeds are included automatically.serviceNamehasMeters | — | true | false → skip API, use Known Rates table |
pricingRegion | — | regional | global → Region: Global; api-unavailable → skip API; empty-region → omit region |
hasKnownRates | — | false | true → file contains manual pricing table |
hasFreeGrant | — | false | true → apply free grant deduction from Cost Formula |
privateEndpoint | — | false | true → aggregate PE costs via networking/private-link.md |
privateEndpoint: truebillingConsiderations applies.| 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.