enforcing-dto-record — C# record implementation enforcing-dto-record, task_20260212, community, C# record implementation, ide skills, DTO immutability, value equality in C#, enforcing-dto-record install, C# record benefits, Claude Code, Cursor

v1.0.0
GitHub

About this Skill

Perfect for C# Code Analysis Agents specializing in DTO validation and API contract enforcement. enforcing-dto-record is a skill that enforces the implementation of Data Transfer Objects (DTOs) as records in C#, ensuring immutability and value equality.

Features

Enforces DTO implementation as C# records
Provides immutability and value equality for DTOs
Replaces `sealed class` + `{ get; set; }` pattern with `record` + positional parameters or `{ get; init; }`
Excludes entities and domain models that require state changes
Improves code quality with `with` expression support

# Core Topics

christian289 christian289
[0]
[0]
Updated: 3/8/2026

Agent Capability Analysis

The enforcing-dto-record skill by christian289 is an open-source community AI agent skill for Claude Code and other IDE workflows, helping agents execute tasks with better context, repeatability, and domain-specific guidance. Optimized for C# record implementation, DTO immutability, value equality in C#.

Ideal Agent Persona

Perfect for C# Code Analysis Agents specializing in DTO validation and API contract enforcement.

Core Value

Enforces DTO immutability and value equality by mandating record types over classes, leveraging C#'s positional parameters and init-only properties. Provides automated detection of DTO patterns and transformation from class-based implementations with { get; set; } to record-based patterns with { get; init; }.

Capabilities Granted for enforcing-dto-record

Validating API request/response object immutability
Automating DTO refactoring from class to record syntax
Enforcing value equality semantics in serialization/deserialization scenarios

! Prerequisites & Limits

  • C# language specific
  • Excludes entities and state-changing domain models
  • Requires .NET 5+ for record support
Labs Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

enforcing-dto-record

Install enforcing-dto-record, an AI agent skill for AI agent workflows and automation. Works with Claude Code, Cursor, and Windsurf with one-command setup.

SKILL.md
Readonly

DTO는 record로 구현 강제

설명

DTO(Data Transfer Object)는 읽기 전용(ReadOnly) 객체입니다. C#에서 class가 아닌 record로 구현해야 합니다. record는 불변성(immutability), 값 기반 동등성(value equality), with 식을 기본 제공하므로 DTO에 최적입니다.

규칙

  • 모든 DTO 클래스는 class 대신 record로 선언합니다
  • 응답/요청 전용 객체, 직렬화/역직렬화 전용 객체가 대상입니다
  • 엔티티(Entity)나 상태 변경이 필요한 도메인 모델은 제외합니다
  • sealed class + { get; set; } 패턴을 record + 위치 매개변수(positional parameter) 또는 { get; init; } 패턴으로 변환합니다

Worst Case (나쁜 예)

csharp
1// DTO를 class로 구현 - 불변성 보장 없음, 보일러플레이트 과다 2private sealed class PagedResponse 3{ 4 public int Page { get; set; } 5 public int PageSize { get; set; } 6 public int TotalCount { get; set; } 7 public int TotalPages { get; set; } 8 public EmployeeDto[] Data { get; set; } = []; 9} 10 11private sealed class CreatedResponse 12{ 13 public int Count { get; set; } 14 public EmployeeDto[] Data { get; set; } = []; 15} 16 17private sealed class EmployeeDto 18{ 19 public string Name { get; set; } = ""; 20 public string Email { get; set; } = ""; 21 public string Tel { get; set; } = ""; 22 public DateTime Joined { get; set; } 23} 24 25// JSON 역직렬화용 DTO를 class로 구현 26private sealed class JsonEmployeeDto 27{ 28 public string? Name { get; set; } 29 public string? Email { get; set; } 30 public string? Tel { get; set; } 31 public string? Joined { get; set; } 32}

Best Case (좋은 예)

csharp
1// DTO를 record로 구현 - 불변성 보장, 간결한 코드 2private sealed record PagedResponse( 3 int Page, 4 int PageSize, 5 int TotalCount, 6 int TotalPages, 7 EmployeeDto[] Data); 8 9private sealed record CreatedResponse( 10 int Count, 11 EmployeeDto[] Data); 12 13private sealed record EmployeeDto( 14 string Name, 15 string Email, 16 string Tel, 17 DateTime Joined); 18 19// JSON 역직렬화용 DTO도 record로 구현 20private sealed record JsonEmployeeDto( 21 string? Name, 22 string? Email, 23 string? Tel, 24 string? Joined);

적용 대상

  • API 응답/요청 DTO
  • JSON 직렬화/역직렬화 매핑 객체
  • 테스트 코드의 역직렬화 DTO
  • 내부 데이터 전달용 객체

FAQ & Installation Steps

These questions and steps mirror the structured data on this page for better search understanding.

? Frequently Asked Questions

What is enforcing-dto-record?

Perfect for C# Code Analysis Agents specializing in DTO validation and API contract enforcement. enforcing-dto-record is a skill that enforces the implementation of Data Transfer Objects (DTOs) as records in C#, ensuring immutability and value equality.

How do I install enforcing-dto-record?

Run the command: npx killer-skills add christian289/task_20260212/enforcing-dto-record. It works with Cursor, Windsurf, VS Code, Claude Code, and 19+ other IDEs.

What are the use cases for enforcing-dto-record?

Key use cases include: Validating API request/response object immutability, Automating DTO refactoring from class to record syntax, Enforcing value equality semantics in serialization/deserialization scenarios.

Which IDEs are compatible with enforcing-dto-record?

This skill is compatible with Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer. Use the Killer-Skills CLI for universal one-command installation.

Are there any limitations for enforcing-dto-record?

C# language specific. Excludes entities and state-changing domain models. Requires .NET 5+ for record support.

How To Install

  1. 1. Open your terminal

    Open the terminal or command line in your project directory.

  2. 2. Run the install command

    Run: npx killer-skills add christian289/task_20260212/enforcing-dto-record. The CLI will automatically detect your IDE or AI agent and configure the skill.

  3. 3. Start using the skill

    The skill is now active. Your AI agent can use enforcing-dto-record immediately in the current project.

Related Skills

Looking for an alternative to enforcing-dto-record or another community skill for your workflow? Explore these related open-source skills.

View All

widget-generator

Logo of f
f

f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.

149.6k
0
AI

flags

Logo of vercel
vercel

flags is a Next.js feature management skill that enables developers to efficiently add or modify framework feature flags, streamlining React application development.

138.4k
0
Browser

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI

data-fetching

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
AI