generative-ui-foundry-hosted-agents: Skill for Claude Code

.copilot/skills/foundry-agent-deploy/SKILL.md

foundry-agent-deploy is a skill for Claude Code, Codex from leestott/generative-ui-foundry-hosted-agents. It costs 147 tokens per session (1,827 once invoked), scanned A, original, MIT.

A deployment workflow for hosting a Foundry agent and its CopilotKit web application on Microsoft Azure. It covers the agent, the server that connects to it, and the web frontend.

In plain words
What is it for?
Building an agent container, publishing it to Azure Container Registry, registering the hosted agent, setting access permissions, connecting the runtime, and verifying the web app.
Why use it?
It coordinates the infrastructure, permissions, container deployment, registration, and checks needed to put all three parts online.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

This is leestott/generative-ui-foundry-hosted-agents's own configuration. It tells Claude Code and Codex how to work on generative-ui-foundry-hosted-agents itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything generative-ui-foundry-hosted-agents configures →

Reuse

Borrowing it

Nothing to install: this file belongs to leestott/generative-ui-foundry-hosted-agents. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/leestott/generative-ui-foundry-hosted-agents/main/.copilot/skills/foundry-agent-deploy/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/leestott/generative-ui-foundry-hosted-agents

Made for: Claude Code, Codex.

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 foundry-agent-deploy

README.md
[![agentmods](https://agentmods.dev/badge/skills/leestott/generative-ui-foundry-hosted-agents/foundry-agent-deploy.svg)](https://agentmods.dev/skills/leestott/generative-ui-foundry-hosted-agents/foundry-agent-deploy)
Your own site
<a href="https://agentmods.dev/skills/leestott/generative-ui-foundry-hosted-agents/foundry-agent-deploy"><img src="https://agentmods.dev/badge/skills/leestott/generative-ui-foundry-hosted-agents/foundry-agent-deploy.svg" alt="Measured on agentmods" height="20"></a>
Per session 147 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,827 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.00147 $0.01827
Opus 5 $0.00073 $0.00914
Sonnet 5 $0.00029 $0.00365
Haiku 4.5 $0.00015 $0.00183

Measured 8d ago against content hash 81a6ef80ac8b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

foundry-agent-deploy scanned grade A 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 8d 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl.exe -sS -X POST $swa/api/copilotkit -H "Content-Type: application/json" --data-binary "@$env:TEMP\i.json"
.copilot/skills/foundry-agent-deploy/SKILL.md · 150 lines

How it starts

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

Skill: Deploy a Foundry Hosted Agent + CopilotKit runtime + SWA

Validated, end-to-end deployment flow for the three-component generative-UI solution (agent → runtime → frontend). Assumes infra is provisioned via azd (azd up). Pair with the foundry-hosted-agent-maf skill for the agent code.

Deployment order (matters)

  1. Provision infraazd up (ACR, App Service, SWA, Foundry account + model, App Insights, managed identities).
  2. Deploy runtime + frontendazd deploy runtime, azd deploy web (or via azd up). The runtime boots even before the agent exists (lazy 503).
  3. Build the agent image to ACR.
  4. Register a hosted-agent version and poll to active.
  5. Grant RBAC to the agent instance identity.
  6. Wire the runtime to the invocations endpoint (with api-version).
  7. Verify end-to-end through the SWA.

1–2. Provision + deploy

azd auth login
azd up
azd deploy runtime      # redeploy after runtime/src/server.ts changes (npm run build first)

The azure.ai.agents postdeploy hook logs AZURE_AI_PROJECT_ENDPOINT is not setcosmetic, deploy succeeds. Node App Service cold start ≈100s.

3. Build the agent image

$acr = (azd env get-values | ConvertFrom-StringData).AZURE_CONTAINER_REGISTRY_NAME.Trim('"')
$tag = "maf-agui-$(Get-Date -Format yyyyMMddHHmmss)"
az acr build --registry $acr --image "analytics-agent:$tag" --image "analytics-agent:latest" ./agent

4. Register a hosted-agent version

Use the azure-ai-projects Python SDK (see scripts/register_agent.py — update IMAGE to the new tag, then run it):

from azure.ai.projects import AIProjectClient
from azure.ai.projects.models import (
    HostedAgentDefinition, ProtocolVersionRecord, AgentEndpointProtocol, ContainerConfiguration,
)
from azure.identity import DefaultAzureCredential

project = AIProjectClient(endpoint=PROJECT_ENDPOINT,
                          credential=DefaultAzureCredential(), allow_preview=True)
agent = project.agents.create_version(
    agent_name="analytics-agent",
    definition=HostedAgentDefinition(
        container_configuration=ContainerConfiguration(image=IMAGE),
        protocol_versions=[ProtocolVersionRecord(protocol=AgentEndpointProtocol.INVOCATIONS, version="1.0.0")],
        cpu="1", memory="2Gi",
        environment_variables={
            "AZURE_OPENAI_ENDPOINT": "https://<account>.openai.azure.com/",
            "MODEL_DEPLOYMENT_NAME": "model-router",
        },
    ),
)
  • PROJECT_ENDPOINT = https://<account>.services.ai.azure.com/api/projects/<project>.
  • Poll project.agents.get_version("analytics-agent", agent_version="N").status until it equals AgentVersionStatus.ACTIVE (usually near-instant). Compare to the enum, not str(status) — under Python 3.11+ str(status) is "AgentVersionStatus.ACTIVE".
  • The agent's Entra instance identity principal is on the create response at agent.instance_identity.principal_id.

Read the full file on GitHub · 150 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 8d ago First seen · 150 lines · 147 tokens per session scan A 81a6ef80ac8b

Subscribe to this mod's changes

foundry-agent-deploy is a skill published in the GitHub repository leestott/generative-ui-foundry-hosted-agents (5 stars, last pushed 1mo ago), licensed MIT. It adds 147 tokens to every session and 1,827 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.