claude-on-foundry

claude-on-foundry is an agent for Claude Code from Azure-Samples/claude. It costs 63 tokens per session (1,090 once invoked), scanned B, original, MIT.

A guided setup and troubleshooting helper for deploying Claude models in Microsoft Foundry, Microsoft's cloud platform for building and running AI services. It uses the Azure-Samples/claude starter kit with Bicep or Terraform infrastructure files.

In plain words
What is it for?
Use it to deploy Haiku, Sonnet, or Opus models, verify that they work, diagnose failed `azd up` runs, add model families, check quota, or tear down the deployment.
Why use it?
It turns plain-language requests into the repository's deployment, checking, diagnosis, and cleanup workflows. It also helps investigate failed setup commands, quota issues, and deployment problems without requiring API keys.

Agent for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: reads .claude/ paths; mentions Claude Code.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/azure-samples/claude/claude-on-foundry
Clone the repo
git clone --depth 1 https://github.com/Azure-Samples/claude

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for claude-on-foundry

README.md
[![agentmods](https://agentmods.dev/badge/agents/azure-samples/claude/claude-on-foundry.svg)](https://agentmods.dev/agents/azure-samples/claude/claude-on-foundry)
Your own site
<a href="https://agentmods.dev/agents/azure-samples/claude/claude-on-foundry"><img src="https://agentmods.dev/badge/agents/azure-samples/claude/claude-on-foundry.svg" alt="Measured on agentmods" height="20"></a>
Per session 63 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,090 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00063 $0.01090
Opus 5 $0.00032 $0.00545
Sonnet 5 $0.00013 $0.00218
Haiku 4.5 $0.00006 $0.00109

Measured 6d ago against content hash 3d6b94e9e8f7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade B, and why

claude-on-foundry scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

- **Confirm before destructive actions** (`azd down`, `az cognitiveservices account purge`, `az role assignment delete`, deleting `.azure-cli/`, editing `~/.claude/settings.json`). State exactly what will be deleted and
.github/agents/claude-on-foundry.agent.md · 72 lines

How it starts

The opening of the file, as written. The whole thing — 72 lines — stays where its author put it; the contents beside it link to each section on GitHub.

claude-on-foundry

You set up and operate the Azure-Samples/claude starter kit: one or more Claude models (haiku, sonnet, opus) deployed into Microsoft Foundry with a single command (azd up), called from the Anthropic SDK and the Claude Code CLI over Microsoft Entra ID. Bicep and Terraform variants ship side by side.

How users invoke you:

@claude-on-foundry deploy claude sonnet and haiku to eastus2
@claude-on-foundry my azd up failed with 715-123420
@claude-on-foundry free quota held by soft-deleted accounts
@claude-on-foundry tear it all down

You follow skills/claude-on-foundry/SKILL.md exactly. It contains the decision tree, the env-var contract, the error catalog, the verify and teardown sequences, and the destructive-action policy.

What you do

Translate plain-English requests ("deploy", "it failed", "is it working", "add a family", "clean up") into the right script + env var combinations from this repo. Never invent commands, regions, or env vars that aren't already in the skill or the README.

Workflow

1. Understand and check prerequisites

  1. Read skills/claude-on-foundry/SKILL.md and identify which of the five flows (PLAN, DEPLOY, DIAGNOSE, VERIFY, MODIFY, TEARDOWN) the request maps to.
  2. Confirm az and azd are installed and the user is logged in.
  3. Confirm subscription eligibility (EA or MCA-E) per the PLAN section.

2. Configure (only what's needed)

  1. Set config via azd env set <KEY> <VALUE> from inside the chosen variant folder (infra-bicep/ or infra-terraform/).
  2. Required: CLAUDE_ORGANIZATION_NAME, AZURE_LOCATION. Industry must be lowercase.
  3. Pick one or more of CLAUDE_HAIKU_MODEL / CLAUDE_SONNET_MODEL / CLAUDE_OPUS_MODEL. Empty = skip.

3. Execute

  1. Run azd up from the chosen variant folder.
  2. The preprovision hook runs scripts/preflight-claude.ps1 (catalog + quota check). Never bypass it.
  3. The postprovision hook runs scripts/configure-claude-code.ps1 to wire Claude Code.

Read the full file on GitHub · 72 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 72 lines · 63 tokens per session scan B 3d6b94e9e8f7

Subscribe to this mod's changes

claude-on-foundry is an agent published in the GitHub repository Azure-Samples/claude (37 stars, last pushed 12d ago), licensed MIT. It adds 63 tokens to every session and 1,090 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

data-engineer

Build scalable data pipelines, modern data warehouses, and real-time streaming architectures. Implements Apache Spark, dbt, Airflow, and cloud-native data platforms. Use PROACTIVELY for data pipeline design, analytics infrastructure, or modern data stack implementation.

wshobson/agents · 54 tokens

FabricDataEngineer

Orchestrate end-to-end Microsoft Fabric data engineering workflows that span multiple workloads and personas. Use when the request crosses Spark, Warehouse, Pipelines, Lakehouse architecture, migration, or data quality operations. Delegates deep single-endpoint implementation to specialized skills and resources.

microsoft/skills-for-fabric · 58 tokens

gke-cluster-runner

Launch a single TPU training workload on a GKE cluster via XPK, poll until completion or hang, capture xprof + HLO dumps to GCS, and report structured verdict signals back to the master agent. Stateless one-shot worker — does NOT write wiki pages, decide experiment verdicts, or update the model page. Use for every…

vlasenkoalexey/tpu_performance_autoresearch_wiki · 100 tokens

01-Orchestrator

Master orchestrator for the multi-step Azure platform engineering workflow. Coordinates Requirements, Architect, Design, IaC Plan, IaC Code, Deploy agents with mandatory human approval gates. Routes Bicep or Terraform tracks via decisions.iactool.

jonathan-vella/apex-accelerator · 53 tokens

03-Architect

Expert Architect providing guidance using Azure Well-Architected Framework principles and Microsoft best practices. Evaluates decisions against WAF pillars and generates ARM MCP-verified cost estimates.

jonathan-vella/apex-accelerator · 37 tokens

04g-Governance

Azure governance discovery agent. Queries Azure Policy assignments via REST API (incl. management-group-inherited policies), classifies effects, produces governance constraint artifacts, and runs adversarial review. Step 3.5: after Architecture, before IaC Planning.

jonathan-vella/apex-accelerator · 56 tokens