agentleFS
Microsoft AzureKnown publisherAzure/azure-sdk-for-rust/.github/skills/review-doc-comments/SKILL.md

review-doc-comments

Skill887 starsChanged 30 days agoMITView on GitHub

Write and review Rust public API documentation for clarity, accuracy, Microsoft style, useful links and sections, and buildable examples. Use for public API reviews even when doc comments did not change.

The file

Show its rules and text

We split this skill into the rules it gives an agent

29 rules. About 0 are common, 24 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈24

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Write precise, standalone reference documentation for developers using the public API.

    line 8
  2. Distinctive:

    Use this skill when writing or revising public API documentation.

    line 15
  3. Very specific:

    Read each affected API's complete documentation and relevant implementation, tests, and surrounding type or module docs.

    line 23
  4. Distinctive:

    Express ideas simply: Remove needless words and complexity without losing required constraints or qualifications.

    line 39
  5. Distinctive:

    Use natural language: Prefer familiar words and direct sentences.

    line 41
  6. Distinctive:

    Be approachable: Use contractions when natural and unambiguous, but avoid banter and forced familiarity.

    line 43
  7. Distinctive:

    Lead with the useful fact: Start with the API's purpose or behavior.

    line 45
  8. Distinctive:

    Include enough, not everything: Keep details needed to choose and use the API.

    line 47
  9. Distinctive:

    Use conventional spacing: Use one space after sentences and colons, no spaces around em dashes, and preserve meaningful Markdown formatting.

    line 54
  10. Distinctive:

    Write directly: Prefer active voice and meaningful verbs.

    line 56
  11. Distinctive:

    Document observable behavior, inputs, outputs, defaults, units, limits, ownership effects, and usage requirements when relevant.

    line 64
  12. Distinctive:

    Remove internal names, mechanics, and maintainer jargon unless callers need them.

    line 66
  13. Distinctive:

    Ensure the comment is understandable without reading private code.

    line 67
  14. Distinctive:

    Remove internal specifications, meeting history, issue discussions, implementation phases, and historical rationale that do not help …

    line 71
  15. Distinctive:

    Put useful maintainer rationale in implementation comments or design documents.

    line 73
  16. Distinctive:

    Keep relevant public protocol, service, compatibility, and deprecation guidance.

    line 74
  17. Distinctive:

    Remove empty praise and inflated claims such as "seamlessly", "powerful", and "robust".

    line 79
  18. Distinctive:

    Remove conversational lead-ins such as "Let's dive in", "Great question", "As mentioned earlier", and "It's worth noting that".

    line 80
  19. Distinctive:

    Avoid rhetorical questions, slogans, excessive emphasis, repetitive summaries, elaborate headings, and patterns such as "Not X, not Y, Z."

    line 82
  20. Distinctive:

    Verify the behavior and symbol resolution before proposing text.

    line 97
  21. Very specific:

    Use rustdoc intra-doc links for linkable public items: [StorageClient] rather than plain text or code formatting.

    line 101
  22. Distinctive:

    Verify links resolve from the documenting item's scope to public documentation.

    line 106
  23. Distinctive:

    Start with a concise summary, then a blank line and useful details.

    line 112
  24. Distinctive:

    Keep errors, panics, and safety obligations distinct.

    line 122
  25. Distinctive:

    Prefer runnable doctests with useful assertions when no external resources are required.

    line 128
  26. Very specific:

    Use rust,no_run for examples requiring Azure services, credentials, networking, or other setup.

    line 129
  27. Very specific:

    Verify imports, features, public signatures, async runtime setup, and error handling.

    line 131
  28. Distinctive:

    Do not present placeholders or pseudocode as buildable Rust.

    line 133
  29. Very specific:

    Do not use ignore, text, or compile_fail to hide broken examples.

    line 134

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Review public API doc comments

Write precise, standalone reference documentation for developers using the public API. Prioritize human understanding while keeping comments easy for LLMs to interpret. Explain what the API does, when to use it, and what callers must know. Avoid marketing, conversation, keyword stuffing, and unnecessary detail.

When to use

Use this skill when writing or revising public API documentation. Also use it when reviewing changes to public signatures, types, fields, variants, behavior, errors, panics, or feature availability, even if no doc comments changed.

Review workflow

  1. Identify the affected public surface, including re-exports and observable behavior changed by private implementation. Stay within the requested scope.
  2. Read each affected API's complete documentation and relevant implementation, tests, and surrounding type or module docs. Include ///, //!, and documentation attributes.
  3. Apply every criterion below. Verify claims against code; do not invent guarantees, errors, panics, or safety requirements.
  4. For reviews, report findings without editing. When asked to fix docs, preserve meaning and make focused edits. Never edit generated/; report the issue and route it to the TypeSpec specification or generator.
  5. Validate relevant links and examples when possible. State what was checked and any limitations; never assume code compiles.

Review criteria

1. Apply Microsoft style to reference documentation

Apply these guidelines directly:

  1. Express ideas simply. Remove needless words and complexity without losing required constraints or qualifications.
  2. Use natural language. Prefer familiar words and direct sentences. Explain necessary domain terms and avoid unexplained jargon.
  3. Be approachable. Use contractions when natural and unambiguous, but avoid banter and forced familiarity.
  4. Lead with the useful fact. Start with the API's purpose or behavior. Surface important requirements and caller actions early.
  5. Include enough, not everything. Keep details needed to choose and use the API; remove repetition, filler, and cryptic compression.
  6. Use sentence case. Preserve proper names and exact Rust identifier casing.
  7. Punctuate by context. Punctuate sentences, not headings. Keep list punctuation consistent.
  8. Use serial commas. Include the comma before the final conjunction in lists of three or more items.
  9. Use conventional spacing. Use one space after sentences and colons, no spaces around em dashes, and preserve meaningful Markdown formatting.
  10. Write directly. Prefer active voice and meaningful verbs. Remove openings such as "You can" and "There is". Use natural summaries such as "Returns", "Creates", or "Deletes" where appropriate.

Favor accuracy and readability over mechanical compliance.

2. Keep the focus on the caller

  • Document observable behavior, inputs, outputs, defaults, units, limits, ownership effects, and usage requirements when relevant.
  • Remove internal names, mechanics, and maintainer jargon unless callers need them.
  • Ensure the comment is understandable without reading private code.

3. Remove irrelevant background and references

  • Remove internal specifications, meeting history, issue discussions, implementation phases, and historical rationale that do not help callers.
  • Put useful maintainer rationale in implementation comments or design documents.
  • Keep relevant public protocol, service, compatibility, and deprecation guidance. Explain why linked material matters rather than making readers reconstruct the contract.

4. Avoid LLM-like prose

  • Remove empty praise and inflated claims such as "seamlessly", "powerful", and "robust".
  • Remove conversational lead-ins such as "Let's dive in", "Great question", "As mentioned earlier", and "It's worth noting that".
  • Avoid rhetorical questions, slogans, excessive emphasis, repetitive summaries, elaborate headings, and patterns such as "Not X, not Y, Z."
  • Make explanations standalone; do not rely on chat history, patch descriptions, or unstated antecedents.
  • Preserve clear prose. Do not report subjective rewrites as bugs or speculate about authorship.

For example, replace internal, promotional wording with the caller-visible behavior:

/// Downloads the blob's contents.
///
/// Create a [`StorageClient`] to access blobs in a storage account.

Verify the behavior and symbol resolution before proposing text.

5. Link Rust symbols

  • Use rustdoc intra-doc links for linkable public items: [`StorageClient`] rather than plain text or code formatting.
  • Qualify or disambiguate targets when needed. Include () in function and method link text, such as [`StorageClient::new()`] or [`new()`](StorageClient::new); rustdoc ignores the parentheses when resolving links.
  • Verify links resolve from the documenting item's scope to public documentation.
  • Format parameters, variables, and literals as code, not links. Do not place Markdown links in code fences.

6. Document the contract with conventional sections

Start with a concise summary, then a blank line and useful details. Add only applicable rustdoc sections:

  • # Errors: meaningful failure conditions and relevant propagated errors, not generic statements.
  • # Panics: verified direct or propagated panic conditions.
  • # Safety: caller obligations for unsafe APIs and implementor obligations for unsafe traits.
  • # Examples: self-contained usage examples when helpful.

Keep errors, panics, and safety obligations distinct. Document other important contract details, such as cancellation or feature requirements, without empty boilerplate. Follow surrounding conventions.

7. Make examples executable or at least buildable

  • Prefer runnable doctests with useful assertions when no external resources are required.
  • Use rust,no_run for examples requiring Azure services, credentials, networking, or other setup. They must still compile. Explain prerequisites without exposing secrets.
  • Verify imports, features, public signatures, async runtime setup, and error handling. Use hidden # lines only for supporting scaffolding.
  • Do not present placeholders or pseudocode as buildable Rust.
  • Do not use ignore, text, or compile_fail to hide broken examples. Reserve compile_fail for intentional rejected-code demonstrations.
  • Validate each affected package from the repository root:

    cargo test -p <package-name> --doc --all-features
    cargo doc -p <package-name> --no-deps --all-features

Inspect warnings, rendered headings, and examples. Test promised feature combinations separately; --all-features does not verify them. Do not run live Azure operations solely for documentation review.

Review output

For each finding, give the API and location, unmet criterion, caller impact, and a concrete correction. Distinguish incorrect contracts, broken links, and non-compiling examples from lower-priority style issues. Follow the surrounding review's severity threshold.

Summarize the reviewed scope, including unchanged comments, and validation results or limitations. If nothing actionable is found, say so without inventing style nits.

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.