dotnet-carter
Installation
SKILL.md
.NET Carter Framework
Overview
Carter is a framework that provides minimal API functionality with declarative, organized routing for .NET applications. This skill should be invoked when building lightweight REST APIs in .NET that benefit from cleaner route definitions compared to traditional controller-based approaches. Carter is ideal for microservices and small-to-medium APIs where you want reduced boilerplate.
Core Principles
- Declarative Routing: Define routes using fluent methods rather than attributes, improving readability
- Module Organization: Group related routes into module classes implementing ICarterModule
- Minimal Footprint: Carter adds minimal overhead compared to full MVC frameworks
- Composition: Modules can be composed together, enabling clean separation of concerns
Preparation Checklist
- Install Carter NuGet package:
Install-Package Carter - Understand the endpoint routing model in .NET
- Plan your route module organization by domain/feature
- Decide if you need MediatR integration for command/query separation