Writes and reviews C# XML documentation comments on public API surfaces following Microsoft's enterprise conventions. Covers tag order, phrasing rules, and contract-focused documentation.
Ships in dotnet. 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.
Write reference documentation to an enterprise production standard, not tutorial or learning material. Document the contract a caller depends on, not the mechanics a reader can see in the signature. The conventions match Microsoft's own guidance for writing .NET API reference comments: complete, correct, contextual, and polished. Every tag opens with a third-person singular verb, has no personal pronoun, and states a contract instead of a mechanism.
/// marker; use the one-line form for a single short clause.<code> block to the level its rendered output needs.<remarks>.you, we, I); state the fact about the member instead.so, that makes, which makes, because, rather than); if the clause states a fact the reader needs, make it its own sentence.Write the tags in this order.
<summary><value> — a property whose default or unit the caller needs<typeparam> — one per type parameter, in declaration order<param> — one per parameter, in declaration order<returns><exception> — one per contract throw<remarks><example>The skeleton is identical for every declaration; the opening phrase is what changes.
| Declaration | Summary opens with | Example |
|---|---|---|
| Class, struct, record | Represents …, Provides …, Defines … | Represents the host portion of a URI. |
| Static class with extensions | Extension methods for …, Provides extension methods for … | Provides extension methods for <see cref="IEndpointRouteBuilder" /> to add endpoints. |
| Interface | Defines a contract that …, Provides an interface for … | Defines a contract that represents the result of an HTTP endpoint. |
| Attribute | Specifies … | Specifies a collection of tags in <see cref="Endpoint.Metadata" />. |
| Exception type | Represents … error | Represents an HTTP request error. |
| Delegate | A function that …, A delegate that … | A function that can process an HTTP request. |
| Enum | Determines …, Indicates whether … | Determines how cookie security properties are set. |
| Enum member | the effect of selecting the value | Opts out of compression over HTTPS. |
| Constant, static readonly field | the meaning of the value | HTTP status code 201. |
| Constructor | Initializes a new instance of the <see cref="T" /> class. | — |
| Read-only property | Gets … | Gets the HTTP status code for this exception. |
| Read-write property | Gets or sets … | Gets or sets the prefix used to identify the current object. |
| Boolean property | Gets a value indicating whether … | — |
| Event | An event that fires when …, An event that is raised when … | An event that is raised when a field value changes. |
| Factory method | Creates a <see cref="T" /> … | Creates a <see cref="ChallengeHttpResult" /> for the response. |
| Registration method | Adds … to the specified <see cref="IServiceCollection" />. | — |
| Override, interface implementation | <inheritdoc /> | — |
| Explicit interface implementation | no doc comment | — |
A delegate has its <param> and <returns> on the type declaration.
An extension block has a <param> for its receiver, placed on the block; each member inside the block documents only its own parameters.
<param> and <returns> as noun phrases opening with The, A, or An, and end them with a period.A task that represents the asynchronous <operation> operation.; name the produced value when the task has one.The <see cref="T" /> for chaining. or A <see cref="T" /> that can be used to further customize the ….Try method documents the out parameter as When this method returns, contains …, and returns <see langword="true" /> if …; otherwise, <see langword="false" />..<summary> or <returns>.<exception> for a throw that is part of the contract; an argument guard at entry gets none.<inheritdoc /> on an override and on an implicit interface implementation.<remarks> under <inheritdoc /> when the implementation adds a caller-visible constraint the base contract does not state.<inheritdoc cref="…" /> when the source is not the immediate base member.<see cref="…" />.
A rename refactoring updates the reference.<paramref name="…" /> and <typeparamref name="…" />.<see langword="true" />, <see langword="false" />, <see langword="null" />.<c> for a literal value or fragment that names no symbol.<see href="https://…">Title</see>; HTTPS only.<list type="bullet"> with <item><description>…</description></item> when the behavior branches on argument combinations.<example> on a parsing or accessor member to show what a concrete input yields.<example> with <code> on an attribute or entry-point API whose call shape is not obvious from the signature; ordinary members get none.<para> only to split a long <remarks>.A default value, a threading or reentrancy rule, an ownership or disposal rule, a platform limit, an interaction with another member, or the behavior on an edge input.
/// <summary>
/// Represents a session opened against a document store.
/// </summary>
public sealed class DocumentSession : IDisposable
{
/// <summary>
/// Initializes a new instance of the <see cref="DocumentSession" /> class.
/// </summary>
/// <param name="store">The store the session reads from.</param>
public DocumentSession(IDocumentStore store)
{
Store = store;
}
/// <summary>
/// Gets the store the session reads from.
/// </summary>
public IDocumentStore Store { get; }
/// <summary>
/// Gets or sets the timeout applied to every read.
/// </summary>
/// <value>Defaults to 30 seconds.</value>
public TimeSpan ReadTimeout { get; set; } = TimeSpan.FromSeconds(30);
/// <summary>
/// Gets a value indicating whether the session has an open transaction.
/// </summary>
public bool IsTransactional { get; }
/// <summary>
/// An event that is raised when the session loads a document.
/// </summary>
public event EventHandler<DocumentLoadedEventArgs>? DocumentLoaded;
/// <summary>
/// Loads the document stored under the specified identifier.
/// </summary>
/// <param name="documentId">The identifier of the document to load.</param>
/// <param name="cancellationToken">A <see cref="CancellationToken" /> used to cancel the operation.</param>
/// <returns>
/// A task that represents the asynchronous load operation.
/// The task result contains the loaded document, or <see langword="null" /> when the identifier is unknown.
/// </returns>
/// <exception cref="ObjectDisposedException">The session is closed.</exception>
/// <remarks>The caller owns the returned document and disposes it.</remarks>
public async Task<Document?> LoadAsync(string documentId, CancellationToken cancellationToken = default)
{
...
}
/// <inheritdoc />
public void Dispose()
{
...
}
}
/// <summary>
/// Defines a contract that resolves a document by its identifier.
/// </summary>
public interface IDocumentResolver
{
/// <summary>
/// Resolves the document stored under the specified identifier.
/// </summary>
/// <param name="documentId">The identifier of the document to resolve.</param>
/// <param name="document">When this method returns, contains the resolved document if the identifier is known.</param>
/// <returns><see langword="true" /> if the document was resolved; otherwise, <see langword="false" />.</returns>
bool TryResolve(string documentId, [NotNullWhen(true)] out Document? document);
}
/// <summary>
/// Resolves a document from the local file system cache.
/// </summary>
public sealed class CachedDocumentResolver : IDocumentResolver
{
/// <inheritdoc />
public bool TryResolve(string documentId, [NotNullWhen(true)] out Document? document)
{
...
}
}
/// <summary>
/// Determines how a session resolves a document that is absent from the cache.
/// </summary>
public enum CacheMissBehavior
{
/// <summary>
/// Reads the document from the store and adds it to the cache.
/// </summary>
Fetch,
/// <summary>
/// Returns no document and does not modify the cache.
/// </summary>
Skip
}
/// <summary>
/// A function that transforms a document before it is returned to the caller.
/// </summary>
/// <param name="document">The document to transform.</param>
/// <returns>The transformed document.</returns>
public delegate Document DocumentTransform(Document document);
/// <summary>
/// Provides extension methods for <see cref="IServiceCollection" /> to register document storage.
/// </summary>
public static class DocumentStorageServiceCollectionExtensions
{
/// <param name="services">The <see cref="IServiceCollection" /> to add the services to.</param>
extension(IServiceCollection services)
{
/// <summary>
/// Adds the document storage services to the specified <see cref="IServiceCollection" />.
/// </summary>
/// <param name="configure">An optional action to configure the <see cref="DocumentStorageOptions" />.</param>
/// <returns>The <see cref="IServiceCollection" /> for chaining.</returns>
public IServiceCollection AddDocumentStorage(Action<DocumentStorageOptions>? configure = null)
{
...
}
}
}
/// marker, and a nested tag one level further.Gets, Gets or sets, or Gets a value indicating whether.<inheritdoc />; explicit interface implementations have no doc comment.<see cref="…" />, and true, false, and null are <see langword="…" />.<exception> lists only contract throws; argument guards at entry have none.you, we, or I.| Pitfall | Correct approach |
|---|---|
<summary>Gets the name.</summary> on GetName() | State what the name is and any constraint. |
A property summary without Gets or Gets or sets | Open with the accessor verb the member exposes. |
| Re-summarizing an override or interface implementation | Use <inheritdoc />. |
| Documenting an explicit interface implementation | Omit the doc comment; the interface states the contract. |
An empty <param></param> added to silence CS1573 | Describe the parameter. |
<exception cref="ArgumentNullException"> for an entry guard | Document only a throw that is part of the contract. |
<remarks> placed before <param> on a method | Put <remarks> after <returns>. |
Multi-line tag text flush against /// | Indent it four spaces past the marker. |
| Documenting the implementation ("loops over items") | Describe the observable contract. |
| Hardcoding a type name in prose | Use <see cref="TypeName" />. |
Writing true, false, or null as plain text | Use <see langword="true" />. |
| Ownership, default value, or unit not stated | State it in <remarks> or <value>. |
| Narrating the change ("now returns null when…") | Describe the member as it stands. |
| "You must dispose the returned stream." | "The caller disposes the returned stream." |
What SKILL.md sets; muted values are Claude Code's defaults
/dotnet:writing-xml-doc-commentsfrom dotnet
npx claudepluginhub nice3point/revit-skills --plugin dotnet3 skills in this plugin
/csharp-styleWrite or review C# code. USE FOR: writing or reviewing any C# code. DO NOT USE FOR: XML doc comment content (use writing-xml-doc-comments), or prose, markdown, and wiki text; those follow the writing standard.
/technical-writingWrite or review reference prose in the house register — markdown documents, wiki pages, README and CONTRIBUTING text, and configuration comments. USE FOR: explaining a contract, a behavior, a decision, or an API in human-readable text, and reviewing that a text says something a reader cannot already infer. DO NOT USE FOR: comments inside source code and documentation comments on an API, both of which follow the conventions of the language; or the body of an issue, a pull request, or a comment on one, whose shape and register the workflow standard states.
Other plugins' skills for the same job