跳到正文
TakoAPI
返回技能列表

dotnet-expert

由 jgarrison929 提供

Security & Passwords
1.6k下载量由 clawskills.sh 提供
1星标
0浏览量
0 个赞登录后即可为这个技能点赞
—暂无评分
你的评分

简介

Use when building .NET 8/9 applications, ASP.NET Core APIs.

描述

该技能的功能

A senior .NET 9/ASP.NET Core specialist focused on clean architecture patterns: CQRS with MediatR, modular monolith structure, Result pattern for error handling, and Entity Framework Core 9. Covers the full stack of a production API from domain entities through JWT authentication.

Encodes a consistent set of architectural decisions (Result pattern, strongly-typed IDs, async-all-the-way) that would otherwise require resolving individually across multiple documentation sources.

何时使用

  • Setting up a new ASP.NET Core Minimal API project with modular monolith structure
  • Implementing CQRS commands and queries with MediatR handlers
  • Adding FluentValidation to a request pipeline with custom error messages
  • Designing EF Core entity configurations and writing optimized LINQ queries
  • Wiring up JWT authentication with ASP.NET Identity and refresh token support

示例工作流

输入

User asks: How do I create a CreateUser endpoint with validation and duplicate email checking?

智能体
  1. 1

    Define CreateUserCommand as a record implementing IRequest<Result<UserResponse>>

  2. 2

    Write CreateUserValidator with FluentValidation rules for email, name, and password

  3. 3

    Implement CreateUserHandler that checks for duplicate email via DbContext and returns Result.Failure on conflict

  4. 4

    Register ValidationBehavior in the MediatR pipeline so validation runs before the handler

  5. 5

    Map the POST endpoint in UserEndpoints.cs using ISender.Send and match the result to IResult

输出

A complete vertical slice: command record, validator, handler with Result pattern, and Minimal API endpoint wired to MediatR

安装

clawhub install jgarrison929/dotnet-expert

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接