agentleFS
RorroRojas3RorroRojas3/maf-agents/.claude/skills/csharp-docs/SKILL.md

csharp-docs

Skill0 starsChanged 2 months agoMITView on GitHub

Ensure that C# types are documented with XML comments and follow best practices for documentation.

3 other projects use a version of this, 2 of them edited.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

24 rules. 4 are common, 0 are distinctive, and 20 are very specific to this project.

  • 4

    Common

    Most of the 3 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 20

    Very specific

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

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

    Use <summary> to provide a brief, one sentence, description of what the type or member does.

    line 13
  2. Very specific:

    Use <remarks> for additional information, which can include implementation details, usage notes, or any other relevant context.

    line 14
  3. Very specific:

    Use <see langword> for language-specific keywords like null, true, false, int, bool, etc.

    line 15
  4. Very specific:

    Use <c> for inline code snippets.

    line 16
  5. Very specific:

    Use <example> for usage examples on how to use the member.

    line 17
  6. Very specific:

    Use <code> for code blocks.

    line 18
  7. Very specific:

    Use <see cref> to reference other types or members inline (in a sentence).

    line 19
  8. Very specific:

    Use <seealso> for standalone (not in a sentence) references to other types or members in the "See also" section of the online docs.

    line 20
  9. Very specific:

    Use <inheritdoc/> to inherit documentation from base classes or interfaces.

    line 21
  10. Very specific:

    Use <param> to describe method parameters.

    line 26
  11. Common:

    If the parameter is a flag enum, start the description with "A bitwise combination of the enumeration values that specifies...".

    line 29
  12. Common:

    If the parameter is a non-flag enum, start the description with "One of the enumeration values that specifies...".

    line 30
  13. Very specific:

    If the parameter is a Boolean, the wording should be of the form "<see langword="true" /> to ....

    line 31
  14. Common:

    If the parameter is an "out" parameter, the wording should be of the form "When this method returns, contains ....

    line 32
  15. Very specific:

    Use <paramref> to reference parameter names in documentation.

    line 33
  16. Very specific:

    Use <typeparam> to describe type parameters in generic types or methods.

    line 34
  17. Very specific:

    Use <typeparamref> to reference type parameters in documentation.

    line 35
  18. Very specific:

    Use <returns> to describe what the method returns.

    line 36
  19. Very specific:

    If the return type is Boolean, the wording should be of the form "<see langword="true" /> if ....

    line 39
  20. Very specific:

    Use <value> to describe the value of the property.

    line 51
  21. Very specific:

    If the property has a default value, add it in a separate sentence, for example, "The default is <see langword="false" />".

    line 53
  22. Very specific:

    If the value type is Boolean, the wording should be of the form "<see langword="true" /> if ....

    line 54
  23. Very specific:

    Use <exception cref> to document exceptions thrown by constructors, properties, indexers, methods, operators, and events.

    line 58
  24. Common:

    Document all exceptions thrown directly by the member.

    line 59

“Common” is measured: kept by at least 6 in 10 of the 3 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# Documentation Best Practices

  • Public members should be documented with XML comments.
  • It is encouraged to document internal members as well, especially if they are complex or not self-explanatory.

Guidance for all APIs

  • Use <summary> to provide a brief, one sentence, description of what the type or member does. Start the summary with a present-tense, third-person verb.
  • Use <remarks> for additional information, which can include implementation details, usage notes, or any other relevant context.
  • Use <see langword> for language-specific keywords like null, true, false, int, bool, etc.
  • Use <c> for inline code snippets.
  • Use <example> for usage examples on how to use the member.
    • Use <code> for code blocks. <code> tags should be placed within an <example> tag. Add the language of the code example using the language attribute, for example, <code language="csharp">.
  • Use <see cref> to reference other types or members inline (in a sentence).
  • Use <seealso> for standalone (not in a sentence) references to other types or members in the "See also" section of the online docs.
  • Use <inheritdoc/> to inherit documentation from base classes or interfaces.
    • Unless there is major behavior change, in which case you should document the differences.

Methods

  • Use <param> to describe method parameters.
    • The description should be a noun phrase that doesn't specify the data type.
    • Begin with an introductory article.
    • If the parameter is a flag enum, start the description with "A bitwise combination of the enumeration values that specifies...".
    • If the parameter is a non-flag enum, start the description with "One of the enumeration values that specifies...".
    • If the parameter is a Boolean, the wording should be of the form "<see langword="true" /> to ...; otherwise, <see langword="false" />.".
    • If the parameter is an "out" parameter, the wording should be of the form "When this method returns, contains .... This parameter is treated as uninitialized.".
  • Use <paramref> to reference parameter names in documentation.
  • Use <typeparam> to describe type parameters in generic types or methods.
  • Use <typeparamref> to reference type parameters in documentation.
  • Use <returns> to describe what the method returns.
    • The description should be a noun phrase that doesn't specify the data type.
    • Begin with an introductory article.
    • If the return type is Boolean, the wording should be of the form "<see langword="true" /> if ...; otherwise, <see langword="false" />.".

Constructors

  • The summary wording should be "Initializes a new instance of the <Class> class [or struct].".

Properties

  • The <summary> should start with:
    • "Gets or sets..." for a read-write property.
    • "Gets..." for a read-only property.
    • "Gets [or sets] a value that indicates whether..." for properties that return a Boolean value.
  • Use <value> to describe the value of the property.
    • The description should be a noun phrase that doesn't specify the data type.
    • If the property has a default value, add it in a separate sentence, for example, "The default is <see langword="false" />".
    • If the value type is Boolean, the wording should be of the form "<see langword="true" /> if ...; otherwise, <see langword="false" />. The default is ...".

Exceptions

  • Use <exception cref> to document exceptions thrown by constructors, properties, indexers, methods, operators, and events.
  • Document all exceptions thrown directly by the member.
  • For exceptions thrown by nested members, document only the exceptions users are most likely to encounter.
  • The description of the exception describes the condition under which it's thrown.
    • Omit "Thrown if ..." or "If ..." at the beginning of the sentence. Just state the condition directly, for example "An error occurred when accessing a Message Queuing API."

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.