by microsoft
此技能根据工作负载需求、性能需求和预算限制推荐 Azure 虚拟机大小和 VM Scale Set 配置。它查询公共 Azure 零售价格 API 以提供成本估算,无需 Azure 订阅。
1. 打开 Claude 聊天界面
2. 点击下方 "📋 复制" 按钮
3. 粘贴到 Claude 聊天框中并发送
4. 输入 "使用 azure-compute 技能" 开始使用
=== azure-compute 技能 === 作者: microsoft 描述: 此技能根据工作负载需求、性能需求和预算限制推荐 Azure 虚拟机大小和 VM Scale Set 配置。它查询公共 Azure 零售价格 API 以提供成本估算,无需 Azure 订阅。 使用方法: 1. 调用技能: "使用 azure-compute 技能" 2. 提供相关信息: 根据技能要求提供必要参数 3. 查看结果: 技能会返回处理结果 示例: "使用 azure-compute 技能,帮我分析一下这段代码"
这种方法适用于所有 Claude 用户,不需要安装额外工具。
devops
safe
Recommend Azure VM sizes, VM Scale Sets (VMSS), and configurations by analyzing workload type, performance requirements, scaling needs, and budget. No Azure subscription required — all data comes from public Microsoft documentation and the unauthenticated Retail Prices API.
Use reference files for initial filtering
CRITICAL: then always verify with live documentation from learn.microsoft.com before making final recommendations. If
web_fetchfails, use reference files as fallback but warn the user the information may be stale.
Ask the user for (infer when possible):
| Requirement | Examples |
|---|---|
| Workload type | Web server, relational DB, ML training, batch processing, dev/test |
| vCPU / RAM needs | "4 cores, 16 GB RAM" or "lightweight" / "heavy" |
| GPU needed? | Yes → GPU families; No → general/compute/memory |
| Storage needs | High IOPS, large temp disk, premium SSD |
| Budget priority | Cost-sensitive, performance-first, balanced |
| OS | Linux or Windows (affects pricing) |
| Region | Affects availability and price |
| Instance count | Single instance, fixed count, or variable/dynamic |
| Scaling needs | None, manual scaling, autoscale based on metrics or schedule |
| Availability needs | Best-effort, fault-domain isolation, cross-zone HA |
| Load balancing | Not needed, Azure Load Balancer (L4), Application Gateway (L7) |
Workflow:
web_fetch https://learn.microsoft.com/en-us/azure/virtual-machine-scale-sets/overview
web_fetch https://learn.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-autoscale-overview
web_fetch fails, proceed with reference file guidance but include this warning:
Unable to verify against latest Azure documentation. Recommendation based on reference material that may not reflect recent updates.
Needs autoscaling?
├─ Yes → VMSS
├─ No
│ ├─ Multiple identical instances needed?
│ │ ├─ Yes → VMSS
│ │ └─ No
│ │ ├─ High availability across fault domains / zones?
│ │ │ ├─ Yes, many instances → VMSS
│ │ │ └─ Yes, 1-2 instances → VM + Availability Zone
│ │ └─ Single instance sufficient? → VM
| Signal | Recommendation | Why |
|---|---|---|
| Autoscale on CPU, memory, or schedule | VMSS | Built-in autoscale; no custom automation needed |
| Stateless web/API tier behind a load balancer | VMSS | Homogeneous fleet with automatic distribution |
| Batch / parallel processing across many nodes | VMSS | Scale out on demand, scale to zero when idle |
| Mixed VM sizes in one group | VMSS (Flexible) | Flexible orchestration supports mixed SKUs |
| Single long-lived server (jumpbox, AD DC) | VM | No scaling benefit; simpler management |
| Unique per-instance config required | VM | Scale sets assume homogeneous configuration |
| Stateful workload, tightly-coupled cluster | VM (or VMSS case-by-case) | Evaluate carefully; VMSS Flexible can work for some stateful patterns |
Warning: If the user is unsure, default to single VM for simplicity. Recommend VMSS only when scaling, HA, or fleet management is clearly needed.
Workflow:
Review VM Family Guide to identify 2-3 candidate VM families that match the workload requirements
REQUIRED: verify specifications for your chosen candidates by fetching current documentation:
web_fetch https://learn.microsoft.com/en-us/azure/virtual-machines/sizes/<family-category>/<series-name>
Examples:
https://learn.microsoft.com/en-us/azure/virtual-machines/sizes/general-purpose/b-familyhttps://learn.microsoft.com/en-us/azure/virtual-machines/sizes/general-purpose/ddsv5-serieshttps://learn.microsoft.com/en-us/azure/virtual-machines/sizes/gpu-accelerated/nc-familyIf considering Spot VMs, also fetch:
web_fetch https://learn.microsoft.com/en-us/azure/virtual-machine-scale-sets/use-spot
If web_fetch fails, proceed with reference file guidance but include this warning:
Unable to verify against latest Azure documentation. Recommendation based on reference material that may not reflect recent updates or limitations (e.g., Spot VM compatibility).
This step applies to both single VMs and VMSS since scale sets use the same VM SKUs.
Query the Azure Retail Prices API — Retail Prices API Guide
Tip: VMSS has no extra charge — pricing is per-VM instance. Use the same VM pricing from the API and multiply by the expected instance count to estimate VMSS cost. For autoscaling workloads, estimate cost at both the minimum and maximum instance count.
Provide 2–3 options with trade-offs:
| Column | Purpose |
|---|---|
| Hosting Model | VM or VMSS (with orchestration mode if VMSS) |
| VM Size | ARM SKU name (e.g., Standard_D4s_v5) |
| vCPUs / RAM | Core specs |
| Instance Count | 1 for VM; min–max range for VMSS with autoscale |
| Estimated $/hr | Per-instance pay-as-you-go from API |
| Why | Fit for the workload |
| Trade-off | What the user gives up |
Tip: Always explain why a family fits and what the user trades off (cost vs cores, burstable vs dedicated, single VM simplicity vs VMSS scalability, etc.).
For VMSS recommendations, also mention:
priceType eq 'Reservation')| Scenario | Action |
|---|---|
| API returns empty results | Broaden filters — check armRegionName, serviceName, armSkuName spelling |
| User unsure of workload type | Ask clarifying questions; default to General Purpose D-series |
| Region not specified | Use eastus as default; note prices vary by region |
| Unclear if VM or VMSS needed | Ask about scaling and instance count; default to single VM if unsure |
| User asks VMSS pricing directly | Use same VM pricing API — VMSS has no extra charge; multiply by instance count |
View Count
0
Download Count
0
Favorite Count
0
Quality Score
74