dotnet-coding-standards
Skill9 starsChanged 3 months agoMITView on GitHub
명시적 `/dotnet-coding-standards` 호출 전용 .NET 참고서. 일반 구현에는 자동 적용하지 않고 프로젝트 구조와 네이티브 코딩 능력을 우선한다.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- Roly67/cc-skillstheir own version, first seen Jan 11, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- Roly67/cc-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository110 other files it gives its agents.
- AGENTS.mdAGENTS.md
- skills/orchestrator/mcp-server/AGENTS.mdAGENTS.md
- skills/supabase-postgres-best-practices/AGENTS.mdAGENTS.md
- skills/vercel-react-best-practices/AGENTS.mdAGENTS.md
- agent-md-refactorSkill
- agent-team-codexSkill
- agent-teamSkill
- antigravity-mnemoSkill
- antigravitySkill
- api-handoffSkill
- api-testerSkill
- argosSkill
- atlasSkill
- auto-continue-loopSkill
- autoresearchSkill
- biz-strategySkill
- ceoSkill
- clioSkill
- code-reviewerSkill
- codex-mnemoSkill
- codexSkill
- command-creatorSkill
- commit-workSkill
- consistency-auditSkill
- crafting-effective-readmesSkill
- daily-meeting-updateSkill
- database-schema-designerSkill
- datadog-cliSkill
- data-visualizationSkill
- dependency-updaterSkill
- deprecation-and-migrationSkill
- design-planSkill
- design-system-starterSkill
- devin-mnemoSkill
- diagram-designSkill
- docker-db-backupSkill
- docker-deploySkill
- documentation-and-adrsSkill
- docxSkill
- domain-dictionarySkill
- domain-name-brainstormerSkill
- draw-ioSkill
- estimateSkill
- excalidrawSkill
- excel2mdSkill
- explainSkill
- find-skillsSkill
- flow-verifierSkill
- frontend-designSkill
- fullstack-coding-standardsSkill
- game-changing-featuresSkill
- grok-mnemoSkill
- gs-certificationSkill
- health-dataSkill
- hestiaSkill
- humanizerSkill
- irisSkill
- jiraSkill
- ko-en-translatorSkill
- llm-provider-setupSkill
- The first 60 shown.
The file
Files
.NET Coding Standards - 통합 패키지
포함 파일
dotnet-coding-standards/
├── SKILL.md # 이 파일 (상세 코드 예시)
├── references/ # 핵심 규칙 (명시적 로드)
│ └── rules.md # 스킬 호출 시 읽는 규칙 본문
└── templates/ # 코드 템플릿 (on-demand)
├── csharp-patterns.md # Record DTO, Result, Pattern Matching, xUnit
├── aspnet-core.md # Program.cs, Minimal API, 미들웨어, JWT, Health
└── efcore-patterns.md # DbContext, DDD Entity, N+1, Migration, Audit참조 로딩 규칙
- 이
SKILL.md를 워크플로와 예시의 소유자로 사용합니다. - 스킬을 명시적으로 호출했을 때
references/rules.md를 읽고 현재 프로젝트에 필요한 규칙만 적용합니다. - C# 일반 패턴, ASP.NET Core, EF Core 중 요청과 맞는
templates/파일만 추가로 읽습니다.
이 규칙 본문은 스킬 안의 참조 문서이며 커스텀 에이전트로 등록되지 않습니다.
Clean Architecture 코드 예시
Program.cs (최소 설정)
var builder = WebApplication.CreateBuilder(args);
// 서비스 등록 (Extension Method로 정리)
builder.Services.AddApplicationServices();
builder.Services.AddInfrastructureServices(builder.Configuration);
builder.Services.AddApiServices();
var app = builder.Build();
// 미들웨어 파이프라인
app.UseExceptionHandler();
app.UseAuthentication();
app.UseAuthorization();
// 엔드포인트 매핑
app.MapControllers();
// 또는 Minimal API:
// app.MapItemEndpoints();
app.Run();DI 등록 (Extension Methods)
// Application/Extensions/ServiceCollectionExtensions.cs
public static class ApplicationServiceExtensions
{
public static IServiceCollection AddApplicationServices(this IServiceCollection services)
{
services.AddScoped<IItemService, ItemService>();
services.AddScoped<IOrderService, OrderService>();
services.AddValidatorsFromAssemblyContaining<ItemRequestValidator>();
return services;
}
}
// Infrastructure/Extensions/ServiceCollectionExtensions.cs
public static class InfrastructureServiceExtensions
{
public static IServiceCollection AddInfrastructureServices(
this IServiceCollection services, IConfiguration configuration)
{
services.AddDbContext<AppDbContext>(options =>
options.UseSqlServer(configuration.GetConnectionString("Default")));
services.AddScoped<IItemRepository, ItemRepository>();
services.AddMemoryCache();
return services;
}
}DTO 변환 예시
// record DTO (불변)
public record ItemRequest(
[Required] [StringLength(200)] string Name,
[StringLength(2000)] string? Description);
public record ItemResponse(
int Id,
string Name,
string? Description,
string Status,
DateTime CreatedAt);
// Extension Method로 변환
public static class ItemMappingExtensions
{
public static ItemResponse ToResponse(this Item item) => new(
item.Id,
item.Name,
item.Description,
item.Status.ToString(),
item.CreatedAt);
public static Item ToEntity(this ItemRequest request) => new()
{
Name = request.Name,
Description = request.Description ?? string.Empty,
Status = ItemStatus.Active
};
}FluentValidation 예시
public class ItemRequestValidator : AbstractValidator<ItemRequest>
{
public ItemRequestValidator()
{
RuleFor(x => x.Name)
.NotEmpty().WithMessage("이름은 필수입니다")
.MaximumLength(200).WithMessage("이름은 200자 이내여야 합니다");
RuleFor(x => x.Description)
.MaximumLength(2000).WithMessage("설명은 2000자 이내여야 합니다");
}
}
// Program.cs에 등록
builder.Services.AddValidatorsFromAssemblyContaining<ItemRequestValidator>();Repository 패턴 예시
// 인터페이스 (Domain 레이어)
public interface IItemRepository
{
Task<Item?> GetByIdAsync(int id, CancellationToken ct = default);
Task<(List<Item> Items, int Total)> GetPagedAsync(int page, int size, CancellationToken ct = default);
Task AddAsync(Item item, CancellationToken ct = default);
Task UpdateAsync(Item item, CancellationToken ct = default);
Task DeleteAsync(Item item, CancellationToken ct = default);
}
// 구현 (Infrastructure 레이어)
public class ItemRepository(AppDbContext context) : IItemRepository
{
public async Task<Item?> GetByIdAsync(int id, CancellationToken ct = default)
=> await context.Items.FindAsync([id], ct);
public async Task<(List<Item> Items, int Total)> GetPagedAsync(
int page, int size, CancellationToken ct = default)
{
var query = context.Items.AsNoTracking().OrderByDescending(i => i.CreatedAt);
var total = await query.CountAsync(ct);
var items = await query.Skip((page - 1) * size).Take(size).ToListAsync(ct);
return (items, total);
}
public async Task AddAsync(Item item, CancellationToken ct = default)
{
context.Items.Add(item);
await context.SaveChangesAsync(ct);
}
public async Task UpdateAsync(Item item, CancellationToken ct = default)
{
context.Items.Update(item);
await context.SaveChangesAsync(ct);
}
public async Task DeleteAsync(Item item, CancellationToken ct = default)
{
context.Items.Remove(item);
await context.SaveChangesAsync(ct);
}
}공통 타입 예시
// 페이징 결과
public record PagedResult<T>(
List<T> Items,
int TotalCount,
int Page,
int PageSize)
{
public int TotalPages => (int)Math.Ceiling(TotalCount / (double)PageSize);
public bool HasNext => Page < TotalPages;
public bool HasPrevious => Page > 1;
}
// 커스텀 예외
public class NotFoundException(string message) : Exception(message);
public class ConflictException(string message) : Exception(message);
public class ForbiddenException(string message) : Exception(message);잘못된 예시 (금지 패턴)
// 금지 - Entity 직접 반환
[HttpGet("{id}")]
public async Task<Item> GetById(int id) => await context.Items.FindAsync(id);
// 금지 - 동기 DB 호출
public Item GetById(int id) => context.Items.Find(id);
// 금지 - CancellationToken 누락
public async Task<Item?> GetByIdAsync(int id) => await context.Items.FindAsync(id);
// 금지 - DateTime.Now (시간대 문제)
item.CreatedAt = DateTime.Now;
// 올바른 예
[HttpGet("{id:int}")]
public async Task<IActionResult> GetById(int id, CancellationToken ct)
{
var result = await itemService.GetByIdAsync(id, ct);
return Ok(result); // DTO 반환
}상세 템플릿 (on-demand 로딩)
| 파일 | 내용 |
templates/csharp-patterns.md | Record DTO, Result 패턴, Pattern Matching, Extension, Generic Repository, xUnit |
templates/aspnet-core.md | Program.cs, Minimal API, Controller, 미들웨어, JWT, Options, Health Checks, Serilog |
templates/efcore-patterns.md | DbContext, DDD Entity, N+1 방지, Migration, 인덱스, Soft Delete, Audit, Compiled Queries |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

