From kagents
ASP.NET Core Minimal API for .NET 10 — MapGroup, endpoint routing, TypedResults, request/response records, IValidator<T>, OpenAPI generation. USE FOR: building REST API endpoints with Minimal API syntax, structuring endpoint groups, implementing request validation. DO NOT USE FOR: Blazor components (use blazor-patterns) or general C# patterns (use csharp-patterns).
npx claudepluginhub grexyloco/k.agents --plugin kagentsThis skill uses the workspace's default tool permissions.
```csharp
Expert guidance for Next.js Cache Components and Partial Prerendering (PPR). **PROACTIVE ACTIVATION**: Use this skill automatically when working in Next.js projects that have `cacheComponents: true` in their next.config.ts/next.config.js. When this config is detected, proactively apply Cache Components patterns and best practices to all React Server Component implementations. **DETECTION**: At the start of a session in a Next.js project, check for `cacheComponents: true` in next.config. If enabled, this skill's patterns should guide all component authoring, data fetching, and caching decisions. **USE CASES**: Implementing 'use cache' directive, configuring cache lifetimes with cacheLife(), tagging cached data with cacheTag(), invalidating caches with updateTag()/revalidateTag(), optimizing static vs dynamic content boundaries, debugging cache issues, and reviewing Cache Component implementations.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Share bugs, ideas, or general feedback.
var users = app.MapGroup("/api/users")
.WithTags("Users")
.RequireAuthorization();
users.MapGet("/", GetUsersAsync);
users.MapGet("/{id:guid}", GetUserByIdAsync);
users.MapPost("/", CreateUserAsync);
users.MapPut("/{id:guid}", UpdateUserAsync);
users.MapDelete("/{id:guid}", DeleteUserAsync);
static async Task<Results<Ok<UserResponse>, NotFound, ValidationProblem>> GetUserByIdAsync(
Guid id,
IUserService userService)
{
var user = await userService.GetByIdAsync(id);
return user is null
? TypedResults.NotFound()
: TypedResults.Ok(user.ToResponse());
}
users.MapPost("/", async (CreateUserRequest request, IValidator<CreateUserRequest> validator, IUserService service) =>
{
var result = await validator.ValidateAsync(request);
if (!result.IsValid)
return Results.ValidationProblem(result.ToDictionary());
var user = await service.CreateAsync(request);
return Results.Created($"/api/users/{user.Id}", user.ToResponse());
});
TypedResults statt Results (bessere OpenAPI-Generierung)static Methoden oder in Endpoint-Klassen