jpskill.com
🛠️ 開発・MCP コミュニティ

Azure コスト見積もり

azure-cost-calculator

Azureの利用料金を見積もり、リソースの規模や価格帯を比較検討し、予算策定を支援することで、Azure導入や運用にかかるコストを把握しやすくするSkill。

📜 元の英語説明(参考)

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

🇯🇵 日本人クリエイター向け解説

一言でいうと

Azureの利用料金を見積もり、リソースの規模や価格帯を比較検討し、予算策定を支援することで、Azure導入や運用にかかるコストを把握しやすくするSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o azure-cost-calculator.zip https://jpskill.com/download/10655.zip && unzip -o azure-cost-calculator.zip && rm azure-cost-calculator.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/10655.zip -OutFile "$d\azure-cost-calculator.zip"; Expand-Archive "$d\azure-cost-calculator.zip" -DestinationPath $d -Force; ri "$d\azure-cost-calculator.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して azure-cost-calculator.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → azure-cost-calculator フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

Azure Cost Calculator

パブリックな Retail Prices API を使用して、決定論的な Azure のコスト見積もりを行います。価格を推測するのではなく、スクリプトを介して常にライブ API にクエリを実行してください。

ランタイムの検出

利用可能なものに基づいて、スクリプトのランタイムを選択します。

ランタイム 条件 価格スクリプト 探索スクリプト
Bash(推奨) curljq が利用可能 scripts/get-azure-pricing.sh scripts/explore-azure-pricing.sh
PowerShell pwsh が利用可能 scripts/Get-AzurePricing.ps1 scripts/Explore-AzurePricing.ps1

どちらも同一の JSON 出力を生成します。macOS/Linux では Bash を使用し、Windows または pwsh が利用可能な場合は PowerShell を使用します。

Bash のフラグは、PowerShell の -PascalCase パラメータに対応する --kebab-case を使用します (例: -ServiceName--service-name)。フラグの完全なリストについては、./scripts/get-azure-pricing.sh --help を実行してください。

宣言的なパラメータ

サービス参照ファイルは、クエリパラメータを Key: Value ペアとして指定します。クエリを実行するには、各パラメータを検出されたランタイムの構文に変換します。

  • Bash: --kebab-case フラグ (例: ServiceName: Virtual Machines--service-name 'Virtual Machines')
  • PowerShell: -PascalCase フラグ (例: ServiceName: Virtual Machines-ServiceName 'Virtual Machines')

スペースを含む文字列値は、スクリプトに渡す際に引用符で囲む必要があります。数値 (Quantity, InstanceCount) は不要です。

ワークフロー

  1. ユーザーが見積もりたいリソースタイプを特定します。
  2. サービス参照を見つけます。 a. ファイル検索references/services/**/*<keyword>*.md に一致するファイルを検索します (例: "Cosmos DB" → services/**/cosmos*.md) b. カテゴリ参照 — 検索で 0 件の結果が返された場合、または結果が曖昧な場合は、references/shared.md のカテゴリインデックスを読み、一致するカテゴリディレクトリをリストします。 c. 広範な検索references/services/**/*.md をリストまたは検索して、利用可能なすべてのファイルを表示します。 d. 発見 — ファイルが存在しない場合は、探索スクリプトを使用して API でサービスを見つけます。
  3. クエリパラメータ、コスト計算式、および正確な serviceName について、一致するサービスファイルのみを読みます。
  4. サービス参照からのパラメータを使用して、価格スクリプトを実行します (適切なランタイムを使用します)。
  5. 内訳 (単価、乗数、月額費用、前提条件) を含む見積もりを提示します。

参照インデックス (オンデマンドでロード)

条件 読み取り
常に (エントリポイント) references/shared.md — 定数、カテゴリインデックス、エイリアスルックアップ
クエリが 0 件の結果または誤ったデータを返した場合 references/pitfalls.md — トラブルシューティングと落とし穴
ユーザーが Reserved Instances または Savings Plans について質問した場合 references/reserved-instances.md
USD 以外の通貨または eastus 以外のリージョン references/regions-and-currencies.md
カテゴリインデックス + ファイル検索の両方が失敗した場合 references/service-routing.md — 完全な 140 以上のサービスマップ
スクリプトの初回実行時、またはパラメータに慣れていない場合 references/workflow.md — スクリプトパラメータと出力形式

重要なルール

  1. 価格を推測しないでください — 常にライブ API に対してスクリプトを実行してください。
  2. フィルタ値は大文字と小文字を区別します — サービス参照ファイルからの正確な値を使用してください。
  3. 通貨とリージョンをユーザーコンテキストから推測します — 指定されていない場合は、ユーザーに尋ねるか、デフォルトで USD と eastus に設定します。API は、-Currency パラメータを介して、すべての主要通貨 (USD, AUD, EUR, GBP, JPY, CAD, INR など) をサポートしています。
  4. 前提条件を明記します — 常にリージョン、OS、コミットメントタイプ、インスタンス数を宣言してください。
  5. 仮定する前に尋ねてください — 必要なパラメータが曖昧または欠落している場合 (階層、SKU、数量、通貨、ノード数、トラフィック量)、処理を停止し、続行する前にユーザーに尋ねてください。デフォルトを黙って選択しないでください。唯一の例外は、サービス参照ファイルで定義されている定数 (必須のデフォルト CU 数など) です — これらは事前に承認されたデフォルトです。
  6. デフォルトの出力形式は Json です — Summary (エージェントには見えません) を使用しないでください。
  7. サービス参照を遅延ロードします — ユーザーのクエリで直接必要な references/services/ からのファイルのみを読み取ります。すべてのサービスファイルを一括読み取りしないでください。ファイル検索ワークフロー (ステップ 2) を使用して、特定のファイルを見つけます。ユーザーが App Service と SQL Database について質問した場合は、それぞれを検索し、それらのファイルのみを読み取ります — 他の 20 以上のファイルは読み取らないでください。
  8. PowerShell: pwsh -Command ではなく pwsh -File を使用します — Linux/macOS では、bash はインラインコマンドから OData 引用符を削除します。常に pwsh -File scripts/Get-AzurePricing.ps1 ... を使用してください。Bash スクリプトの場合は、直接呼び出します: ./scripts/get-azure-pricing.sh ...

普遍的な落とし穴

これらの 4 つの落とし穴は、すべてのクエリに適用されます — スキップしないでください。

  1. serviceName とすべてのフィルタ値は大文字と小文字を区別します — 常にサービス参照ファイルからの正確な値を使用してください。ポータル/ドキュメント名から推測しないでください。
  2. フィルタリングされていないクエリは、混合された SKU バリアントを返しますproductName/skuName フィルタがない場合、結果はスポット、低優先度、および OS バリアントを混在させます。常に必要な特定のバリアントにフィルタリングしてください。
  3. マルチメーターリソースには個別のクエリが必要です — 多くのリソースには、複数のコストコンポーネント (コンピューティング + ストレージ、固定 + 可変) があります。-MeterName を使用して、メーターごとに 1 つのクエリを実行します。
  4. Write-Host の出力はエージェントには見えません — 常に -OutputFormat Json (デフォルト) を使用してください。Summary は絶対に使用しないでください。

(原文はここで切り詰められています)

📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

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 pwsh available scripts/Get-AzurePricing.ps1 scripts/Explore-AzurePricing.ps1

Both produce identical JSON output. Use Bash on macOS/Linux; use PowerShell on Windows or when pwsh is available.

Bash flags use --kebab-case equivalents of PowerShell -PascalCase parameters (e.g., -ServiceName--service-name). Run ./scripts/get-azure-pricing.sh --help for the full flag list.

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

  1. Identify the resource type(s) the user wants to estimate
  2. Locate the service reference: a. File search — search for files matching references/services/**/*<keyword>*.md (e.g., "Cosmos DB" → services/**/cosmos*.md) b. Category browse — if search returns 0 or ambiguous results, read the category index in references/shared.md and list the matching category directory c. Broad search — list or search references/services/**/*.md to see all available files d. Discovery — if no file exists, use the explore script to find the service in the API
  3. Read only the matching service file(s) for query parameters, cost formula, and the exact serviceName
  4. Run the pricing script with the parameters from the service reference (use the appropriate runtime)
  5. Present the estimate with breakdown: unit price, multiplier, monthly cost, assumptions

Reference Index (load on demand)

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
Category Index + file search both failed references/service-routing.md — full 140+ service map
First time running scripts or unfamiliar with parameters references/workflow.md — script parameters and output formats

Critical Rules

  1. Never guess prices — always run the script against the live API
  2. Filter values are case-sensitive — use exact values from the service reference file
  3. Infer currency and region from user context — if unspecified, ask the user or default to USD and eastus. The API supports all major currencies (USD, AUD, EUR, GBP, JPY, CAD, INR, etc.) via the -Currency parameter.
  4. State assumptions — always declare: region, OS, commitment type, instance count
  5. Ask before assuming — if a required parameter is ambiguous or missing (tier, SKU, quantity, currency, node count, traffic volume), stop and ask the user before proceeding. Do not silently pick a default. The only exceptions are constants defined in service reference files (e.g., mandatory default CU counts) — those are pre-approved defaults.
  6. Default output format is Json — do not use Summary (invisible to agents)
  7. Lazy-load service references — only read files from references/services/ that are directly required by the user's query. Never bulk-read all service files. Use the file-search workflow (Step 2) to locate the specific file(s). If the user asks about App Service and SQL Database, search for each and read only those files — not the other 20+.
  8. PowerShell: use pwsh -File, not pwsh -Command — on Linux/macOS, bash strips OData quotes from inline commands. Always use pwsh -File scripts/Get-AzurePricing.ps1 .... For Bash scripts, invoke directly: ./scripts/get-azure-pricing.sh ....

Universal Traps

These 4 traps apply to EVERY query — do not skip them:

  1. serviceName and all filter values are case-sensitive — always use exact values from the service reference file. Never guess from portal/docs names.
  2. Unfiltered queries return mixed SKU variants — without productName/skuName filters, results mix Spot, Low Priority, and OS variants. Always filter to the specific variant needed.
  3. Multi-meter resources need separate queries — many resources have multiple cost components (compute + storage, fixed + variable). Run one query per meter with -MeterName.
  4. Write-Host output is invisible to agents — always use -OutputFormat Json (the default). Never use Summary format.

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. These lines contain: YAML front matter, primary cost description, trap warning, and the first (most common) query pattern.
  2. Full read triggers — only read the full service file if:
    • The partial read does not contain a usable query pattern
    • The user requests a non-default tier, SKU, or configuration
    • The service has complex multi-meter billing that needs the full meter table
    • The query returns 0 or unexpected results
  3. Parallel queries — run pricing script calls in parallel where possible. Independent services have no query dependencies.
  4. Skip redundant references — do not re-read shared.md or pitfalls.md between services. Read them once at the start.