dotPilot: Skill for Codex

.codex/skills/dotnet-microsoft-extensions-ai/SKILL.md

dotnet-microsoft-extensions-ai is a skill for Codex from managedcode/dotPilot. It costs 42 tokens per session (1,768 once invoked), scanned A, original, MIT.

A guide for adding provider-independent AI features to .NET applications through Microsoft's shared AI interfaces. It covers chat, embeddings, structured responses, tool calling, middleware, vector search, and dependency injection.

In plain words
What is it for?
Use it when building .NET chat or embedding features, structured AI responses, tool use, vector search, streaming, evaluation, or dependency-injected AI services.
Why use it?
It helps an application switch or combine AI providers without tying its code to one vendor's SDK. It also provides a consistent approach to testing, telemetry, caching, and other common AI concerns.

Skill for Codex

Written for Codex: installed under .codex/.

This is managedcode/dotPilot's own configuration. It tells Codex how to work on dotPilot 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 dotPilot configures →

Reuse

Borrowing it

Nothing to install: this file belongs to managedcode/dotPilot. 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/managedcode/dotPilot/main/.codex/skills/dotnet-microsoft-extensions-ai/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/managedcode/dotPilot

Made for: 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 dotnet-microsoft-extensions-ai

README.md
[![agentmods](https://agentmods.dev/badge/skills/managedcode/dotpilot/dotnet-microsoft-extensions-ai/github.svg)](https://agentmods.dev/skills/managedcode/dotpilot/dotnet-microsoft-extensions-ai)
Your own site
<a href="https://agentmods.dev/skills/managedcode/dotpilot/dotnet-microsoft-extensions-ai"><img src="https://agentmods.dev/badge/skills/managedcode/dotpilot/dotnet-microsoft-extensions-ai/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 dotnet-microsoft-extensions-ai

Your own site · 80×15
<a href="https://agentmods.dev/skills/managedcode/dotpilot/dotnet-microsoft-extensions-ai"><img src="https://agentmods.dev/badge/skills/managedcode/dotpilot/dotnet-microsoft-extensions-ai.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,768 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00042 $0.01768
Opus 5.5 $0.00017 $0.00707
Sonnet 5.5 $0.00008 $0.00354
Haiku 4.5 $0.00004 $0.00177

Measured 1mo ago against content hash 350031346d90, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

dotnet-microsoft-extensions-ai scanned grade A with 0 findings 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 1mo 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.codex/skills/dotnet-microsoft-extensions-ai/SKILL.md · 104 lines

How it starts

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

Microsoft.Extensions.AI

Trigger On

  • building or reviewing .NET code that uses Microsoft.Extensions.AI, Microsoft.Extensions.AI.Abstractions, IChatClient, IEmbeddingGenerator, ChatOptions, or AIFunction
  • choosing between low-level AI abstractions, provider SDKs, vector-search composition, evaluation libraries, and a fuller agent framework
  • adding streaming chat, structured output, embeddings, tool calling, telemetry, caching, or DI-based AI middleware
  • wiring Microsoft.Extensions.VectorData, Microsoft.Extensions.DataIngestion, MCP tooling, or evaluation packages around a provider-agnostic AI app

Workflow

  1. Classify the request first: plain model access, tool calling, embeddings/vector search, evaluation, or true agent orchestration.
  2. Default to Microsoft.Extensions.AI for application and service code that needs provider-agnostic chat, embeddings, middleware, structured output, and testability.
  3. Reference Microsoft.Extensions.AI.Abstractions directly only when authoring provider libraries or lower-level reusable integration packages.
  4. Model IChatClient and IEmbeddingGenerator composition explicitly in DI. Keep options, caching, telemetry, logging, and tool invocation inspectable in the pipeline.
  5. Treat chat state deliberately. For stateless providers, resend history. For stateful providers, propagate ConversationId rather than assuming all providers behave the same way.
  6. Use Microsoft.Extensions.VectorData and Microsoft.Extensions.DataIngestion as adjacent building blocks for RAG instead of hand-rolling store abstractions prematurely.
  7. Escalate to dotnet-microsoft-agent-framework when the requirement becomes agent threads, multi-agent orchestration, higher-order workflows, durable execution, or remote agent hosting.
  8. Validate with real providers, realistic prompts, and evaluation gates so the abstraction layer actually buys portability and reliability.

Architecture

flowchart LR
  A["Task"] --> B{"Need agent threads, multi-agent orchestration, or remote agent hosting?"}
  B -->|Yes| C["Use Microsoft Agent Framework on top of `Microsoft.Extensions.AI.Abstractions`"]
  B -->|No| D{"Need provider-agnostic chat, embeddings, tools, typed output, or evaluation?"}
  D -->|Yes| E["Use `Microsoft.Extensions.AI`"]
  E --> F["Compose `IChatClient` / `IEmbeddingGenerator` in DI"]
  F --> G["Add caching, telemetry, tools, vector data, and evaluation deliberately"]
  D -->|No| H["Use plain provider SDKs or deterministic .NET code"]

Read the full file on GitHub · 104 lines

Files

What ships with it

52 files 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. 1mo ago First seen · 104 lines · 42 tokens per session scan A 350031346d90

Subscribe to this mod's changes

dotnet-microsoft-extensions-ai is a skill published in the GitHub repository managedcode/dotPilot (25 stars, last pushed 6mo ago), licensed MIT. It adds 42 tokens to every session and 1,768 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

semantic-kernel

Build AI-enabled .NET applications with Semantic Kernel using services, plugins, prompts, and function-calling patterns that remain testable and maintainable. USE FOR: adding AI-driven prompts, plugins, or orchestration to a .NET app; reviewing kernel construction, service registration, or plugin usage; building…

managedcode/dotnet-skills · 116 tokens

lightcad

Use when building or extending a desktop CAD/BIM application with the open-source FeiYang LightCAD platform — plugin development, custom elements, DWG/DXF I/O, 2D drafting and 3D/BIM modeling on C#/.NET. LightCAD (FeiYang Integrated Design Platform) is a C# CAD system integrating 2D design, 3D design, and BIM.

znlgis/opengis-skills · 85 tokens

rider-search

Routing rules for code search in JetBrains Rider projects — use the Rider MCP symbol/reference/file tools instead of Bash grep. Use whenever searching for a symbol, definition, function, variable, type, or finding usages/references in a C#/.NET or Unreal C++ codebase open in Rider.

JSungMin/rider-mcp-enforcer · 60 tokens

azure-ai-openai-dotnet

Azure OpenAI SDK for .NET. Client library for Azure OpenAI and OpenAI services. Use for chat completions, embeddings, image generation, audio transcription, and assistants.

Ghosteken/agent-harness · 43 tokens

azure-ai-voicelive-dotnet

Azure AI Voice Live SDK for .NET. Build real-time voice AI applications with bidirectional WebSocket communication.

Ghosteken/agent-harness · 32 tokens

build-and-test

How to build and test .NET projects in the Agent Framework repository. Use this when verifying or testing changes.

microsoft/agent-framework · 26 tokens