dotnet-api

Design ASP.NET Core backend APIs with best-practice guidance for endpoints, security, and resilience.

Updated Dec 20, 2023
One-click install
npx skills add https://github.com/Thiago-Cruz-eng/Hibrygame --skill dotnet-api-thiago-cruz-eng
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-api
Source: https://github.com/Thiago-Cruz-eng/Hibrygame/tree/main/.claude/skills/dotnet-api
Command: npx skills add https://github.com/Thiago-Cruz-eng/Hibrygame --skill dotnet-api-thiago-cruz-eng

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you design and implement production-ready ASP.NET Core APIs by consolidating best practices for routing, data access, security, resilience, real-time communication, documentation, and long-running services. It reduces rework and prevents common architectural and security mistakes by providing topic-specific companion references.

Core Features & Use Cases

  • API construction foundations (Minimal APIs + route groups): Build endpoint structures with consistent binding, validation hooks, and response shaping, then document them with OpenAPI.
  • Backend production concerns: Apply middleware ordering guidance, EF Core patterns, connection resiliency, HTTP client best practices, and resilience with Polly.
  • Security and documentation at the same time: Implement API auth patterns (Identity/OIDC/JWT), OWASP hardening, secrets/crypto practices, CORS and rate limiting, and keep API docs synchronized using OpenAPI-as-docs or DocFX.

Quick Start

Ask the assistant to generate a versioned ASP.NET Core Minimal API (with authentication, rate limiting, resilience, EF Core data access, and OpenAPI documentation) for your specified endpoints and version strategy.

Frequently Asked Questions about dotnet-api

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a production-ready ASP.NET Core Minimal API with EF Core and OpenAPI documentation?

Building a production-ready ASP.NET Core Minimal API involves structuring endpoints with route groups, applying EF Core data access patterns, and generating OpenAPI documentation. This approach ensures consistent binding, validation, and maintainable API surfaces for production workloads.

How do I implement API versioning with sunset policies in ASP.NET Core?

Implementing API versioning in ASP.NET Core requires defining version strategies for your endpoints and applying sunset policies to deprecate older versions gracefully. This maintains backward compatibility while guiding consumers toward current API versions.

What is the best way to add Polly resilience and rate limiting to an ASP.NET Core backend?

The best way to add Polly resilience to an ASP.NET Core backend is configuring HTTP client best practices alongside middleware ordering for connection resiliency. Rate limiting and Polly policies prevent cascading failures and throttle abusive API traffic.

Can I use controller-based APIs with SignalR and gRPC instead of Minimal APIs?

Yes, you can use controller-based APIs instead of Minimal APIs while still integrating SignalR, SSE, and gRPC for real-time communication. The guidance applies to both architectural styles, supporting messaging integrations and background services uniformly.

How do I apply OWASP hardening and JWT authentication to an ASP.NET Core API?

Applying OWASP hardening and JWT authentication to an ASP.NET Core API requires setting up Identity, OIDC, or JWT auth patterns alongside secrets and cryptography guidance. CORS and rate limiting configurations further secure the public API surface.

When should I use Aspire orchestration for ASP.NET Core APIs?

You should use Aspire orchestration for ASP.NET Core APIs when deploying distributed architectures that require coordinated background services and messaging integrations. It provides orchestration capabilities for complex, distributed backend API environments.