ricmmartins/azure-sre-agent-skills/08-ai-foundry-posture
Claude Code and agent skill by ricmmartins/azure-sre-agent-skills
- community
Checking that the SKILL.md file is still in the repository.
Assess security, reliability, and cost posture of Azure OpenAI and Microsoft Foundry deployments. Detects critical anti-patterns: API keys instead of Managed Identity, public endpoints without firewall, disabled content filtering, missing diagnostic settings, deprecated model versions, over-provisioned PTU, absence of AI Gateway (APIM) for rate limiting, shared dev/prod deployments, quota exhaustion risk, 429 throttling rates, runaway token consumption, and single-region deployment. Use when asked about AI workload security, OpenAI best practices, Foundry health check, model deployment review, AI cost optimization, quota monitoring, or throttling analysis.
Install
npx vskill@latest install ricmmartins/azure-sre-agent-skills/08-ai-foundry-postureSKILL.md
AI Foundry & OpenAI Posture Check
Purpose
Assess the security, reliability, and cost efficiency of Azure OpenAI and Microsoft Foundry deployments. Detects the most common anti-patterns that startups make when building AI-powered products — from exposed endpoints to runaway token costs.
Based on the Azure Well-Architected Framework for AI workloads and Microsoft Foundry operational best practices.
When to use this skill
- User asks "is our OpenAI deployment secure?"
- User asks about AI cost optimization or token consumption
- Review before going to production with an AI feature
- User asks about content filtering, model versions, or rate limiting
- Periodic AI workload health check
Pre-check
Confirm with the user:
- Which Azure OpenAI / Cognitive Services accounts to assess (or "all in subscription")
- Whether they use PTU (Provisioned Throughput) or Standard deployments
- Whether they have production AI workloads already live
Assessment procedure
Step 0: Discover AI resources
If no results, try:
If no Cognitive Services accounts exist, report "No Azure OpenAI or AI Foundry resources found" and end assessment.
For each account found, run the following checks:
🔐 CATEGORY 1 — Security (Critical)
Check 1.1 — Managed Identity enabled (not API keys only)
| Finding | Severity | Score | |
|---|---|---|---|
identity.type = SystemAssigned/UserAssigned AND disableLocalAuth = true | ✅ Pass | 12 pts | |
identity.type set but disableLocalAuth = false | ⚠️ Partial | 6 pts | |
identity.type = None or null | ❌ Fail | 0 pts |
📖 https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/managed-identity
Check 1.2 — Network isolation (firewall or private endpoint)
| Finding | Severity | Score | |
|---|---|---|---|
publicNetworkAccess = Disabled + private endpoints exist | ✅ Pass | 13 pts | |
defaultAction = Deny + IP/VNet rules configured | ✅ Pass | 13 pts | |
defaultAction = Allow (open to internet) | ❌ Fail | 0 pts |
📖 https://learn.microsoft.com/en-us/azure/ai-services/cognitive-services-virtual-networks
Check 1.3 — Content filtering (RAI policies)
Then check deployments have a policy assigned:
| Finding | Severity | Score | |
|---|---|---|---|
| All deployments have RAI policy assigned with filters enabled | ✅ Pass | 10 pts | |
| Some deployments missing policy or using minimal filters | ⚠️ Partial | 5 pts | |
| No RAI policies or content filtering disabled | ❌ Fail | 0 pts |
📖 https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/content-filters
⚙️ CATEGORY 2 — Reliability & Operations
Check 2.1 — Model version pinned and not deprecated
Cross-reference with available models:
| Finding | Severity | Score | |
|---|---|---|---|
| All deployments on GA versions with explicit version pinned | ✅ Pass | 7 pts | |
| Deployments on versions nearing retirement (< 3 months) | ⚠️ Attention | 3 pts | |
| Deployments on Legacy/Deprecated versions | ❌ Fail | 0 pts |
📖 https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/model-retirements
Check 2.2 — Diagnostic settings enabled
| Finding | Severity | Score | |
|---|---|---|---|
| Diagnostic settings sending RequestResponse + Audit to Log Analytics | ✅ Pass | 7 pts | |
| Diagnostic settings exist but incomplete (only metrics, no logs) | ⚠️ Partial | 3 pts | |
| No diagnostic settings at all | ❌ Fail | 0 pts |
📖 https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/monitoring
Check 2.3 — Resource Lock on production account
| Finding | Severity | Score | |
|---|---|---|---|
| CanNotDelete lock exists on the OpenAI account | ✅ Pass | 5 pts | |
| Lock exists on RG but not specifically on account | ⚠️ Partial | 3 pts | |
| No locks | ❌ Fail | 0 pts |
📖 https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/lock-resources
Check 2.4 — Multi-region resilience (failover capability)
Check if OpenAI accounts exist in more than one region (disaster recovery / latency optimization):
Group by location and count unique regions:
| Finding | Severity | Score | |
|---|---|---|---|
| OpenAI accounts in 2+ different regions | ✅ Pass | 5 pts | |
| All OpenAI accounts in a single region | ⚠️ Risk | 2 pts | |
| Only 1 OpenAI account total (single point of failure) | ❌ Risk | 0 pts |
📖 https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/business-continuity-disaster-recovery
Context from the field: Customers with single-region deployments face outages during regional capacity events. Multi-region + APIM load balancing (Check 4.1) is the recommended pattern for production AI workloads.
Check 2.5 — 429 throttling rate (last 24 hours)
Requires diagnostic settings sending logs to Log Analytics (Check 2.2). If diagnostics are not configured, skip and note dependency.
Use execute_kusto_query with the Log Analytics workspace connected to the OpenAI account's diagnostic settings.
| Finding | Severity | Score | |
|---|---|---|---|
| Throttle rate < 1% in last 24h | ✅ Pass | 6 pts | |
| Throttle rate 1–10% (occasional bursts) | ⚠️ Attention | 3 pts | |
| Throttle rate > 10% (active capacity problem) | ❌ Fail | 0 pts | |
| No diagnostic data available (Check 2.2 failed) | ⚠️ Skip | 0 pts — flag dependency |
📖 https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/quota
Context from the field: Customers assume PTU eliminates throttling — it does not. Bursty traffic and concurrency limits can cause 429s even on PTU. Check APIM retry/spillover pattern (Check 4.1) as mitigation.
💰 CATEGORY 3 — Cost & Efficiency
Check 3.1 — Rate limits configured per deployment (not max)
| Finding | Severity | Score | |
|---|---|---|---|
| Each deployment has explicit TPM capacity set (not maximum) | ✅ Pass | 5 pts | |
| Single deployment consuming all available quota | ⚠️ Risk | 2 pts | |
| Unable to determine (no deployments) | N/A | 5 pts |
📖 https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/quota
Check 3.2 — Model selection diversity (not GPT-4o for everything)
| Finding | Severity | Score | |
|---|---|---|---|
| Mix of models (e.g., gpt-4o + gpt-4o-mini, or batch deployments) | ✅ Pass | 3 pts | |
| Only premium models deployed (no cost-efficient alternative) | ⚠️ Info | 1 pt | |
| Single deployment only | N/A | 3 pts |
📖 https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models
Check 3.3 — PTU utilization (if applicable)
Only check if PTU/Provisioned deployments exist:
If PTU deployments exist, check utilization via metrics:
| Finding | Severity | Score | |
|---|---|---|---|
| PTU utilization 70–85% average (well-sized) | ✅ Pass | 7 pts | |
| PTU utilization < 50% (over-provisioned — burning money) | ⚠️ Waste | 2 pts | |
| PTU utilization > 95% (under-provisioned — users getting 429s) | ⚠️ Risk | 4 pts | |
| No PTU deployments (using Standard — fine for most startups) | N/A | 7 pts |
📖 https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/provisioned-throughput
Check 3.4 — Quota utilization (TPM used vs limit)
Alternative if the above returns empty (common for newer deployments):
| Finding | Severity | Score | |
|---|---|---|---|
| Quota usage < 70% of limit across all models | ✅ Pass | 5 pts | |
| Quota usage 70–90% (nearing limit — plan increase) | ⚠️ Attention | 3 pts | |
| Quota usage > 90% (at risk of rejection — request increase NOW) | ❌ Risk | 0 pts | |
| Unable to retrieve usage data | ⚠️ Info | 3 pts |
📖 https://learn.microsoft.com/en-us/azure/ai-services/openai/quotas-limits
Context from the field: Approved TPM quotas sometimes don't appear in Foundry due to subscription/project mismatches or the new Global/Data Zone quota pooling model. If usage data looks incorrect, verify the quota was assigned to the correct subscription and region.
Check 3.5 — Token consumption trend (tokens per day per deployment)
Requires diagnostic settings sending logs to Log Analytics (Check 2.2). If diagnostics are not configured, skip and note dependency.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/08-ai-foundry-posture/SKILL.md
Popularity
- Repository stars
- 70
- Repository forks
- 13
- 7-day trend score
- 21
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ricmmartins/azure-sre-agent-skills/08-ai-foundry-posture)