Skip to main content
skill

preset — Claude Code skill for Azure OpenAI deployment

This skill checks Azure OpenAI capacity in the project’s region and looks elsewhere when needed. Use it to choose a model and deploy it.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add microsoft/skills --skill preset -a claude-code
Open on GitHub

What preset does

The skill checks Azure sign-in and the project resource, lists available models, then tests capacity in the current region. If capacity is unavailable, it queries other regions and lets you choose a region and project. It can also create a project.

Deployments use the GlobalStandard SKU. The skill calculates capacity and monitors deployment progress. You need Azure CLI configured for sign-in, an active subscription with Cognitive Services read and create permissions, and a Microsoft Foundry project resource ID, supplied through PROJECT_RESOURCE_ID or interactively. Without those permissions, project checks or deployment creation will fail.

What it helps with

  • check model capacity in the project’s region
  • find another region with Azure OpenAI capacity
  • choose a model and version for deployment
  • create a Microsoft Foundry project in a selected region
  • track a model deployment’s status

Example prompts for the agent

  • Deploy the chosen Azure OpenAI model in my project’s region.
  • Check other regions and show where this model has capacity.
  • Create a project in the selected region and deploy with GlobalStandard.

How to install preset

1Skills CLI (Vercel)

npx skills add microsoft/skills --skill preset -a claude-code

2Manually: put the files in place

~/.claude/skills/preset/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/preset/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about preset

How do I install preset in Claude Code?

Run npx skills add microsoft/skills --skill preset -a claude-code, then use ~/.claude/skills/preset/SKILL.md.

What does preset do?

It checks Azure OpenAI capacity in the project’s region and searches other regions if capacity is unavailable. You can then choose a region and project before starting deployment.

What does preset require?

You need Azure CLI configured for sign-in, an active subscription with Cognitive Services read and create permissions, and a Microsoft Foundry project resource ID. Provide the ID through PROJECT_RESOURCE_ID or enter it when prompted.

Source text

SKILL.md · MIT
---
name: preset
description: "Intelligently deploys Azure OpenAI models to optimal regions by analyzing capacity across all available regions. Automatically checks current region first and shows alternatives if needed. USE FOR: quick deployment, optimal region, best region, automatic region selection, fast setup, multi-region capacity check, high availability deployment, deploy to best location. DO NOT USE FOR: custom SKU selection (use customize), specific version selection (use customize), custom capacity configuration (use customize), PTU deployments (use customize)."
license: MIT
metadata:
  author: Microsoft
  version: "1.0.1"
---

# Deploy Model to Optimal Region

Automates intelligent Azure OpenAI model deployment by checking capacity across regions and deploying to the best available option.

## What This Skill Does

1. Verifies Azure authentication and project scope
2. Checks capacity in current project's region
3. If no capacity: analyzes all regions and shows available alternatives
4. Filters projects by selected region
5. Supports creating new projects if needed
6. Deploys model with GlobalStandard SKU
7. Monitors deployment progress

## Prerequisites

- Azure CLI installed and configured
- Active Azure subscription with Cognitive Services read/create permissions
- Microsoft Foundry project resource ID (`PROJECT_RESOURCE_ID` env var or provided interactively)
  - Format: `/subscriptions/{sub-id}/resourceGroups/{rg}/providers/Microsoft.CognitiveServices/accounts/{account}/projects/{project}`
  - Found in: Microsoft Foundry portal → Project → Overview → Resource ID

## Quick Workflow

### Fast Path (Current Region Has Capacity)
```
1. Check authentication → 2. Get project → 3. Check current region capacity
→ 4. Deploy immediately
```

### Alternative Region Path (No Capacity)
```
1. Check authentication → 2. Get project → 3. Check current region (no capacity)
→ 4. Query all regions → 5. Show alternatives → 6. Select region + project
→ 7. Deploy
```

---

## Deployment Phases

| Phase | Action | Key Commands |
|-------|--------|-------------|
| 1. Verify Auth | Check Azure CLI login and subscription | `az account show`, `az login` |
| 2. Get Project | Parse `PROJECT_RESOURCE_ID` ARM ID, verify exists | `az cognitiveservices account show` |
| 3. Get Model | List available models, user selects model + version | `az cognitiveservices account list-models` |
| 4. Check Current Region | Query capacity using GlobalStandard SKU | `az rest --method GET .../modelCapacities` |
| 5. Multi-Region Query | If no local capacity, query all regions | Same capacity API without location filter |
| 6. Select Region + Project | User picks region; find or create project | `az cognitiveservices account list`, `az cognitiveservices account create` |
| 7. Deploy | Generate unique name, calculate capacity (50% available, min 50 TPM), create deployment | `az cognitiveservices account deployment create` |

For detailed step-by-step instructions, see [workflow reference](references/workflow.md).

---

## Error Handling

| Error | Symptom | Resolution |
|-------|---------|------------|
| Auth failure | `az account show` returns error | Run `az login` then `az account set --subscription <id>` |
| No quota | All regions show 0 capacity | Defer to the [quota skill](../../../quota/quota.md) for increase requests and troubleshooting; check existing deployments; try alternative models |
| Model not found | Empty capacity list | Verify model name with `az cognitiveservices account list-models`; check case sensitivity |
| Name conflict | "deployment already exists" | Append suffix to deployment name (handled automatically by `generate_deployment_name` script) |
| Region unavailable | Region doesn't support model | Select a different region from the available list |
| Permission denied | "Forbidden" or "Unauthorized" | Verify Cognitive Services Contributor role: `az role assignment list --assignee <user>` |

---

## Advanced Usage

```bash
# Custom capacity
az cognitiveservices account deployment create ... --sku-capacity <value>

# Check deployment status
az cognitiveservices account deployment show --name <acct> --resource-group <rg> --deployment-name <name> --query "{Status:properties.provisioningState}"

# Delete deployment
az cognitiveservices account deployment delete --name <acct> --resource-group <rg> --deployment-name <name>
```

## Notes

- **SKU:** GlobalStandard only — **API Version:** 2024-10-01 (GA stable)

---

## Related Skills

- **microsoft-foundry** - Parent skill for Microsoft Foundry operations
- **[quota](../../../quota/quota.md)** — For quota viewing, increase requests, and troubleshooting quota errors, defer to this skill
- **azure-quick-review** - Review Azure resources for compliance
- **cost-estimation** - Estimate costs through the separately installed `azure-cost` plugin
- **azure-validate** - Validate Azure infrastructure before deployment

© Microsoft · MIT · microsoft/skills

Similar skills

All skills for Cloud: AWS, Azure, GCP →

From the same set143

The whole set →
llms Writes llms.txt and llms-full.txt from your project wiki: a short link index plus a full version with page text inlined. ★ 3,149repo stars crisp Builds a short wiki for the current repository and scaffolds a VitePress site. Useful when docs are needed now and a long build is not. ★ 3,149repo stars build The build command from the Deep Wiki set turns finished markdown wiki pages into a VitePress project. Dark theme, Mermaid diagrams rendered for dark mode, click-to-zoom on diagrams and images. ★ 3,149repo stars wiki-architect Reads a codebase and lays out a hierarchical documentation catalogue, each item tied to a file and line. On request it adds four onboarding guides. ★ 3,149repo stars customize Walks you through deploying an Azure OpenAI model step by step: version, SKU, capacity, RAI policy and advanced options. Useful when you need exact control over the config. ★ 3,149repo stars finetuning A skill that walks through model fine-tuning on Microsoft Foundry: dataset prep, job submission, deployment, evaluation. Useful when the base model's behaviour does not fit. ★ 3,149repo stars azure-kubernetes-automatic-readiness Checks Kubernetes workloads and cluster config against AKS Automatic rules, flags migration blockers and drafts fixes as diffs. ★ 3,149repo stars azure-enterprise-infra-planner The skill plans enterprise Azure infrastructure from a workload description and generates Bicep or Terraform. Useful when you need a landing zone, hub-spoke network or DR topology. ★ 3,149repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor