dotnet-service-generator

Scaffolds .NET service modules with observability, dependency injection, and API adapter conventions.

2|1|Updated Feb 12, 2026
One-click install
npx skills add https://github.com/cilerler/lillian --skill dotnet-service-generator-cilerler
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-service-generator
Source: https://github.com/cilerler/lillian/tree/main/plugins/ai-toolkit/skills/dotnet-service-generator
Command: npx skills add https://github.com/cilerler/lillian --skill dotnet-service-generator-cilerler

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Creating a new .NET service involves repetitive boilerplate: settings classes with validation, DI registration, health checks, background workers, API endpoints, and contract placement decisions. This Skill guides an interactive scaffolding workflow that generates consistent, convention-compliant service modules instead of hand-writing each file. ## Core Features & Use Cases - Interactive service scaffolding: Gathers service name, namespace, structure mode (modular polylith or standalone), and output location, then generates the full file set including Settings, StartupExtensions, Constants, and the core service implementation. - Dependency-driven generation: Presents a checklist of optional capabilities (typed HTTP clients, HybridCache, DbContext, message queues, distributed locks, background workers, broker subscribers) and merges only the selected patterns into the generated code. - API adapter selection: Generates versioned Minimal API endpoints with System.Text.Json source generation or OData controllers with composed EDM contributions, keeping adapters thin over the service interface. - Use Case: A developer needs a new PaymentProcessor service that calls an external API, caches responses, and exposes a Minimal API. The Skill confirms dependencies, resolves contract namespaces, and emits all files with observability metrics and DI registration. ## Quick Start Ask the AI to create a new .NET service named PaymentProcessor with an external HTTP client, caching, and a versioned Minimal API endpoint.

Frequently Asked Questions about dotnet-service-generator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scaffold a new .NET service with dependency injection?

Provide the service name in PascalCase, the organization and product namespace root, and the service purpose. The workflow identifies dependencies, confirms a checklist, determines the service lifetime, and generates Settings, StartupExtensions with Add{ServiceName}Service registration, and the core service implementation.

How do I choose between Minimal API and OData for a .NET service?

Select a versioned Minimal API for synchronous machine-to-machine callers in another deployment, and an OData controller when a UI needs a discoverable entity model with composable queries. Both adapters stay thin and delegate business logic to the same service interface.

Can the generator create background workers and message queue subscribers?

Yes. Scheduled or polling work generates a worker extending WorkerBackgroundService with cron scheduling, retry, and health tracking. Long-lived broker subscriptions generate a thin BackgroundService subscriber that resolves the service from a new scope per delivery.

Where should shared contracts be placed in a modular .NET solution?

Contract placement depends on the consumer boundary: service-internal interfaces stay in Contracts/, cross-component contracts go to the producer component's Abstractions folder, and cross-module contracts move to a sibling module Abstractions project. The C# public modifier alone never determines placement.

What happens when a startup dependency has no health check?

The generator emits a custom dependency health check only for HTTP, IDistributedCache, and Entity Framework patterns it owns. For other dependencies it requires an existing integration-owned health check or a confirmed side-effect-free readiness operation; otherwise it stops rather than inventing a probe.