# Build Production ASP.NET Core Backends

Building reliable .NET APIs requires consistent patterns for data access, security, background work, and testing. This skill provides practical ASP.NET Core and EF Core guidance.

## Install

```bash
npx skillstore add sickn33/dotnet-backend
```

## Metadata

- Status: approved
- Slug: sickn33-dotnet-backend
- Skillstore revision: r2
- Version status: missing
- Tree hash: 92bf0027776602824260e6ca4aacc9e5231b5d1999faac9aa030961b888b193c
- Author: sickn33
- GitHub username: sickn33
- License: MIT
- Repository: https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/dotnet-backend
- Ref: 88a8e9a07f4c54ab105c1c41b6267c287146b07b
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands
- Quality score: 78
- Quality tier: bronze
- Public page: https://skillstore.pages.dev/skills/sickn33-dotnet-backend
- Manifest: https://skillstore.pages.dev/api/skills/sickn33-dotnet-backend/manifest

## Capabilities

- Build controller-based and Minimal APIs with validation, DTOs, dependency injection, and structured responses.
- Design EF Core data access with migrations, eager loading, projections, and read-only query optimization.
- Implement JWT authentication and role, claim, or policy-based authorization.
- Create hosted workers and scheduled jobs using BackgroundService, Hangfire, or Quartz.NET.
- Apply caching, asynchronous I/O, health checks, structured logging, and exception handling.
- Recommend testing approaches with xUnit, NUnit, Moq, and FluentAssertions.

## Use Cases

- Create a New Service: Define API endpoints, persistence, validation, authentication, and tests for a new ASP.NET Core service.
- Improve Data Access: Review EF Core queries and service boundaries to reduce tracking, excessive loading, and database round trips.
- Modernize a Backend: Plan upgrades from older .NET patterns to modern dependency injection, authentication, observability, and background processing.

## Prompt Templates

### Create a Minimal API

```
Create an ASP.NET Core 8 Minimal API for [resource]. Include validation, EF Core persistence, DTOs, and clear setup notes.
```

### Add JWT Security

```
Add JWT authentication and policy-based authorization to my [application type]. Explain configuration, token validation, claims, and protected endpoint changes.
```

### Optimize EF Core

```
Review this EF Core query: [query]. Identify correctness and performance issues, then propose an optimized version with testing recommendations.
```

### Design a Production Architecture

```
Design a production backend for [domain] with APIs, persistence, background jobs, observability, resilience, and tests. State assumptions and architecture tradeoffs.
```

## Limitations

- Guidance targets ASP.NET Core 8\+ and may require changes for older .NET Framework applications.
- The skill does not implement client-side interfaces.
- Cloud deployment details require an explicit provider and environment description.
- Generated designs require project-specific security review, configuration, and testing before production use.

## Best Practices

- Provide the target .NET version, database, authentication model, deployment environment, and existing project structure.
- Request tests and security assumptions with every generated endpoint or background process.
- Validate generated migrations, configuration, queries, and authorization rules in a representative environment.

## Anti Patterns

- Do not request production code without domain rules, data constraints, or access requirements.
- Do not place secrets, connection strings, or real tokens in prompts.
- Do not deploy generated code before review, automated tests, dependency checks, and performance validation.

## Security Audit

- Audited at: 2026-07-23T22:57:05.838\+00:00
- Summary: All seven external-command alerts are false positives caused by Markdown code fences around C\# examples. The reconnaissance alert matches a normal ASP.NET Core response, and no malicious intent or prompt injection was found.

## Stats

- Views: 94
- Downloads: 13
- Favorites: 0
- Popularity score: 0
