make-wpf-chatclient-factory

make-wpf-chatclient-factory is a skill for Claude Code from christian289/dotnet-with-claudecode. It costs 82 tokens per session (2,770 once invoked), scanned A, original, MIT.

A factory for connecting a WPF application to several large-language-model services through one common chat interface. It reuses one network connection pool and includes a mock chat client for development without an account or API key.

In plain words
What is it for?
Use it to wire OpenAI, Ollama, Anthropic, or Gemini chat providers into a WPF app and register the factory with dependency injection.
Why use it?
It removes provider-specific setup and avoids repeating network configuration when supporting multiple AI services.

Skill for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: names the AskUserQuestion tool; positional $N argument.

Part of the wpf-dev-pack plugin — 28 skills, 10 agents, 4 hooks, 2 MCP servers shipped together

Good fit Use it to wire OpenAI, Ollama, Anthropic, or Gemini chat providers into a WPF app and register the factory with dependency injection.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/christian289/dotnet-with-claudecode/make-wpf-chatclient-factory
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.

Any agent
npx skills add christian289/dotnet-with-claudecode --skill make-wpf-chatclient-factory
Clone the repo
git clone --depth 1 https://github.com/christian289/dotnet-with-claudecode

Made for: Claude Code.

Or install wpf-dev-pack, the plugin that ships this one along with the rest of its 28 skills, 10 agents, 4 hooks, 2 MCP servers.

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 make-wpf-chatclient-factory

README.md
[![agentmods](https://agentmods.dev/badge/skills/christian289/dotnet-with-claudecode/make-wpf-chatclient-factory/github.svg)](https://agentmods.dev/skills/christian289/dotnet-with-claudecode/make-wpf-chatclient-factory)
Your own site
<a href="https://agentmods.dev/skills/christian289/dotnet-with-claudecode/make-wpf-chatclient-factory"><img src="https://agentmods.dev/badge/skills/christian289/dotnet-with-claudecode/make-wpf-chatclient-factory/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 make-wpf-chatclient-factory

Your own site · 80×15
<a href="https://agentmods.dev/skills/christian289/dotnet-with-claudecode/make-wpf-chatclient-factory"><img src="https://agentmods.dev/badge/skills/christian289/dotnet-with-claudecode/make-wpf-chatclient-factory.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,770 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00082 $0.02770
Opus 5.5 $0.00033 $0.01108
Sonnet 5.5 $0.00016 $0.00554
Haiku 4.5 $0.00008 $0.00277

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

Security

Grade A, and why

make-wpf-chatclient-factory 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.

wpf-dev-pack/skills/make-wpf-chatclient-factory/SKILL.md · 252 lines

How it starts

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

WPF ChatClient Factory Generator

If $0 is empty, use the AskUserQuestion tool to ask: "Enter the factory class name (e.g., ChatClientFactory)". Do NOT proceed until a valid name is provided. Use the response as the factory name for all subsequent steps.

Generate $0 (implementing I$0): a provider-agnostic IChatClient factory that owns one shared SocketsHttpHandler (a single connection pool) reused by every LLM SDK, plus a MockChatClient so the chat UI runs with no provider or API key.

  • Replace {Namespace} with the project's root namespace.
  • Register the factory as a DI singleton — see "Required: singleton lifetime".

Full rationale in the sharing-httpclient-across-llm-sdks knowledge topic (fetch via WpfDevPackMcp get_wpf_topic): the socket-exhaustion anti-pattern, disposeHandler:false, the per-SDK injection cheat sheet, and the version-floor caveat. The mock is covered in hosting-extensions-ai-chatclient-in-wpf-mvvm.

⚠️ Verify SDK signatures with HandMirror first

Each LLM SDK exposes a different HttpClient injection point and these APIs are version-sensitive. Before emitting, verify the exact signatures with HandMirror (inspect_nuget_package / inspect_nuget_package_type) for whichever providers you include: OpenAI, OllamaSharp, Anthropic.SDK, Google.GenAI, System.ClientModel, Microsoft.Extensions.AI. Do not ship a provider arm you have not verified against the pinned package version.

Required Packages

<PackageReference Include="Microsoft.Extensions.AI" Version="10.*" />
<!-- OPTIONAL — add only the provider SDKs the user asked for: -->
<PackageReference Include="OpenAI" Version="2.*" />
<PackageReference Include="OllamaSharp" Version="5.*" />
<PackageReference Include="Anthropic.SDK" Version="5.*" />
<PackageReference Include="Google.GenAI" Version="1.*" />

Emit only the arms you installed. The canonical class below shows ALL provider arms for reference. A provider arm whose SDK package is not installed is a CS0246 build error — when emitting, keep the Provider.Mock arm, keep each arm whose package you added, and replace every other arm with => throw new NotSupportedException($"Install and wire the {s.Provider} SDK first."). The mock-only emission (no provider SDK at all) is the correct default when no provider was requested.

Read the full file on GitHub · 252 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. 1mo ago First seen · 252 lines · 82 tokens per session scan A 45a99d0cd48d

Subscribe to this mod's changes

make-wpf-chatclient-factory is a skill published in the GitHub repository christian289/dotnet-with-claudecode (41 stars, last pushed 2mo ago), licensed MIT. It adds 82 tokens to every session and 2,770 once invoked, about $0.0003 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-09-03.

Related

Other skills, from other repositories

microsoft-extensions-ai

Build provider-agnostic .NET AI integrations with Microsoft.Extensions.AI, IChatClient, embeddings, middleware, structured output, vector search, and evaluation. USE FOR: building or reviewing .NET code that uses Microsoft.Extensions.AI, Microsoft.Extensions.AI.Abstractions, IChatClient, IEmbeddingGenerator…

managedcode/dotnet-skills · 128 tokens

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

sep

Use Sep for high-performance separated-value parsing and writing in .NET, including delimiter inference, explicit parser/writer options, and low-allocation row/column workflows. USE FOR: delimited data needs are performance-sensitive and allocation-aware; project needs explicit control over separator inference…

managedcode/dotnet-skills · 113 tokens

managedcode-markitdown

Use ManagedCode.MarkItDown when a .NET application needs deterministic document-to-Markdown conversion for ingestion, indexing, summarization, or content-processing workflows. USE FOR: ManagedCode.MarkItDown integration; document ingestion flows; Office or rich-text conversion to Markdown; indexing and summarization…

managedcode/dotnet-skills · 113 tokens

maui-essentials-ai

Adopt Microsoft.Maui.Essentials.AI for local/on-device MAUI AI. USE FOR: Apple Intelligence chat, IChatClient, iOS/macOS/Mac Catalyst 26+ checks, fallback UI, NLEmbeddingGenerator, local tool invocation, privacy/offline UX. DO NOT USE FOR: source-generated tools, cloud-only AI, UI debugging.

dotnet/maui-labs · 86 tokens

mlnet

Use ML.NET to train, evaluate, or integrate machine-learning models into .NET applications with realistic data preparation, inference, and deployment expectations. USE FOR: ML.NET integration; local model training or retraining; inference pipelines, model loading, evaluation, and deployment review. DO NOT USE FOR…

managedcode/dotnet-skills · 105 tokens