| name | code-quality |
| description | Guidelines for clean code, readability, and the "No Comments" policy. |
Code Quality Skill (BackEnd) - Asistente 2.1
Context
Clean code is essential for maintainable Backend logic, services, and APIs in .NET 8. We follow the "Zero Noise" and "Concrete DI" principles.
Guidelines
- NO COMMENTS & CERO RUIDO: The code must explain itself.
- PROHIBITION: XML comments (
/// <summary>) are strictly forbidden.
- PROHIBITION: Invasive or redundant comments are forbidden. Only comment "hacks" or complex edge cases that cannot be made clear by naming.
- Use clear, descriptive names for classes, methods, and variables.
- CONCRETE DI BY DEFAULT: You are prohibited from using interfaces (
interface IService, interface IRepository) by default.
- Rule: Register and inject concrete classes directly.
- Exceptions: Only use interfaces for:
- Polimorphism Real: Multiple implementations exist or are required now.
- Library Requirements: External libraries (Refit, etc.) demand them.
- Remove Dead Code: Never leave commented-out code blocks or unused private methods.
- C# Conventions:
- Use PascalCase for classes, methods, and public properties.
- Use camelCase for private fields (with
_) and parameters.
- Async/Await consistency: Always use
async and await with CancellationToken where possible.
- SOLID & Clean Architecture: Respect the layers (Domain -> Core -> Infrastructure/WebAPI). Never reference high-level layers from low-level ones.