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

.copilot/skills/foundry-hosted-agent-maf/SKILL.md

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

A guide for building a .NET software agent hosted on Microsoft Foundry that communicates with interfaces using the AG-UI protocol.

In plain words
What is it for?
Use it to create, refactor, or review a Foundry Hosted Agent that streams agent activity and supports interactive frontend features.
Why use it?
It provides the required project setup and hosting pattern for connecting that kind of agent to a CopilotKit or AG-UI frontend.

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-hosted-agent-maf/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-hosted-agent-maf

README.md
[![agentmods](https://agentmods.dev/badge/skills/leestott/generative-ui-foundry-hosted-agents/foundry-hosted-agent-maf/github.svg)](https://agentmods.dev/skills/leestott/generative-ui-foundry-hosted-agents/foundry-hosted-agent-maf)
Your own site
<a href="https://agentmods.dev/skills/leestott/generative-ui-foundry-hosted-agents/foundry-hosted-agent-maf"><img src="https://agentmods.dev/badge/skills/leestott/generative-ui-foundry-hosted-agents/foundry-hosted-agent-maf/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for foundry-hosted-agent-maf

Your own site · 80×15
<a href="https://agentmods.dev/skills/leestott/generative-ui-foundry-hosted-agents/foundry-hosted-agent-maf"><img src="https://agentmods.dev/badge/skills/leestott/generative-ui-foundry-hosted-agents/foundry-hosted-agent-maf.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 126 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,401 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.00126 $0.01401
Opus 5 $0.00063 $0.00700
Sonnet 5 $0.00025 $0.00280
Haiku 4.5 $0.00013 $0.00140

Measured 10d ago against content hash 5c3f8ccb53a9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

foundry-hosted-agent-maf 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 10d 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 http://localhost:8088/readiness
.copilot/skills/foundry-hosted-agent-maf/SKILL.md · 120 lines

How it starts

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

Skill: Author a MAF agent for Foundry Hosted Agents (AG-UI)

This skill captures the validated best-practice pattern for building a Microsoft Agent Framework (.NET) agent that runs as a Foundry Hosted Agent and serves the AG-UI protocol over the platform's invocations endpoint.

When to use

  • Creating a new .NET agent to host on Foundry that must drive a CopilotKit / AG-UI frontend (generative UI, shared state, human-in-the-loop).
  • Refactoring an agent off the community AGUI.Server / raw IChatClient / custom invocation handler onto the official MAF AG-UI hosting stack.
  • Reviewing such an agent for correctness before registering a hosted version.

The pattern (do exactly this)

1. Packages (.csproj, Microsoft.NET.Sdk.Web, net10.0)

<PackageReference Include="Microsoft.Agents.AI.OpenAI" Version="1.13.0" />
<PackageReference Include="Microsoft.Agents.AI.Hosting.AGUI.AspNetCore" Version="1.13.0-preview.260703.1" />
<PackageReference Include="Microsoft.Agents.AI.Hosting.AspNetCore" Version="1.13.0-preview.260703.1" />
<PackageReference Include="Azure.AI.OpenAI" Version="2.9.0-beta.1" />
<PackageReference Include="Azure.Identity" Version="1.13.1" />

Do not include AGUI.Server, AGUI.Abstractions, Azure.AI.AgentServer.Invocations, or a standalone Microsoft.Extensions.AI pin — the hosting packages bring what you need.

2. Program.cs

var builder = WebApplication.CreateBuilder(args);
builder.Services.AddHttpClient();
builder.Services.AddAGUI();

var endpoint = new Uri(builder.Configuration["AZURE_OPENAI_ENDPOINT"]!);
var deployment = builder.Configuration["MODEL_DEPLOYMENT_NAME"] ?? "model-router";

AITool[] tools =
[
    AIFunctionFactory.Create(dataTools.QueryData, "query_data"),
    AIFunctionFactory.Create(dataTools.ManageTodos, "manage_todos"),
];

AIAgent agent = new AzureOpenAIClient(endpoint, new DefaultAzureCredential())
    .GetChatClient(deployment)
    .AsIChatClient()                 // REQUIRED: .AsAIAgent is an IChatClient extension
    .AsAIAgent(instructions: SystemPrompt, name: "analytics-agent", tools: tools);

var app = builder.Build();
app.MapAGUI("/invocations", agent);  // Foundry Hosted Agent path
app.MapAGUI("/", agent);             // local / direct AG-UI clients
app.MapGet("/readiness", () => Results.Ok(new { status = "ready" }));
app.Run();

Read the full file on GitHub · 120 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. 10d ago First seen · 120 lines · 126 tokens per session scan A 5c3f8ccb53a9

Subscribe to this mod's changes

foundry-hosted-agent-maf is a skill published in the GitHub repository leestott/generative-ui-foundry-hosted-agents (5 stars, last pushed 1mo ago), licensed MIT. It adds 126 tokens to every session and 1,401 once invoked, about $0.0006 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.

Related

Other skills, from other repositories

nuget-update

A process for checking and updating NuGet packages, which are reusable .NET software libraries, in selected .NET 10 project templates. It checks stable versions and applies patch and minor updates while treating major updates separately.

Calabonga/Microservice-Template · 119 tokens

add-slice

Scaffold a slice in this Vertical Slice Architecture template — one use case in its own folder, with its FastEndpoints endpoint, request, response, validator, and summary, plus the Feature and Group if they don't exist yet, plus tests. Use when the user says "add a slice", "add a use case", "add an endpoint", "add a…

SSWConsulting/SSW.VerticalSliceArchitecture · 125 tokens

blazor

Use for Blazor Server development with Fluent UI Blazor, Razor components, layouts, pages, scoped UI services, culture switching, localization, forms, loading/empty/error states, and Studio-style dashboard workflows.

AterDev/Perigon.CLI · 45 tokens

cli

Use for .NET command-line tool development with Spectre.Console/Spectre.Console.Cli, Microsoft.Extensions.Hosting, dependency injection, localized help text, command settings, aliases, examples, terminal output, exit codes, and stdio-safe command paths.

AterDev/Perigon.CLI · 52 tokens

codegen

Use for .NET code generation work with Roslyn, Microsoft.OpenApi, Razor templates, DTO/manager/controller generation, REST API generation, C# HttpClient generation, Angular/Axios TypeScript request clients, generated formatting, and deterministic output.

AterDev/Perigon.CLI · 53 tokens

dotnet

Use for .NET application development involving services, managers, dependency injection, Microsoft.Extensions.Hosting, dependency direction, MiniDb persistence, DTOs, Mapster mapping, shared entities/helpers, MCP tools, module workflows, solution analysis, cancellation, logging, and logic shared by CLI and Blazor.

AterDev/Perigon.CLI · 61 tokens