csharp-dotnet
БесплатноБез исполняемых скриптовНе проверенUse when writing, reviewing, testing, or shipping C# / .NET code — ASP.NET Core APIs (minimal APIs vs controllers), EF Core data access, async correctness…
от lza6★ 19 звёзд на GitHubОб этом скилле
Modern C# and .NET services
You write and review C#, ASP.NET Core APIs, and EF Core data access. You own the .NET idioms, the HTTP-contract patterns as expressed in .NET, async correctness, and the .NET-specific quality/security gates. You delegate everything language- agnostic to the right sibling.
Target: .NET 10 (LTS, released 2025-11-11, supported 3 years) with C# 14, EF Core
10, ASP.NET Core 10. .NET 9 / C# 13 is the immediate STS predecessor — still in
support but shorter-lived. Features gate on the target framework moniker (TFM): a
net10.0 project gets C# 14 by default; a net9.0 project caps at C# 13. When you
use a C# 14 feature (field, extension members, null-conditional assignment), say
which TFM it requires.
When NOT to use — delegate
| Situation | Route to |
|---|---|
| Java / Spring Boot backend | spring-boot |
| Node / NestJS TypeScript backend | nestjs |
| Language-agnostic threat modeling, OWASP authz/abuse review | ../secure-coding/SKILL.md |
| Raw Postgres schema/index/query tuning | ../postgresdb/SKILL.md |
| Framework-neutral REST resource taxonomy | api-design |
| Dockerfile / CI pipeline / deploy target | ../deployment/SKILL.md |
| Recording per-project conventions in the workspace wiki | ../harness/SKILL.md |
The .NET expression of an API contract and async correctness live HERE. Resource
naming theory lives in api-design; the JVM and Node counterparts are spring-boot
and nestjs.
Project & solution layout + dotnet CLI
dotnet new sln -n Shop # solution
dotnet new webapi -n Shop.Api # minimal API (default in .NET 10)
dotnet new webapi -n Shop.Api --use-controllers # opt into MVC controllers instead
dotnet new xunit -n Shop.Api.Tests # test project
dotnet sln add Shop.Api Shop.Api.Tests # wire into the solution
dotnet add Shop.Api package Npgsql.EntityFrameworkCore.PostgreSQL
dotnet ef migrations add Initial -p Shop.Api # create a migration
dotnet ef database update -p Shop.Api # apply migrations
dotnet build -warnaserror # compile; analyzers + NRT as errors
dotnet test # run tests
dotnet format # apply style; --verify-no-changes in CI
dotnet publish -c Release # produce deployable output
Recommended shape:
Shop.sln
Directory.Packages.props # central package management: <PackageVersion> here, no versions in csproj
Directory.Build.props # shared <Nullable>enable</Nullable>, <TreatWarningsAsErrors>, LangVersion
src/Shop.Api/ # endpoints grouped by feature module (Products/, Orders/)
src/Shop.Domain/ # entities, value objects (no EF/ASP.NET dependency)
tests/Shop.Api.Tests/
Central package management: turn it on with <ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
and list versions once in Directory.Packages.props. Why: one source of truth, no
version drift across projects.
NRT on for every project — <Nullable>enable</Nullable> in Directory.Build.props.
Why: the compiler turns whole classes of NullReferenceException into build-time
warnings. Never disable it to silence a warning — fix the nullability.
Modern C# idioms (C# 14 / .NET 10)
DTO as a record, not a class:
// Bad: mutable class, no value equality, hand-written boilerplate
public class ProductDto { public int Id { get; set; } public string Name { get; set; } }
// Good: immutable record DTO
public record ProductDto(int Id, string Name, decimal Price);
Why: value equality, with expressions, no boilerplate — and never reuse an EF entity
as the wire DTO (see anti-patterns).
Pattern matching over if-chains:
// Bad
if (shape is Circle) { var c = (Circle)shape; return Math.PI * c.R * c.R; }
// Good
return shape switch
{
Circle c => Math.PI * c.R * c.R,
Rectangle r => r.W * r.H,
_ => throw new ArgumentOutOfRangeException(nameof(shape)),
};
field keyword — field-backed property without a hand-written backing field
(requires C# 14 / net10.0):
// Bad: explicit backing field just to trim a string
private string _name = "";
public string Name { get => _name; set => _name = value.Trim(); }
// Good (C# 14)
public string Name { get; set => field = value.Trim(); }
Primary constructors, required/init, collection expressions:
public class OrderService(IOrderRepository repo, ILogger<OrderService> log) // primary ctor: DI in one line
{
public required string Region { get; init; } // must be set at construction, then immutable
private static readonly int[] DefaultTiers = [1, 2, 3]; // collection expression
}
Prefer NRT annotations over defensive null checks: declare string? note when null is
valid and let the compiler force callers to handle it, instead of `if (x ==
Установить csharp-dotnet в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл csharp-dotnet?
Use when writing, reviewing, testing, or shipping C# / .NET code — ASP.NET Core APIs (minimal APIs vs controllers), EF Core data access, async correctness, solution layout in .cs/.csproj/.sln. NOT a Java/Spring backend (that is spring-boot), NOT a Node/TypeScript backend (that is nestjs), NOT framework-neutral REST naming (that is api-design).
Как установить скилл csharp-dotnet?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл csharp-dotnet запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic