Skip to content
cccskills
FreePublished on GitHub

dotnet-best-practices

ASP.NET Core / C# production best practices: 40 reglas en 10 categorías (arquitectura, DI, errores, seguridad, performance, async, EF Core, testing, API, devops) priorizadas por impacto. Usar al escribir/revisar código .NET backend.

The English summary is being prepared. Showing the original description.

SebastianLuser/claude-code-arcane3 stars(GitHub 3 + cccskills 0)

Run score Not tested

See how to install

Files included (11)

  • SKILL.md4.2 KB
  • references/api-design.md2.7 KB
  • references/architecture.md2.6 KB
  • references/async.md2.4 KB
  • references/database.md2.4 KB
  • references/dependency-injection.md2.7 KB
  • references/devops.md2.7 KB
  • references/error-handling.md2.6 KB
  • references/performance.md2.1 KB
  • references/security.md2.7 KB
  • references/testing.md2.6 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

dotnet-best-practices — Guía priorizada por impacto

40 reglas para aplicaciones ASP.NET Core (.NET 10) production-ready, organizadas en 10 categorías y priorizadas de CRITICAL a LOW-MEDIUM. Cada regla del catálogo (en references/) trae impacto, ejemplo incorrecto, ejemplo correcto y link a docs.

MANDATORY WORKFLOW

No aplicar las 40 reglas a ciegas. Diagnosticar primero, priorizar por impacto.

Step 0: Determinar scope

  1. ¿Código nuevo o auditoría de existente? Si es auditoría, leer primero el feature/proyecto objetivo.
  2. ¿Qué categoría aplica? Mapear el área del problema (ver tabla) o usar all para review completa.
  3. ¿Hay síntomas concretos? (deadlocks, N+1, 500 inconsistentes, leaks) → ir directo a la categoría relevante.

Step 1: Priorizar por impacto

Aplicar en este orden — no bajar de nivel hasta resolver el anterior:

PrioridadCategoríaImpactoReference
1ArchitectureCRITICALreferences/architecture.md
2Dependency InjectionCRITICALreferences/dependency-injection.md
3Async & ConcurrencyHIGHreferences/async.md
4Error HandlingHIGHreferences/error-handling.md
5SecurityHIGHreferences/security.md
6PerformanceHIGHreferences/performance.md
7Database & EF CoreMEDIUM-HIGHreferences/database.md
8TestingMEDIUM-HIGHreferences/testing.md
9API DesignMEDIUMreferences/api-design.md
10DevOps & DeploymentLOW-MEDIUMreferences/devops.md

Step 2: Aplicar + verificar

Para cada regla relevante: leer el ejemplo correcto en el reference, aplicarlo, y verificar contra el checklist de cierre.

Step 3: Checklist de cierre

  • <Nullable>enable</Nullable> + warnings as errors; cero #nullable disable
  • Async end-to-end con CancellationToken; cero .Result/.Wait()/.GetAwaiter().GetResult()
  • DI por constructor con scope correcto; sin BuildServiceProvider() manual ni service locator
  • Errores vía ProblemDetails (RFC 7807); sin stack traces expuestos
  • Sin N+1 en EF Core (Include/projection); AsNoTracking() en lecturas
  • Migraciones versionadas; nunca EnsureCreated() en prod
  • AuthZ por policies declarativas; secrets en secret manager (no en appsettings.json)
  • Structured logging (Serilog JSON) + health checks
  • Tests con xUnit; integración contra Postgres real (Testcontainers), no mocks de DbContext

Si todo el checklist pasa → código COMPLIANT. Antes de escribir cambios significativos, confirmar el approach con el usuario (Question → Decision → Approval).

Tabla de mapeo síntoma → categoría

SíntomaCategoría
Deadlocks / thread pool starvation / app cuelgaAsync, Performance
Lentitud en endpoints, muchas queriesPerformance, Database
InvalidOperationException de DI / scopes / captured dependencyDI, Architecture
Errores 500 inconsistentes / leaks de stack tracesError Handling
Endpoints expuestos / brute force / data sensible en logsSecurity
Tests frágiles o que pegan a servicios/DB reales sin controlTesting
Respuestas inconsistentes / over-fetching de entidadesAPI Design

Próximos pasos

Para estructurar el proyecto → /dotnet-architecture. Para iniciar un backend nuevo con estos defaults → /dotnet-scaffold.


Adaptado de github/awesome-copilot (dotnet-best-practices), dotnet/skills y Aaronontheweb/dotnet-skills. Reorganizado al formato skill+references de Arcane.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Plan, design, and implement A/B tests and experiments with statistical rigor. Covers hypothesis frameworks, sample sizing, metrics, and result analysis.

The English summary is being prepared. Showing the original description.

SebastianLuser/claude-code-arcane3Updated Oct 27, 2026

Web/mobile accessibility decision guide: WCAG 2.2 AA, ARIA, keyboard nav, focus management, contrast, testing. Use for: a11y, accessibility, wcag, aria, screen reader, keyboard, contrast.

The English summary is being prepared. Showing the original description.

SebastianLuser/claude-code-arcane3Updated Oct 27, 2026

Generate, iterate, and scale ad creative for paid advertising across Google, Meta, LinkedIn, and X. Covers platform specs, creative frameworks, and quality validation.

The English summary is being prepared. Showing the original description.

SebastianLuser/claude-code-arcane3Updated Oct 27, 2026

Musica interactiva para juegos: layering vertical, re-secuenciacion horizontal, stingers, reglas de transicion con sync points, y mapeo de estados de gameplay a musica. Usar para: musica adaptativa, sistema de musica dinamica, transiciones musicales, combat music.

The English summary is being prepared. Showing the original description.

SebastianLuser/claude-code-arcane3Updated Oct 27, 2026

Design multi-agent systems, create agent architectures, define communication patterns, and build autonomous agent workflows with structured evaluation frameworks.

The English summary is being prepared. Showing the original description.

SebastianLuser/claude-code-arcane3Updated Oct 27, 2026

Inter-agent communication protocol for C-suite agent teams. Defines invocation syntax, loop prevention, isolation rules, response formats, and quality loops.

The English summary is being prepared. Showing the original description.

SebastianLuser/claude-code-arcane3Updated Oct 27, 2026

See all skills by SebastianLuser

Report a problem with this skill