OverviewHistoryStatsSecurity
npx skills add ...
Documentation
SKILL.md
npx skills add dart-lang/skills --skill dart-write-documentation
Rules and formatting guidelines for writing Dart /// API documentation and doc comments. Use when documenting Dart code, writing doc comments for any Dart declaration (libraries, classes, methods, variables, etc.), or when instructed to follow the Effective Dart documentation guidelines.
npx skills add dart-lang/skills --skill dart-write-documentation
When asked to write or update documentation for Dart code, you must strictly follow these formatting rules based on the "Effective Dart: Documentation" guidelines.
_) unless explicitly instructed, as they do not appear in generated API reference sites.///: Use /// consecutive line comments for all API documentation. Never use /** ... */ block comments.///. Never output a completely empty newline (e.g., a \n without ///), as this terminates the doc comment block./// The radius of the sphere. (Not "Gets the radius...")/// Whether the connection is active./// Initializes the database. (Not "Initialize" or "This method initializes").@param, @return, @throws, etc.): Never use Javadoc-style tags (@param, @return, @returns, @throws, @exception, @see, @type). Instead, weave parameter names, return behavior, and exceptions into the prose.@override, etc.): Doc comments must be placed before metadata annotations.@override members if the behavior does not differ from the superclass or interface. Dartdoc automatically inherits the base documentation..new syntax (e.g., [ClassName.new]).[identifier]) for in-scope symbols: Use square brackets to link to any in-scope identifier (parameters, classes, methods, fields, and top-level functions) so dartdoc can resolve them. Never use backticks for parameters.[String.contains], not [String.contains()]).`null`, `true`, `void`). Never put keywords in square brackets (avoid [null] or [true]).@docImport directive at the top of the file (on the library; declaration) rather than adding a standard import.```dart for Dart, or ```sh for shell commands. Do not leave code blocks unlabelled, as Dartdoc will attempt to auto-detect the language and frequently guesses wrong.After writing or updating doc comments:
dart analyze to ensure all bracketed references resolve properly without triggering comment_references warnings.dart doc to verify the generated documentation renders cleanly.Bad:
Good:
Bad:
Good:
Bad:
Good:
Bad:
Good:
Bad:
Good: