fluent-validation

Generate FluentValidation validators for MediatR commands and queries in .NET projects.

Updated Apr 4, 2026
One-click install
npx skills add https://github.com/hiiamsky/multi-agent-dev-team --skill fluent-validation-hiiamsky
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fluent-validation
Source: https://github.com/hiiamsky/multi-agent-dev-team/tree/main/.github/skills/dotnet-fluent-validation
Command: npx skills add https://github.com/hiiamsky/multi-agent-dev-team --skill fluent-validation-hiiamsky

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This tool automates the creation of FluentValidation validators for commands and queries, reducing boilerplate and ensuring consistent validation across the codebase.

Core Features & Use Cases

  • Declarative, readable validation rules via FluentValidation.
  • Inline and standalone validators that integrate with MediatR pipeline behaviors.
  • Reusable validators and comprehensive templates for common patterns (basic command validators, nested validators, collection validators, async checks).

Quick Start

Create a Create{Entity}CommandValidator following the Inline Validator template and register it in the DI container.

Frequently Asked Questions about fluent-validation

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

FAQPage Schema
How do I generate FluentValidation validators for MediatR commands automatically?

You can generate FluentValidation validators for MediatR commands automatically by using templates for basic, inline, async, and nested validators, which reduces boilerplate and ensures consistent validation across your .NET projects.

What is the best way to reduce boilerplate when creating command validators in C#?

The best way to reduce boilerplate when creating C# command validators is to automate generation using declarative FluentValidation templates that cover Create/Update commands, nested rules, and collection validations.

Can I use inline validators with MediatR pipeline behaviors in a .NET project?

Yes, you can use inline and standalone validators with MediatR pipeline behaviors in a .NET project. The generated validators integrate directly into the pipeline and include dependency injection registration.

How do I set up dependency injection for generated FluentValidation validators?

To set up dependency injection for generated FluentValidation validators, register the generated validator classes in your DI container using the provided DI registration templates to link them to MediatR pipeline behaviors.

Does the validator generation support nested rules and collection validations?

Yes, the validator generation supports nested rules and collection validations. It provides comprehensive templates that handle complex validation patterns, including reusable validators and asynchronous checks across .NET projects.

When should I avoid using automated FluentValidation templates?

You should avoid using automated FluentValidation templates if your .NET project does not use MediatR for the command/query pipeline, as the templates specifically generate validators designed to integrate with MediatR pipeline behaviors.