Install any skill in seconds. Free to start, no credit card required.
Get Started Free →microsoft/azure-ai-ml-py
Azure Machine Learning SDK v2 for Python.
Passed 21 of 22 test cases with the skill, and 12 of 22 without it.
and 5 more in the full report
9 fixed12 passed either way1 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 9 test cases the skill fixed. Same model, same prompt, with and without the skill.
Write a Python snippet to provision an Azure ML compute cluster named 'cpu-cluster' with Standard_DS3_v2 machines scaling from 0 to 4 instances. Set it to scale down after 2 minutes of inactivity.
| Checked | Without skill | With skill |
|---|---|---|
| Sets idle_time_before_scale_down to 120 | Passed | Passed |
| Calls ml_client.compute.begin_create_or_update within an MLClient context manager block | Missed | Passed |
The instructions your model reads when the skill loads.
Client library for managing Azure ML resources: workspaces, jobs, models, data, and compute.
pip install azure-ai-ml
AZURE_SUBSCRIPTION_ID=<your-subscription-id> # Required for all auth methods
AZURE_RESOURCE_GROUP=<your-resource-group> # Required for all auth methods
AZURE_ML_WORKSPACE_NAME=<your-workspace-name> # Required for all auth methods
AZURE_TOKEN_CREDENTIALS=prod # Required only if DefaultAzureCredential is used in production
🔑 Two rules apply to every code sample below:
- Prefer
DefaultAzureCredential. It works locally (Azure CLI / VS Code / Developer CLI) and in Azure (managed identity, workload identity) with no code change. Avoid connection strings, account/API keys — they bypass Entra audit and rotation.
- Local dev:
DefaultAzureCredentialworks as-is.- Production: set
AZURE_TOKEN_CREDENTIALS=prod(orAZURE_TOKEN_CREDENTIALS=<specific_credential>) to constrain the credential chain to production-safe credentials.- Wrap every client in a context manager so HTTP transports, sockets, and token caches are released deterministically:
- Sync:
with <Client>(...) as client:- Async:
async with <Client>(...) as client:andasync with DefaultAzureCredential() as credential:(fromazure.identity.aio)Snippets may abbreviate this setup, but production code should always follow both rules.
from azure.ai.ml import MLClient
from azure.identity import DefaultAzureCredential, ManagedIdentityCredential
import os
# Local dev: DefaultAzureCredential. Production: set AZURE_TOKEN_CREDENTIALS=prod or AZURE_TOKEN_CREDENTIALS=<specific_credential>
credential = DefaultAzureCredential(require_envvar=True)
# Or use a specific credential directly in production:
test cases passed, vs 12 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.