skills/flutter-dartdoc/SKILL.md
DartDoc documentation conventions for Flutter/Dart code: classes, methods, parameters, examples, and linting rules. Trigger: When writing or reviewing documentation comments in Dart/Flutter files.
npx skillsauth add 333-333-333/agents flutter-dartdocInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
/// doc comments on classes, methods, properties, or top-level functionsdart doc| Rule | Description |
|------|-------------|
| Use /// not /** */ | Dart convention uses triple-slash, not block comments |
| First sentence is a summary | Must be a single, concise sentence ending in . |
| Start with a verb (methods) | /// Returns, /// Creates, /// Throws |
| Start with a noun (classes) | /// A button that..., /// Repository for... |
| Document the WHY, not the WHAT | Code shows what; docs explain why and when |
| No redundant docs | Don't document obvious getters/setters unless they have side effects |
See assets/class_doc.dart
See assets/method_doc.dart
Use [paramName] in prose — DartDoc auto-links them:
See assets/parameter_doc.dart
DO NOT use @param tags — that's JSDoc, not DartDoc.
See assets/property_doc.dart
Skip docs for trivially obvious properties:
// No doc needed — name is self-evident
final String name;
See assets/enum_doc.dart
See assets/widget_doc.dart
See assets/anti_patterns.dart
DartDoc supports Markdown:
| Feature | Syntax |
|---------|--------|
| Code inline | `code` |
| Code block | /// ```dart ... ``` |
| Links to types | [ClassName], [method] |
| External links | [text](url) |
| Lists | /// - item or /// 1. item |
| Headers | /// ## Section |
| Bold | /// **bold** |
Add to analysis_options.yaml:
See assets/analysis_options.yaml
For a new project, start with slash_for_doc_comments and comment_references. Add public_member_api_docs once the codebase is stable — it's strict.
# Generate HTML docs
dart doc .
# Output lands in doc/api/
open doc/api/index.html
/// summary/// summary with return/throw info.[paramName] in prose@param, @return, @throws tags (that's JSDoc)/// ```dart blocks[TypeReferences] are valid and resolvabletesting
Review Flutter components and screens for UX/UI compliance. Trigger: When user invokes /ux-review command or requests UX audit.
development
TypeScript strict patterns and best practices. Trigger: When implementing or refactoring TypeScript in .ts/.tsx (types, interfaces, generics, const maps, type guards, removing any, tightening unknown).
testing
Testing philosophy and strategy for every feature: test pyramid, mandatory levels per change type, completion checklist, and skill delegation. Trigger: When planning tests for a feature, reviewing test coverage, defining acceptance criteria, or asking what tests a change needs.
development
Terraform security practices: sensitive variables, secret management, state protection, .gitignore patterns, and CI/CD credential handling. Trigger: When handling secrets in Terraform, configuring state backends, reviewing .gitignore for Terraform, or setting up CI/CD pipelines for infrastructure.