Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

Make Wpf Chatclient

БесплатноБез исполняемых скриптовНе проверен

One-button generator for a complete, runnable streaming LLM chat client in WPF (CommunityToolkit.Mvvm): markdown bubbles, provider-agnostic IChatClient with a…

christian289от christian289★ 42 звезды на GitHub

Об этом скилле

WPF Chat Client Generator (one-button)

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

This is the self-contained, one-button scaffolder: a single invocation emits an entire working streaming chat client and wires it into the app via ViewModel First (Mappings.xaml + DI). It composes the four component scaffolders and adds the glue (input behavior, auto-scroll behavior, view, view-model, DI) they don't cover. It defaults to a mock provider with no MCP, so the generated app builds and streams a reply with no API key and no server.

  • Replace {Namespace} with the project's root namespace, {Project} with the *.WpfApp path, and {ViewModels} with the *.ViewModels project.
  • Target app must be a make-wpf-project solution (.WpfApp + .ViewModels), CommunityToolkit.Mvvm + GenericHost. (Prism users: substitute BindableBase / DelegateCommand / RegisterForNavigation per view-viewmodel-wiring-prism.md.)

This skill is the one-button equivalent of running, in one pass, make-wpf-markdown-presenter + make-wpf-chat-bubble-template + make-wpf-chatclient-factory + make-wpf-chat-orchestrator, plus the view, view-model, and behaviors below. The full rationale for every piece lives in the knowledge topics listed under "Related".

⚠️ Verify SDK signatures with HandMirror before emitting provider/MCP code

The factory and orchestrator call version-sensitive APIs across several SDKs. Before emitting them, verify signatures with HandMirror (inspect_nuget_package / inspect_nuget_package_type): Microsoft.Extensions.AI, ModelContextProtocol, and any real providers you enable (OpenAI, OllamaSharp, Anthropic.SDK, Google.GenAI, System.ClientModel). The mock path needs none of these.

Workflow

Copy this checklist and emit each file in order:

ChatClient Scaffold Progress:
- [ ] 1. Packages: add PackageReferences to {ViewModels} AND {Project}; append GlobalUsings.cs in both
- [ ] 2. Components: emit MarkdownPresenter + ChatClientFactory(+Mock) into {Project}; ChatOrchestrator, ChatEvent, McpToolService, contracts into {ViewModels}
- [ ] 3. Behaviors: emit EnterCommandBehavior + StickToBottomBehavior
- [ ] 4. Turn VM: emit ChatTurnViewModel (IsUser, Markdown, IsWaiting)
- [ ] 5. Chat VM: emit IUiDispatcher + ChatViewModel ({ViewModels}) and WpfUiDispatcher ({Project})
- [ ] 6. View: emit ChatView.xaml (bubbles + input)
- [ ] 7. Wire: register DI (singleton factory + dispatcher + orchestrator + ChatViewModel), add Mappings.xaml entry
- [ ] 8. Verify: dotnet build; the mock provider streams a reply with no key

1. Required Packages + GlobalUsings

In {ViewModels} (*.ViewModels — orchestrator, events, contracts, and view-models live here; none of them touch WPF):

<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.*" />
<PackageReference Include="Microsoft.Extensions.AI" Version="10.*" />
<PackageReference Include="ModelContextProtocol" Version="1.*" />

Since ModelContextProtocol 1.x the CLIENT types (McpClient, StdioClientTransport, McpClientTool) live in the ModelContextProtocol.Core dependency; the ModelContextProtocol package itself carries server/DI types but pulls Core transitively, so the reference above still compiles the client code and the ModelContextProtocol.Client namespace is unchanged.

In {Project} (*.WpfApp — presenter, factory, behaviors, view; Microsoft.Extensions.AI flows transitively from the {ViewModels} project reference):

<PackageReference Include="Microsoft.Extensions.Hosting" Version="10.0.*" />
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.*" />
<PackageReference Include="Markdig" Version="1.*" />
<!-- Real provider SDKs are optional; the default mock path needs none of them. -->

Append to {ViewModels} GlobalUsings.cs (the emitted code assumes these):

global using System.Collections.ObjectModel;
global using System.Runtime.CompilerServices;
global using CommunityToolkit.Mvvm.ComponentModel;
global using CommunityToolkit.Mvvm.Input;
global using Microsoft.Extensions.AI;
global using Microsoft.Extensions.Logging;
global using ModelContextProtocol.Client;

Append to {Project} GlobalUsings.cs:

global using System.Net.Http;
global using System.Runtime.CompilerServices;
global using System.Windows;
global using System.Windows.Controls;
global using System.Windows.Input;
global using Microsoft.Extensions.AI;
global using Microsoft.Xaml.Behaviors;

{Project} files that consume the contracts (ChatClientFactory.cs, WpfUiDispatcher.cs, App.xaml.cs) add a per-file using {Namespace}.ViewModels; — user-defined namespaces stay per-file, not in GlobalUsings.cs.

2. Components (emit using the canonical templates)

Полный SKILL.md на GitHub

Установить Make Wpf Chatclient в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл Make Wpf Chatclient?

One-button generator for a complete, runnable streaming LLM chat client in WPF (CommunityToolkit.Mvvm): markdown bubbles, provider-agnostic IChatClient with a shared HttpClient pool, MCP tools, Enter-to-send, and pin-to-bottom auto-scroll — defaulting to a keyless mock provider so it runs immediately. Use when adding a chat/assistant panel to a WPF app. Usage: /wpf-dev-pack:make-wpf-chatclient <Name>

Как установить скилл Make Wpf Chatclient?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл Make Wpf Chatclient запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить Make Wpf Chatclient с