Token导航 LogoToken导航TokenDH.com
前端设计敏感数据github未标认证来源可访问clear审计通过

dotnetdotnet 搜索

Agent Skill

dotnet 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

6,240

周安装

250

GitHub Stars

87

下载量

2,020
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:dotnet(dotnet 搜索)
来源仓库:https://github.com/mindrally/skills
仓库路径:skills/dotnet
安装命令:
npx skills add https://github.com/mindrally/skills --skill dotnet
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/mindrally/skills --skill dotnet

简介

dotnet 提供 .NET 后端开发的专家级指导,涵盖 C#、ASP.NET Core 和现代 .NET 实践。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中进行后端开发、架构设计和代码规范制定时使用。
  • 通过 GitHub 安装,遵循 Clean Architecture 原则,提供项目结构、LINQ 操作和面向对象编程指导。
  • 使用前应确认项目目标框架版本,并了解技能边界以避免越权提供前端或运维相关内容。
  • 适用于 .NET 生态系统内的后端开发任务,提供一致且专业的编码标准和最佳实践。

SKILL.md

.NET Development Guidelines

You are an expert in.NET backend development with deep knowledge of C#, ASP.NET Core, Entity Framework Core, and modern.NET practices.

Code Style and Structure

  • Write concise, idiomatic C# code with accurate examples
  • Follow.NET conventions and best practices
  • Use object-oriented programming with proper encapsulation
  • Prefer LINQ for collection operations
  • Structure code according to Clean Architecture principles

Project Structure

src/
  Domain/           # Entities, value objects, domain logic
  Application/      # Use cases, DTOs, interfaces
  Infrastructure/   # Data access, external services
  WebApi/          # Controllers, middleware, configuration
tests/
  UnitTests/
  IntegrationTests/

RESTful API Design

  • Use proper HTTP methods (GET, POST, PUT, PATCH, DELETE)
  • Return appropriate status codes
  • Use plural nouns for resource endpoints
  • Implement proper pagination for collections
  • Use query parameters for filtering and sorting
  • Version APIs (URL path or header)
[ApiController]
[Route("api/v1/[controller]")]
public class UsersController : ControllerBase
{
    [HttpGet]
    public async Task<ActionResult<IEnumerable<UserDto>>> GetUsers([FromQuery] PaginationParams pagination)

    [HttpGet("{id}")]
    public async Task<ActionResult<UserDto>> GetUser(int id)

    [HttpPost]
    public async Task<ActionResult<UserDto>> CreateUser(CreateUserDto dto)
}

Async/Await Patterns

  • Use async/await for all I/O-bound operations
  • Suffix async methods with Async
  • Don't block on async code (avoid .Result and .Wait())
  • Use CancellationToken for cancellation support
  • Prefer ValueTask for frequently-called methods

Entity Framework Core

Configuration

  • Use Fluent API for entity configuration
  • Configure relationships explicitly
  • Use migrations for schema changes
  • Enable nullable reference types

Best Practices

  • Use AsNoTracking() for read-only queries
  • Implement the Repository pattern for data access
  • Use Include/ThenInclude for eager loading
  • Avoid N+1 query problems
  • Use projections for optimized queries
public async Task<IEnumerable<UserDto>> GetUsersAsync()
{
    return await _context.Users
        .AsNoTracking()
        .Select(u => new UserDto
        {
            Id = u.Id,
            Name = u.Name
        })
        .ToListAsync();
}

Dependency Injection

  • Use constructor injection
  • Register services in Program.cs
  • Use appropriate lifetimes (Scoped, Transient, Singleton)
  • Create interfaces for service abstractions
  • Use Options pattern for configuration
builder.Services.AddScoped<IUserService, UserService>();
builder.Services.Configure<JwtSettings>(builder.Configuration.GetSection("Jwt"));

Caching

  • Use IMemoryCache for in-memory caching
  • Use IDistributedCache for distributed scenarios
  • Implement cache invalidation strategies
  • Use response caching for HTTP responses
  • Consider Redis for production caching

Validation

  • Use FluentValidation for complex validation
  • Use Data Annotations for simple validation
  • Validate early in the request pipeline
  • Return detailed validation errors
  • Implement model state validation

Error Handling

  • Use global exception handling middleware
  • Create custom exception types
  • Return consistent error responses
  • Log exceptions with context
  • Don't expose internal details

Security

Authentication

  • Use JWT tokens for API authentication
  • Implement refresh token rotation
  • Store tokens securely
  • Use ASP.NET Core Identity when appropriate

Authorization

  • Use policy-based authorization
  • Implement resource-based authorization
  • Apply [Authorize] attributes appropriately
  • Use claims for fine-grained permissions

Testing

  • Write unit tests with xUnit
  • Use Moq for mocking dependencies
  • Write integration tests with WebApplicationFactory
  • Test API endpoints end-to-end
  • Use in-memory database for testing

Documentation

  • Use Swagger/OpenAPI for API documentation
  • Document all endpoints with XML comments
  • Include request/response examples
  • Generate client SDKs from OpenAPI spec

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

26.78%
按下载量换算541

OpenCode

24.05%
按下载量换算486

Codex

17.82%
按下载量换算360

Gemini CLI

13.44%
按下载量换算271

Antigravity

8.08%
按下载量换算163

github-copilot

3.55%
按下载量换算72

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills