DevOps & CloudOfficial · microsoft

Preset skill for Claude

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.

When Claude uses it

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

Preset SKILL.md

The full skill file from microsoft/skills (MIT).

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

PhaseActionKey Commands
1. Verify AuthCheck Azure CLI login and subscriptionaz account show, az login
2. Get ProjectParse PROJECT_RESOURCE_ID ARM ID, verify existsaz cognitiveservices account show
3. Get ModelList available models, user selects model + versionaz cognitiveservices account list-models
4. Check Current RegionQuery capacity using GlobalStandard SKUaz rest --method GET .../modelCapacities
5. Multi-Region QueryIf no local capacity, query all regionsSame capacity API without location filter
6. Select Region + ProjectUser picks region; find or create projectaz cognitiveservices account list, az cognitiveservices account create
7. DeployGenerate unique name, calculate capacity (50% available, min 50 TPM), create deploymentaz cognitiveservices account deployment create

For detailed step-by-step instructions, see workflow reference.


Error Handling

ErrorSymptomResolution
Auth failureaz account show returns errorRun az login then az account set --subscription <id>
No quotaAll regions show 0 capacityDefer to the quota skill for increase requests and troubleshooting; check existing deployments; try alternative models
Model not foundEmpty capacity listVerify 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 unavailableRegion doesn't support modelSelect 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

# 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 — 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

How to install Preset

Claude Code

Copy the skill into your personal skills folder (or into .claude/skills/ inside a project):

npx degit microsoft/skills/.github/plugins/azure-skills/skills/microsoft-foundry/models/deploy-model/preset#main ~/.claude/skills/preset

Codex

npx degit microsoft/skills/.github/plugins/azure-skills/skills/microsoft-foundry/models/deploy-model/preset#main ~/.codex/skills/preset

Claude.ai and Claude Desktop

Download the skill folder from GitHub, zip it, and upload it under Settings → Capabilities → Skills.

Frequently asked questions

+What does the Preset skill do?

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

+How do I install Preset in Claude Code?

Copy the skill folder into ~/.claude/skills/preset, for example with "npx degit microsoft/skills/.github/plugins/azure-skills/skills/microsoft-foundry/models/deploy-model/preset#main ~/.claude/skills/preset". Claude Code loads it automatically and uses it when a task matches.

+Does Preset work with ChatGPT or Codex?

Yes. Preset uses the open SKILL.md format. In Codex, put the folder in ~/.codex/skills/preset. In Claude.ai, zip the folder and upload it under Settings → Capabilities → Skills.

+Is Preset free?

Preset is published on GitHub by microsoft under the MIT license, which allows free use.

Related devops & cloud skills

  1. Supabase

    Official

    Use when doing ANY task involving Supabase. Triggers: Supabase products (Database, Auth, Edge Functions, Realtime, Storage, Vectors, Cron,…

    supabase/agent-skills★ 3.1k
  2. Senior Architect

    System architecture decisions with a written rationale: monolith vs microservices, database choice, scaling limits, ADRs, Mermaid diagrams.

    alirezarezvani/claude-skills★ 30k
  3. Vercel Deploy

    Official

    Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the…

    openai/skills★ 29k
  4. Python Appservice Deploy

    Official

    Deploy Python (Flask/Django/FastAPI) code to Azure App Service Linux.

    microsoft/skills★ 3.2k
  5. Slack To Teams

    Official

    Sub-skill of microsoft-365-agents-toolkit. Routed expert system with 100+ micro-expert files for migrating Slack bots to Teams,…

    microsoft/skills★ 3.2k
  6. Troubleshoot Observability

    Official

    Coordinate Azure observability troubleshooting for application or agent health, runtime failures, operational latency, telemetry,…

    microsoft/skills★ 3.2k
  7. Verify Observability Fix

    Official

    Verify operational incident recovery for Azure web/API or Foundry agents after an actual approved change, using supplied…

    microsoft/skills★ 3.2k
  8. Wiki Ado Convert

    Official

    Converts VitePress/GFM wiki markdown to Azure DevOps Wiki-compatible format.

    microsoft/skills★ 3.2k
  9. Browse Local Sentry

    Official

    Connects an agent's browser to a local Sentry dev server (dev-ui on *.dev.getsentry.net or the full devserver).

    getsentry/skills★ 1.2k

See all devops & cloud skills →

More skills from microsoft

  1. Pydantic Models Py

    Official

    Create Pydantic models following the multi-model pattern with Base, Create, Update, Response, and InDB variants.

    microsoft/skills★ 3.2k
  2. React Flow Node Ts

    Official

    Create React Flow node components with TypeScript types, handles, and Zustand integration.

    microsoft/skills★ 3.2k

All skills by microsoft →

Give your whole team an AI agent with skills

Cody runs managed AI agents your team can message in Slack, Teams, WhatsApp and the web, with 50+ business integrations, scheduled tasks and memory. No terminal required.