/bricelam:csharp-linq-query-syntaxfrom bricelam
How to write a C# LINQ query expression (`from`...`select`) that ends in a method call like `Count()`, `ToList()`, or `First()`. Use whenever a query expression needs a trailing method call.
Ships in bricelam. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A query expression has no syntax of its own for calls like Count or ToList---don't append one by parenthesizing the whole expression. Instead, pass the query expression as an argument to the equivalent Enumerable/Queryable static method.
Prefer:
var count = Queryable.Count(
from b in db.Blogs
where b.Name.Contains(".NET")
select b);
Over:
var count = (from b in db.Blogs
where b.Name.Contains(".NET")
select b).Count();
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub bricelam/bricelam-plugins --plugin bricelam15 skills in this plugin
/csharp-collectionsC# collection conventions---choosing between ToList, new List, and collection-expression spread to materialize or copy a sequence, and which collection interface to use for method parameters and return types. Use whenever materializing an enumerable into a list or declaring a collection-typed parameter or return type (arrays, `List<T>`, `IEnumerable<T>`, dictionaries, etc.)./csharp-csvhelperConventions for using CsvHelper in C#---aliasing its generically named attribute types. Use whenever writing or reviewing code that reads or writes CSV with CsvHelper, or whenever using CsvHelper's `FormatAttribute`, `IgnoreAttribute`, `NameAttribute`, or `TypeConverterAttribute`---even if CsvHelper isn't named explicitly./csharp-librariesWhich NuGet package or BCL API to use when several compete for the same job in C#/.NET (HTTP resilience, YAML, JSON, MVVM, ORM, logging, versioning, DB drivers, UI frameworks, etc.), which libraries to avoid, and situational libraries worth using. Use whenever choosing or adding a package, or writing C# code that depends on one./csharp-lspWhen to use the LSP tool (Roslyn language server) while working in C# code---finding a symbol's definition, references, implementations, or callers, and checking a symbol's type or signature. Use whenever answering a question about how C# code is connected (who calls this, what implements this, where is this defined, what type is this) or before changing a C# member's signature---even if Grep seems sufficient./csharp-native-interopConventions for writing Win32 native interop code in C# using CsWin32 (the Microsoft.Windows.CsWin32 source generator). Use whenever writing or reviewing P/Invoke calls, Win32 API usage, or native interop code in C#---even if CsWin32 isn't named explicitly, e.g. requests to call a Win32 function, work with window handles/HWNDs, or add a `NativeMethods.txt` entry./csharp-primary-constructorsDon't use C# primary constructors on classes or structs. Use whenever writing a C# class or struct with constructor parameters, or when an IDE/analyzer suggests converting to a primary constructor.