be-create-dtos

Generate immutable response and mutable request DTOs for .NET Core APIs.

1|Updated Mar 18, 2026
One-click install
npx skills add https://github.com/bmslabs/bmlabs-projects-templates --skill be-create-dtos
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: be-create-dtos
Source: https://github.com/bmslabs/bmlabs-projects-templates/tree/main/api-dotnet/.github/skills/be-create-dtos
Command: npx skills add https://github.com/bmslabs/bmlabs-projects-templates --skill be-create-dtos

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The skill accelerates data modeling by generating Data Transfer Objects (DTOs) for .NET Core APIs, eliminating repetitive boilerplate and ensuring consistent API contracts across projects.

Core Features & Use Cases

  • Immutable DTOs for responses and mutable DTOs for requests, with built-in validation hooks and XML documentation.
  • Follow-the-project conventions to support safe mapping, nullability, and UTC date handling, ready for ASP.NET Core apps.
  • Use Case: quickly scaffold DTOs for a new API endpoint (e.g., creating ProductDto and ProductRequestDto) to accelerate development and enforce consistency.

Quick Start

Proporciona el nombre de la entidad para generar su DTO de lectura y su DTO de escritura.

Frequently Asked Questions about be-create-dtos

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

FAQPage Schema
How do I generate DTOs for a .NET Core API?

You can scaffold DTOs for .NET Core APIs by providing an entity name to generate immutable response and mutable request DTOs. The output includes C# files with validation hooks, XML documentation, nullability, and UTC date handling.

What is the difference between request and response DTOs in ASP.NET Core?

Response DTOs are immutable to protect data integrity, while request DTOs are mutable to allow model binding and validation. This separation enforces consistent API contracts and safe mapping across ASP.NET Core applications.

Do I need C# 12 and .NET 8 to create immutable Data Transfer Objects?

Yes, creating these Data Transfer Objects requires C# 12 and .NET 8. You must also enable nullable reference types and handle UTC dates to ensure the generated DTO files follow established project conventions.

Can I automatically add XML documentation and validation to my C# DTOs?

Yes, you can automatically add XML documentation and validation hooks to C# DTOs. The generation process integrates these features directly into the output files to accelerate development and enforce API contract consistency.

What's the best way to eliminate boilerplate when modeling API contracts in C#?

The best way to eliminate boilerplate when modeling API contracts in C# is to automate DTO creation. This generates standardized immutable and mutable files with validation and XML docs, accelerating data modeling.