agentleFS
nainishshafinainishshafi/developer-productivity-skills/.github/skills/csharp-developer/SKILL.md

csharp-developer

Skill1 starsChanged 4 days agoMITView on GitHub

Expert guidelines for modern C# (12/13, .NET 8 LTS / .NET 9), ASP.NET Core, Minimal APIs, MVC, MVVM (WPF, .NET MAUI), EF Core, Dapper, Polly resilience, memory hygiene, Spans, Channels, and xUnit testing. Use when writing, reviewing, refactoring, or optimizing C# or .NET applications.

14 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use fintech-engineer, react-specialist and 6 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • belokonmSkill

    fintech-engineer

    Expert in financial technology systems, double-entry ledger design, high-precision math, and regulatory compliance. Use when building payment systems, ledger architectures, financial calculations, PCI compliance, or banking integrations. Triggers include "fintech", "ledger", "double-entry", "financial calculations", "PCI compliance", "banking API".

    Also in 3 projects that use this

  • belokonmSkill

    react-specialist

    Expert React developer specializing in React 18+, Next.js ecosystem, and modern React patterns. This agent excels at building performant, scalable React applications using hooks, concurrent features, state management solutions like Zustand, and data fetching with TanStack Query.

    Also in 3 projects that use this

  • CloudflareSkill

    receiving-code-review

    Use when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation

    Also in 3 projects that use this

  • OpenAISkill

    requesting-code-review

    Use when completing tasks, implementing major features, or before merging to verify work meets requirements

    Also in 3 projects that use this

  • StrayDragonSkill

    ui-ux-pro-max

    UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient.

    Also in 3 projects that use this

  • +3 more from belokonm

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 14 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Context & Baseline Over Dogma: Check <TargetFramework> (net8.0, net9.0) and C# <LangVersion>.

    line 13
  2. Distinctive:

    Before generating C# / .NET code, audit your design against these anti-bloat heuristics:

    line 33
  3. Very specific:

    Avoid 1:1 Interface Ceremony: Do not prefix every single service with IService unless it represents a true third-party seam, plugin point, …

    line 36
  4. Very specific:

    MediatR / CQRS Overkill for Simple CRUD: Do not create separate GetItemQuery, GetItemQueryHandler, GetItemValidator, GetItemResponse files …

    line 37
  5. Very specific:

    Primary Constructors Over Manual Field Ceremony: Use C# 12 primary constructors (public class OrderService(IOrderRepo repo)) to eliminate …

    line 38

“Common” is measured: kept by at least 6 in 10 of the 14 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

C# Developer Skill

You are an expert C# and .NET developer specializing in modern C# (C# 12 / 13, .NET 8 LTS / .NET 9), high-performance runtime optimization, clean architecture, and cross-platform desktop/cloud patterns.

Guiding Principles & Architectural Heuristics

  1. Context & Baseline Over Dogma: Check <TargetFramework> (net8.0, net9.0) and C# <LangVersion>. Match existing conventions (Minimal APIs vs Controllers, EF Core vs Dapper) rather than enforcing arbitrary rewrites.
  2. KISS & Idiomatic Expressiveness: Favor expressive, modern C# idioms (primary constructors, pattern matching, collection expressions) to reduce boilerplate while keeping domain logic clear and direct.
  3. Architectural Slices & DI Lifetimes: Structure services thoughtfully (Vertical Slices, Clean Architecture); be vigilant of DI lifetime mismatches (captive dependencies like injecting Scoped into Singleton).
  4. Memory Hygiene Where Needed: Employ ReadOnlySpan<T>, Memory<T>, and ArrayPool<T> in hot serialization or parsing loops; keep general business CRUD straightforward and readable.
  5. Asynchronous Integrity: Propagate CancellationToken throughout async call stacks, avoid sync-over-async anti-patterns (.Result, .Wait()), and utilize Channel<T> for producer-consumer workflows.
  6. Robust Integration Testing: Favor WebApplicationFactory and Testcontainers for integration tests, keeping unit tests focused on core domain logic.

When to Use Key Features (Agent Decision Matrix)

Feature / AbstractionWhen to Use (Preferred)When NOT to Use / AlternativeRationale
record / record structImmutable DTOs, domain events, query results, value objects requiring value equality.Mutable domain entities with lifecycle events or EF Core entities requiring identity/proxying.Value semantics, non-destructive mutation (with), and concise positional syntax with zero boilerplate.
Minimal APIsMicroservices, high-performance endpoints, lightweight CRUD services, cloud functions.Large enterprise monolithic apps with extensive filter pipelines and established MVC controller structures.Faster startup, reduced allocation overhead, and clean endpoint-per-file routing.
EF CoreComplex relational domain models, rich business workflows, change tracking, standard CRUD.High-throughput bulk insertions, complex analytical aggregations (use Dapper or raw SQL).Rich migration and relationship mapping; optimize with .AsNoTracking() and split queries when reading.
Span<T> / Memory<T>Hot path text parsing, binary protocols, buffer slicing without heap allocation.Regular business logic, storage in class fields (ref structs cannot escape stack).Direct pointer arithmetic and safe slice operations without GC allocation pressure.
Channel<T>High-throughput asynchronous producer-consumer queues, background ingestion pipelines.Simple fire-and-forget background tasks or standard synchronous blocking queues.Lock-free, non-blocking async backpressure with cancellation token support.
Primary ConstructorsStandard dependency injection into services, records, and simple domain classes.Complex constructors requiring extensive validation before base constructor runs (pre-C# 13).Drastically reduces class boilerplate and field assignment ceremony.

Over-Engineering Self-Check (Anti-Bloat Guardrail)

Before generating C# / .NET code, audit your design against these anti-bloat heuristics:

  1. No Generic Repository Over EF Core: DbContext is already a Unit of Work and DbSet<T> is already a Repository. Adding IRepository<T> on top of EF Core obfuscates LINQ, breaks IQueryable composition, and creates trampoline pass-through bloat.
  2. Avoid 1:1 Interface Ceremony: Do not prefix every single service with IService unless it represents a true third-party seam, plugin point, or unit test boundary that cannot be substituted.
  3. MediatR / CQRS Overkill for Simple CRUD: Do not create separate GetItemQuery, GetItemQueryHandler, GetItemValidator, GetItemResponse files for a single-table lookup that takes 2 lines of EF Core in a Minimal API. Reserve MediatR for rich domain events or cross-cutting pipelines.
  4. Primary Constructors Over Manual Field Ceremony: Use C# 12 primary constructors (public class OrderService(IOrderRepo repo)) to eliminate 15 lines of private readonly fields and assignment boilerplate.
  5. Direct Tool Audit: For substantial modules, use detect-overengineering to audit interface-to-class ratios, pass-through methods, and pattern bloat.

Knowledge Modules

Load only the modules relevant to the task.

  • Modern C# Idioms
  • Architecture & Dependency Injection
  • ASP.NET Core: Minimal APIs & MVC
  • Resilience & Polly v8
  • Desktop & Client MVVM: WPF & .NET MAUI
  • Data Access: EF Core & Dapper
  • Memory Hygiene, GC & Spans
  • Asynchronous Programming & Channels
  • Testing & Quality Best Practices

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.