/bricelam:csharp-xml-docsfrom bricelam
Conventions for writing C# XML documentation comments (`///`)---when to write them, which tags to use, and standard wording for `<summary>`, `<param>`, `<returns>`, `<value>`, and `<exception>`. Use whenever writing, reviewing, or editing `///` comments or documenting a C# API.
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.
Only write XML doc comments on public APIs. On non-public members they incur a compilation time and output size cost for no benefit---if a non-public member needs a non-obvious explanation, use a regular // comment instead.
| Prefer | Over |
|---|---|
<see cref=""/> | <c> |
<paramref name=""/> | <c> |
<typeparamref name=""/> | <c> |
<see langword=""/> | <c> |
<b> | <strong> |
<i> | <em> |
The <b> and <i> preferences are deliberate, even though they're the opposite of the usual semantic-HTML advice: <em> isn't a recommended XML doc tag, and some tools don't process <strong>.
Use <c> sparingly; it's visually heavy. For example, use it only on the first occurrence, only when the content is highly relevant, or only when it would otherwise be ambiguous whether the text refers to code.
Avoid <br/>.
<summary> with a third-person verb (e.g. "Gets", "Creates", "Determines").<summary> brief.<param>, <typeparam>, <value>, and <returns> with a noun.| Target | Pattern |
|---|---|
Constructor <summary> | Initializes a new instance of the {class name} class. |
Finalizer <summary> | Finalizes an instance of the {class name} class. |
Property <summary> | Gets [or sets] [a value indicating whether]... |
Boolean <returns> and <value> | true if {condition}; otherwise, false. |
<exception> | {condition that completes "Thrown if..."}. |
"A value indicating whether" is only for boolean properties.
A property's <value> can be the same as its <summary> without "Gets or sets"---except for boolean properties, which use the boolean pattern above.
Write <exception> so it completes the sentence "Thrown if..."---but omit "Thrown if" itself. For example, " is ." rather than "The name cannot be null." or "Thrown if the name is null."
Example:
/// <summary>
/// Represents a blog.
/// </summary>
public class Blog
{
/// <summary>
/// Initializes a new instance of the <see cref="Blog"/> class.
/// </summary>
/// <param name="name">The name of the blog.</param>
/// <exception cref="ArgumentNullException"><paramref name="name"/> is <see langword="null"/>.</exception>
public Blog(string name)
=> Name = name ?? throw new ArgumentNullException(nameof(name));
/// <summary>
/// Gets or sets the name of the blog.
/// </summary>
/// <value>The name of the blog.</value>
public string Name { get; set; }
/// <summary>
/// Gets or sets a value indicating whether the blog is archived.
/// </summary>
/// <value><see langword="true"/> if the blog is archived; otherwise, <see langword="false"/>.</value>
public bool IsArchived { get; set; }
}
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
15 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-linq-query-syntaxHow 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./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.npx claudepluginhub bricelam/bricelam-plugins --plugin bricelam