dotnet-minimal-api-templates

Generate ASP.NET Core Minimal API templates with layered structure and CQRS.

2|Updated Oct 24, 2025
One-click install
npx skills add https://github.com/onesmartguy/next-level-real-estate --skill dotnet-minimal-api-templates
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-minimal-api-templates
Source: https://github.com/onesmartguy/next-level-real-estate/tree/main/.claude/skills/api-scaffolding/skills/dotnet-minimal-api-templates
Command: npx skills add https://github.com/onesmartguy/next-level-real-estate --skill dotnet-minimal-api-templates

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires MediatR, Microsoft.EntityFrameworkCore, FluentValidation.DependencyInjectionExtensions, ErrorOr, Mapster, Mapster.DependencyInjection, Asp.Versioning.Http.

What problem does it solve?

This Skill provides production-ready templates and patterns for building high-performance ASP.NET Core Minimal APIs, streamlining development with best practices for structure, async, and error handling. It helps you rapidly develop efficient and maintainable backend services.

Core Features & Use Cases

  • Layered Project Structure: Organize API, Application, Domain, and Infrastructure layers for maintainability and scalability.
  • CQRS with MediatR: Separate commands and queries for clear business logic and improved performance.
  • Authentication & Authorization: Implement JWT-based security and policy-driven access control for secure APIs.
  • Endpoint Filters & Result Pattern: Handle validation, exceptions, and API responses gracefully for a robust user experience.

Quick Start

Scaffold a new .NET Minimal API project with a layered structure, including CQRS with MediatR, a repository pattern for user management, and JWT authentication.

Frequently Asked Questions about dotnet-minimal-api-templates

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

FAQPage Schema
How do I build a production-ready ASP.NET Core Minimal API?

Production-ready Minimal APIs require layered architecture, async/await patterns, dependency injection, comprehensive error handling, and middleware integration. This Skill provides complete templates with API, Application, Domain, and Infrastructure layers, CQRS via MediatR, JWT authentication, and testing scaffolding to accelerate development.

What's the difference between Minimal APIs and traditional controllers in ASP.NET Core?

Minimal APIs eliminate controller classes, reducing boilerplate and improving performance. They map endpoints directly with less ceremony while maintaining all framework features. This approach suits microservices and high-performance services where simplicity and speed matter.

How do I implement CQRS with MediatR in .NET APIs?

CQRS separates read and write operations using MediatR to route commands and queries through distinct handlers. This pattern clarifies business logic, improves testability, and optimizes performance. The templates demonstrate complete setup with handler organization and pipeline behavior.

Can I use Minimal APIs with SQL Server, PostgreSQL, or MongoDB?

Yes. Minimal APIs work with any data store via Entity Framework Core abstraction. The templates include repository pattern implementations supporting SQL Server, PostgreSQL, and MongoDB, letting you choose your database without changing API code.

Do I need prior knowledge of dependency injection and async patterns to use these templates?

The templates are designed for intermediate developers familiar with .NET fundamentals. They include built-in dependency injection setup, async/await best practices, and error handling patterns, making them suitable for teams wanting to adopt Minimal APIs with minimal learning curve.

How does error handling work in these Minimal API templates?

Error handling uses endpoint filters and result patterns via the ErrorOr library to standardize validation and exception responses. Responses include structured error details and HTTP status codes, providing consistent API behavior across all endpoints.