csharp-aspnetcore

Community

Enforce ASP.NET Core best practices

AuthorCloudyWing
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Prevents common ASP.NET Core mistakes such as incorrect dependency injection lifetimes, improper HttpClient usage that leads to socket exhaustion, inconsistent API response formats, and missing API versioning that causes breaking changes and maintenance burden.

Core Features & Use Cases

  • DI Lifetime Guidance: Recommends Singleton/Scoped/Transient usage patterns and warns about captive dependencies and injecting scoped services into singletons.
  • HttpClient Safety: Enforces IHttpClientFactory or typed/named clients instead of creating HttpClient instances per request.
  • Response Consistency & Versioning: Mandates ProblemDetails-based error responses and respects project API versioning settings when generating or modifying endpoints.
  • Configuration & Background Services: Promotes the Options Pattern for typed configuration and correct BackgroundService/IHostedService registration patterns.
  • Use Case: When adding a new controller or refactoring services, the skill audits registrations, suggests lifetime changes, enforces HttpClient factory usage, and ensures error responses follow RFC 7807.

Quick Start

Apply the csharp-aspnetcore skill to audit the current repository for DI lifetimes, HttpClient usage, response formatting, options pattern usage, and API versioning and provide actionable recommendations.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: csharp-aspnetcore
Download link: https://github.com/CloudyWing/ai-dotfiles/archive/main.zip#csharp-aspnetcore

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.