dart-write-documentation

Write Dart API doc comments following Effective Dart documentation guidelines.

Updated Jan 8, 2026
One-click install
npx skills add https://github.com/arslan9024/White-Caves --skill dart-write-documentation-arslan9024
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: dart-write-documentation
Source: https://github.com/arslan9024/White-Caves/tree/main/.agents/skills/dart-write-documentation
Command: npx skills add https://github.com/arslan9024/White-Caves --skill dart-write-documentation-arslan9024

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing consistent, dartdoc-compatible API documentation in Dart is error-prone: developers misuse Javadoc-style tags, misplace comments relative to annotations, break first-sentence summaries, and create unresolvable symbol links. This Skill enforces the official Effective Dart documentation rules so generated API reference sites render correctly. ## Core Features & Use Cases - Formatting Rules: Enforces /// line comments, proper sentence structure, single-sentence first paragraphs, and correct openers (noun phrases for properties, "Whether" for booleans, third-person verbs for methods). - Anti-Pattern Detection: Bans Javadoc/TSDoc tags like @param and @return, requiring prose-based parameter and exception descriptions instead. - Linking & Placement Guidance: Covers square-bracket symbol links, [ClassName.new] constructor syntax, @docImport for out-of-scope references, and doc placement before annotations like @override. - Use Case: When documenting a public Dart library before publishing to pub.dev, apply these rules so dart analyze reports no comment_references warnings and dart doc renders clean output. ## Quick Start Write dartdoc-compliant documentation comments for all public classes and methods in my Dart file following the Effective Dart guidelines.

Frequently Asked Questions about dart-write-documentation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write Dart doc comments for public APIs?▼

Use consecutive `///` line comments starting with a single-sentence summary, followed by a blank `///` line and detailed prose. Start methods with third-person verbs, properties with noun phrases, and booleans with "Whether".

How to document parameters and return values in Dart without @param?▼

Weave parameter names and return behavior into prose using square brackets, like "If [force] is true, bypasses the cache." Javadoc-style tags such as `@param`, `@return`, and `@throws` are banned in Effective Dart documentation.

Where should doc comments go relative to @override annotations?▼

Doc comments must be placed before metadata annotations like `@override`, never after. For overridden members that do not change behavior, omit the doc comment entirely since dartdoc inherits the base documentation automatically.

How do I link to a default constructor in dartdoc?▼

Use the `.new` syntax in square brackets, such as `[User.new]`, to link to an unnamed default constructor. Avoid parentheses in method links, so write `[String.contains]` rather than `[String.contains()]`.

Why does dart analyze warn about comment references?▼

The `comment_references` warning appears when square-bracketed identifiers in doc comments cannot be resolved. For symbols outside the current library's imports, add a `@docImport` directive on the `library;` declaration instead of a runtime import.