Make Wpf Service
БесплатноБез исполняемых скриптовНе проверенGenerates WPF service interface, implementation class, and DI registration. Use when adding a new service layer, creating a service with interface separation…
от christian289★ 42 звезды на GitHubОб этом скилле
WPF Service Generator
If $0 is empty, use the AskUserQuestion tool to ask: "Enter the Service name (e.g., DataExport, FileManager)". Do NOT proceed until a valid name is provided. Use the response as the ServiceName for all subsequent steps.
Generate a $0Service with interface + implementation class + DI registration.
Automatically places files in the correct project based on solution structure.
If --no-interface is appended, skip interface generation.
- Replace
{Namespace}with the project's root namespace detected from csproj or existing code.
Usage
# Interface + Implementation + DI registration
/wpf-dev-pack:make-wpf-service DataExport
# Implementation only (no interface) — for simple services
/wpf-dev-pack:make-wpf-service FileManager --no-interface
Execution Procedure
Step 1: Parse $0
$0is the service name (withoutServicesuffix — auto-appended)- e.g.,
DataExport→IDataExportService.cs+DataExportService.cs
- e.g.,
--no-interfaceflag: Skip interface generation (class-only)
Step 2: Locate Target Projects
Search for solution file and identify projects by naming convention:
| Project Suffix | Purpose | Files Placed |
|---|---|---|
.Abstractions |
Interfaces | I$0Service.cs |
.Core |
Business logic | $0Service.cs (UI-independent) |
.WpfServices |
WPF-dependent services | $0Service.cs (if needs WPF types) |
.WpfApp |
Application | DI registration in App.xaml.cs |
Fallback rules (keep the interface visible to both the implementation and the app):
- No
.Abstractionsproject → place the interface in.Core(beside the implementation). Do NOT put it in the WPF app project:.Corecannot reference the app, so an interface placed there is unreachable from the implementation in.Core. - No
.Coreor.WpfServices(no separate logic project) → place both interface and implementation in the app'sServices/folder. - Single project solution → both files in
Services/folder.
Step 3: Generate Interface (unless --no-interface)
Create I$0Service.cs:
namespace {Namespace}.Services;
public interface I$0Service
{
// TODO: Define service contract
// TODO: 서비스 계약 정의
}
Step 4: Generate Implementation
Create $0Service.cs:
namespace {Namespace}.Services;
public sealed class $0Service : I$0Service
{
// TODO: Implement service
// TODO: 서비스 구현
}
If --no-interface:
namespace {Namespace}.Services;
public sealed class $0Service
{
// TODO: Implement service
// TODO: 서비스 구현
}
Step 5: Register in DI Container
CommunityToolkit.Mvvm (GenericHost)
Locate App.xaml.cs and add in ConfigureServices:
// With interface
services.AddSingleton<I$0Service, $0Service>();
// Without interface (--no-interface)
services.AddSingleton<$0Service>();
Prism 9
Locate App.xaml.cs and add in RegisterTypes:
// With interface
containerRegistry.RegisterSingleton<I$0Service, $0Service>();
// Without interface (--no-interface)
containerRegistry.RegisterSingleton<$0Service>();
GlobalUsings: make sure
App.xaml.cscan resolve the service type — addglobal using {Namespace}.Services;to the app's existingGlobalUsings.csif absent (theServicesnamespace now exists, so the using resolves). Do not create a secondGlobalUsings.cs.
Step 6: Report Results
Output list of generated/modified files and next steps guidance.
Generated File Structure
With Interface (default)
{AbstractionsProject}/
└── Services/
└── I$0Service.cs
{CoreProject}/
└── Services/
└── $0Service.cs
{WpfAppProject}/
└── App.xaml.cs (DI registration added)
Without Interface (--no-interface)
{CoreProject}/
└── Services/
└── $0Service.cs
{WpfAppProject}/
└── App.xaml.cs (DI registration added)
If there is no
.Abstractionsproject (the default 3-project structure), placeI$0Service.csin$0.Core/Services/alongside$0Service.cs— never in the WPF app project, which.Corecannot reference.
Error Handling
- Missing service name → output usage instructions
- No WPF project found → suggest
/wpf-dev-pack:make-wpf-projectfirst - Duplicate service → warn and abort
- Multiple candidate projects → ask user which to use
Установить Make Wpf Service в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл Make Wpf Service?
Generates WPF service interface, implementation class, and DI registration. Use when adding a new service layer, creating a service with interface separation, or scaffolding a service class with DI wiring. Usage: /wpf-dev-pack:make-wpf-service <ServiceName> [--no-interface]
Как установить скилл Make Wpf Service?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Make Wpf Service запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic