csharp-validation

Community

Ensure robust C# input validation across layers

AuthorCloudyWing
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This skill provides clear, production-oriented guidance to eliminate inconsistent or misplaced input validation in C# applications by defining distinct responsibilities for format validation, business-rule checks, and domain invariants and by prescribing framework-specific integration patterns.

Core Features & Use Cases

  • Layered validation guidance: Clarifies which checks belong to model binding, service layer, and domain model to avoid duplication and maintainability issues.
  • Framework selection rules: When to use DataAnnotations versus FluentValidation and the rule to avoid mixing them for the same validation layer.
  • Integration patterns: Advice for MVC automatic ModelState handling, Minimal API endpoint filters, FluentValidation registration, and error message conventions (Traditional Chinese).
  • Defensive validation principles: Best practices for validation at system boundaries, constructor guards for domain invariants, and avoiding over-defensive repeated checks.
  • Use case: Code review or implementation of API request models, selecting validators, and ensuring consistent error messages and integration across an ASP.NET Core project.

Quick Start

Ask the skill to review a request model and return recommended DataAnnotations or a FluentValidation validator with Traditional Chinese error messages and integration notes for ASP.NET Core.

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-validation
Download link: https://github.com/CloudyWing/ai-dotfiles/archive/main.zip#csharp-validation

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.