agentleFS
mxsmmxsm/rocketmq-rust/.agents/skills/rust-doc-comment-generator/SKILL.md

rust-doc-comment-generator

Skill1.5k starsChanged 5 months agoApache-2.0View on GitHub

Generate idiomatic, production-grade Rust comments and documentation strictly following official Rustdoc and Rust API documentation conventions. Designed for real-world Rust projects with zero AI-identifiable markers.

Trending

Quiet since March.thin dataabout the whole repository

Dec 2025: 1 mentionJan 2026: 1 mentionFeb 2026: 0 mentionsMar 2026: 1 mentionApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the mxsm/rocketmq-rust repository that our weekly crawl found: only 9 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

Who's talking about mxsm/rocketmq-rust

The biggest 5 of 9 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 9

Talked about on GitHub and Bluesky (9 times).

On GitHub · 5

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use formal, neutral, technical language

    line 69
  2. Distinctive:

    Avoid conversational or instructional phrasing

    line 70
  3. Distinctive:

    Avoid marketing or subjective language

    line 71
  4. Distinctive:

    Add missing documentation where appropriate

    line 139
  5. Distinctive:

    Never change code semantics

    line 140
  6. Distinctive:

    Never introduce new APIs or rename identifiers

    line 141

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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

Rust Documentation & Comment Generator Skill

Overview

This skill generates standard-compliant Rust comments and documentation for Rust source code. It strictly follows Rust’s official documentation guidelines and produces output suitable for production-quality open-source and enterprise Rust projects.

The generated comments are:

  • Idiomatic and precise
  • Free of AI-identifiable artifacts
  • Fully aligned with Rustdoc conventions
  • Suitable for blocking, async, and unsafe code

Standards & References

This skill MUST comply with the following authoritative sources:

Supported Targets

This skill applies to the following Rust items:

  • struct, enum, union
  • trait
  • impl blocks
  • fn / async fn
  • Modules (mod)
  • unsafe blocks and functions

Comment & Documentation Rules

1. Comment Types

ContextFormat
Public item/// Rustdoc comment
Module-level documentation//!
Private implementation detail//
Unsafe API explanation/// # Safety

2. Rustdoc Section Usage

Rustdoc sections MUST be included only when semantically relevant:

  • # Examples
  • # Panics
  • # Errors
  • # Safety
  • # Performance

Empty or boilerplate sections are not allowed.

3. Language & Tone

  • Use formal, neutral, technical language
  • Avoid conversational or instructional phrasing
  • Avoid marketing or subjective language
  • Describe behavior, constraints, and guarantees precisely

✅ Correct:

Represents the configuration used by the message consumer.

❌ Incorrect:

This struct is very useful and highly optimized.

4. Blocking vs Async Behavior

Blocking APIs

Blocking behavior MUST be explicitly documented.

/// Blocks the current thread until a message is available.

Async / Non-Blocking APIs

Async behavior MUST be explicitly documented.

/// Asynchronously waits for the next message.
///
/// This function does not block the calling thread.

5. Unsafe Code Documentation

Any unsafe function or block MUST include a # Safety section.

/// # Safety
///
/// The caller must ensure that the pointer is valid and properly aligned
/// for the duration of the call.

Vague or generic safety statements are forbidden.

Forbidden Content

The output MUST NOT contain:

  • Emojis
  • Phase or workflow markers (e.g. Phase, Step, Optimize)
  • TODO / FIXME / NOTE meta-comments
  • AI-related indicators or explanations
  • Commentary about refactoring or future improvements

Input Expectations

The user may provide:

  • Undocumented Rust code
  • Partially documented Rust code
  • Rust code with non-standard or low-quality comments

Output Expectations

The skill MUST:

  1. Preserve existing correct Rustdoc comments
  2. Rewrite non-standard comments into idiomatic Rustdoc
  3. Add missing documentation where appropriate
  4. Never change code semantics
  5. Never introduce new APIs or rename identifiers

Example

Input

pub struct MessageQueue {
    capacity: usize,
}

Output

/// Represents a bounded message queue.
///
/// The queue can store messages up to a fixed capacity.
pub struct MessageQueue {
    capacity: usize,
}

Non-Goals

This skill does NOT:

  • Refactor code
  • Optimize performance
  • Rename symbols
  • Add logging
  • Generate tests

Compatibility

This skill is designed to work alongside:

  • Rust API naming validation skills
  • Safety auditing skills
  • Project-specific glossary enforcement skills

Each skill operates independently and does not overlap responsibilities.

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.