csharp
Skill15 starsChanged 42 days agoMITView on GitHub
Expert C# and .NET assistance covering LINQ, async/await patterns, pattern matching, records, Entity Framework Core, and ASP.NET Core web services. Use when writing idiomatic C#, designing .NET enterprise backends, building cross-platform services, or optimizing memory with span/memory types.
8 other projects use a version of this.
Adopted by
Most recently taken up by
- TheLunchTrae/claude-code-configstheir own version, first seen Nov 8, 2026
- testdino-hq/google-styleguides-skillstheir own version, first seen Nov 8, 2026
- ericwood8/skillstheir own version, first seen Nov 1, 2026
- EntitySystems/DysonHarnesstheir own version, first seen Oct 13, 2026
- jnotsknab/mux-swarmtheir own version, first seen Oct 11, 2026
- authdog/agent-skillstheir own version, first seen Sep 18, 2026
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 8
- testdino-hq/google-styleguides-skills★ 15same name
- jnotsknab/mux-swarm★ 9same name
- EntitySystems/DysonHarness★ 4same name
- ffsshhttiikk/opencode-agents-skills★ 2same name
- kimtth/agent-skill-100-lines-or-less★ 2same name
- ericwood8/skills★ 1same name
- authdog/agent-skills★ 0same name
- TheLunchTrae/claude-code-configs★ 0same 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 repository350 other files it gives its agents.
- airflowSkill
- catboostSkill
- claudeSkill
- comfyuiSkill
- cursor-aiSkill
- dalleSkill
- daskSkill
- dbtSkill
- deepseekSkill
- fastaiSkill
- geminiSkill
- github-copilotSkill
- huggingfaceSkill
- jaxSkill
- jupyterSkill
- kerasSkill
- langchainSkill
- lightgbmSkill
- llamaindexSkill
- llamaSkill
- matplotlibSkill
- midjourneySkill
- mistralSkill
- mlflowSkill
- nltkSkill
- numpySkill
- ollamaSkill
- openai-gptSkill
- opencvSkill
- pandasSkill
- perplexitySkill
- plotlySkill
- polarsSkill
- pytorchSkill
- raySkill
- scikit-learnSkill
- seabornSkill
- spacySkill
- sparkSkill
- stable-diffusionSkill
- tensorflowSkill
- vaexSkill
- weights-biasesSkill
- whisperSkill
- xgboostSkill
- api-gatewaySkill
- clean-architectureSkill
- cqrsSkill
- domain-driven-designSkill
- event-drivenSkill
- event-sourcingSkill
- graphqlSkill
- grpcSkill
- hexagonalSkill
- microservicesSkill
- modular-monolithSkill
- monolithSkill
- rest-apiSkill
- sagaSkill
- serverlessSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 0 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 135
Use Dependency Injection & Options Pattern: Inject strongly-typed configurations via IOptions<T> and constructor injection.
- Very specific: line 136
Use ValueTask<T> on Frequently Cached Code Paths: Reduce GC allocations by returning ValueTask when operations often complete synchronously.
- Very specific: line 142
Use mutable shared singletons without thread safety: Use ConcurrentDictionary or proper synchronization primitives.
“Common” is measured: kept by at least 6 in 10 of the 7 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.
Files
C#
Modern C# development with .NET 8+, async patterns, and Entity Framework.
When to Use
- Enterprise Web Backends & Microservices: Building high-throughput ASP.NET Core web APIs and gRPC microservices on modern .NET 8/9.
- Cross-Platform Mobile & Desktop (MAUI): Compiling native iOS, Android, macOS, and Windows applications from a single C# codebase.
- Cloud-Native AWS & Azure Infrastructure: Deploying scalable serverless functions, containerized workers, and event-driven apps.
- Game Development with Unity / Godot: Developing gameplay logic, physics, and state machines in leading game engines.
Quick Start
public record User(string Id, string Name, string Email);
public class UserService
{
public async Task<User?> GetUserAsync(string id)
{
return await _repository.FindByIdAsync(id);
}
}Core Concepts
Records & Pattern Matching (C# 12/13)
Immutable data structures with value equality and expressive switch expressions:
// Positional Record with built-in value equality
public record Order(string Id, decimal Amount, string Status);
public static class OrderClassifier
{
public static string Evaluate(Order order) => order switch
{
{ Status: "PAID", Amount: > 1000 } => "High-Value Order",
{ Status: "PAID" } => "Standard Order",
{ Status: "CANCELLED" } => "Void Order",
_ => "Pending Review"
};
}Memory Optimization with Span<T> and ReadOnlySpan<T>
Allocates and slices continuous memory buffers on the stack without heap GC allocations:
public static bool TryParseYear(ReadOnlySpan<char> dateSpan, out int year)
{
// Slice without allocating new sub-strings
ReadOnlySpan<char> yearSpan = dateSpan.Slice(0, 4);
return int.TryParse(yearSpan, out year);
}Async / Await with ValueTask
Efficient asynchronous programming minimizing task object allocations on hot paths:
public async ValueTask<UserProfile> GetUserProfileAsync(string userId)
{
if (_cache.TryGetValue(userId, out var cached))
return cached; // Synchronous return allocates zero task objects
return await _repository.FetchFromDatabaseAsync(userId);
}Common Patterns
Declarative Data Transformations with LINQ
Problem: Imperative nested loops and mutation when filtering, projecting, and sorting collections.
Solution:
// Query syntax
var adults = from user in users
where user.Age >= 18
orderby user.Name
select user;
// Method syntax (preferred)
var result = users
.Where(u => u.IsActive)
.OrderBy(u => u.Name)
.Select(u => new UserDto(u.Id, u.Name))
.ToList();
// Grouping
var byCountry = users
.GroupBy(u => u.Country)
.ToDictionary(g => g.Key, g => g.ToList());Pattern Matching
Problem: Verbose cascading conditional checks and manual type casting leading to runtime type errors.
Solution:
string GetStatus(object obj) => obj switch
{
User { IsActive: true } => "Active user",
User { IsActive: false } => "Inactive user",
null => "No data",
_ => "Unknown"
};
// List patterns
if (numbers is [var first, _, var last])
{
Console.WriteLine($"First: {first}, Last: {last}");
}Best Practices
Do:
- Enable Nullable Reference Types (
<Nullable>enable</Nullable>): Catch null reference exceptions at compile time across the codebase. - Use Dependency Injection & Options Pattern: Inject strongly-typed configurations via
IOptions<T>and constructor injection. - Use
ValueTask<T>on Frequently Cached Code Paths: Reduce GC allocations by returningValueTaskwhen operations often complete synchronously. - Leverage Native AOT Compilation: Compile .NET applications to native machine code (
PublishAot=true) for sub-10ms startup and tiny memory footprints.
Don't:
- Block async code with
.Resultor.Wait(): Synchronous blocking on asynchronous tasks causes immediate thread pool deadlocks. - Use mutable shared singletons without thread safety: Use
ConcurrentDictionaryor proper synchronization primitives. - Instantiate
HttpClientper request: UseIHttpClientFactoryto prevent socket exhaustion.
Troubleshooting
| Error | Cause | Solution |
NullReferenceException | Accessing null | Enable nullable, use ?. |
ObjectDisposedException | Using disposed resource | Check lifetime, use using |
TaskCanceledException | Operation cancelled | Handle or propagate |
References
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.

