agentleFS
timothywarner-orgtimothywarner-org/claude-code/.claude/skills/azure-ai-deploy/SKILL.md

azure-ai-deploy

Skill223 starsChanged 4 months agoMITView on GitHub

Ship a Python generative-AI app to Azure the keyless way, using DefaultAzureCredential and azd. Use when deploying a Python GenAI service, wiring an Azure OpenAI client without API keys, provisioning managed identity for Azure compute, running a pre-deploy gate, or building an azure.yaml for a container app. Triggers on "deploy to Azure", "keyless Azure OpenAI", "DefaultAzureCredential", "azd provision", "managed identity", "no API keys in code".

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read resources/references/AZURE-AUTH.md.

    line 21
  2. Very specific:

    Read resources/references/DEPLOY-CHECKLIST.md and clear every gate: evals passed, secrets stored in Azure Key Vault, then azd provision …

    line 47

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Ship a Python GenAI app to Azure (keyless)

This skill deploys a Python generative-AI service to Azure with no API keys in source. Authentication is via Microsoft Entra ID token (DefaultAzureCredential) locally and managed identity on Azure compute. Deployment runs through azd (Azure Developer CLI), which provisions and deploys in one workflow.

When to reach for this

  • You have a Python GenAI app (chat, RAG, agent) that calls Azure OpenAI and you want it in Azure.
  • You want the keyless pattern so no secret is stored in code, config, or environment.
  • You need a repeatable pre-deploy gate before a live class or a production push.

Workflow

1. Read the auth pattern first

Read resources/references/AZURE-AUTH.md. It covers why keys stay out of code, how DefaultAzureCredential resolves an identity across local and cloud, and which RBAC role the app identity needs on the Azure OpenAI resource.

2. Scaffold the client and config

Copy the templates into the target project and edit for the real service:

  • resources/templates/chat_client.py - keyless Azure OpenAI client. Reads endpoint and deployment from env vars. No key.
  • resources/templates/azure.yaml - minimal azd config for a Python container app.

3. Set required environment

The app reads two values from the process environment, never from hardcoded strings:

  • AZURE_OPENAI_ENDPOINT - the resource endpoint, for example https://contoso-aoai.openai.azure.com/
  • AZURE_OPENAI_DEPLOYMENT - the model deployment name, for example gpt-4o-chat

4. Run preflight

uv run python ${CLAUDE_SKILL_DIR}/resources/scripts/preflight.py

The script verifies both env vars are set and non-empty. It exits non-zero when a value is missing, so it fails a CI step before any provisioning starts.

5. Work the deploy checklist

Read resources/references/DEPLOY-CHECKLIST.md and clear every gate: evals passed, secrets stored in Azure Key Vault, then azd provision followed by azd deploy.

Conventions

  • uv manages Python, not pip. Run scripts with uv run.
  • No key strings. The client uses azure_ad_token_provider, never api_key.
  • Least privilege. Grant the app identity the Cognitive Services OpenAI User role, nothing broader.
  • Azure only. This skill targets Azure services end to end.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.