
dart-doc-validation
Best practices for validating Dart documentation comments. Covers using dart doc to catch unresolved references and macros.
- Installs
- 286
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/kevmoo/dash_skills --skill dart-doc-validation- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads dart-doc-validation automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Dart Doc Validation
1. When to use this skill
Use this skill when:
- Writing or updating documentation comments (
///) in Dart code. - Checking for broken documentation links, references, or macros.
- Preparing a package for publishing to pub.dev.
When NOT to use (Abstention Guardrails)
Do NOT apply this skill or refactor doc comments when:
- Illustrative Pseudo-Code & Non-Dart Code Fences: Comments contain
pseudo-code, non-Dart language identifiers (e.g.
yaml`,json, ````bash, ````text`), or abstract conceptual fragments intentionally not designed to compile as valid Dart. - Generated Code: Files generated by tools (e.g.
*.g.dart,*.mocks.dart,*.freezed.dart) where comments are synthesized. - External Markdown Hyperlinks: Text in square brackets followed by a link
target (e.g.
[External Guide](https://...)), which is standard Markdown hyperlink syntax rather than an unresolved Dart doc reference.
Discovery
To find documentation issues:
Missing Lint
Verify if the comment_references lint is enabled:
- Target:
analysis_options.yaml - Search Query:
comment_references
Automated Validation
Run the documentation generator to surface warnings:
- Command:
dart doc -o $(mktemp -d) - Keywords to look for:
warning:,unresolved doc reference,undefined macro
2. Best Practices
Enable the doc validation lint
In your analysis_options.yaml, enable the comment_references lint.
linter:
rules:
- comment_references
Validating Documentation Locally
Use the dart doc command with a temporary output directory to validate
documentation comments without polluting the local project workspace.
This command parses all documentation comments and reports warnings such as:
warning: unresolved doc referencewarning: undefined macro
Command to run:
dart doc -o $(mktemp -d)
This will work on Mac and Linux.
This ensures that the generated HTML files are stored in a temporary location and don't clutter the package directory, while still surfacing all validation warnings in the terminal output.
Browsing the docs:
Our docs use features designed to be run on a web server. If you want to browse
the generated docs locally, install the dhttpd package.
dart install dhttpd
TMP_DIR=$(mktemp -d) && dart doc -o "$TMP_DIR" && dhttpd --path "$TMP_DIR"
(Or use another HTTP server, such as python3 -m http.server.)
Fixing Common Warnings
- Unresolved doc reference: Ensure that any identifier wrapped in square
brackets (
[Identifier]) correctly points to an existing class, method, property, or parameter in the current scope or imported libraries. - Undefined macro: If using
{@macro macro_name}, ensure that the template{@template macro_name}is defined in the same file or a file that is imported and visible to the documentation generator.
FAQ
What does the dart-doc-validation skill do?
Best practices for validating Dart documentation comments. Covers using dart doc to catch unresolved references and macros.
How do I install dart-doc-validation?
Run npx skills add https://github.com/kevmoo/dash_skills --skill dart-doc-validation in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/dart-doc-validation/ (personal) or .claude/skills/dart-doc-validation/ (project).
Which AI agents can use dart-doc-validation?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is dart-doc-validation safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains dart-doc-validation?
It is published by kevmoo in kevmoo/dash_skills. It has 286 recorded installs.
More from kevmoo/dash_skills
dart-best-practices
kevmoo/dash_skills
General best practices for Dart development. Covers code style, effective Dart, and language features.
dart-test-fundamentals
kevmoo/dash_skills
Core concepts and best practices for package:test. Covers test, group, lifecycle methods (setUp, tearDown), and configuration (darttest.yaml).
dart-modern-features
kevmoo/dash_skills
Guidelines for using modern Dart features (v3.0 - v3.10) such as Records, Extension Types, Class Modifiers, Wildcards, Digit Separators, Null-Aware Elements, and Dot Shorthands.
dart-package-maintenance
kevmoo/dash_skills
Open the skill to read its SKILL.md instructions.
dart-matcher-best-practices
kevmoo/dash_skills
Best practices for using expect and package:matcher. Focuses on readable assertions, proper matcher selection, and avoiding common pitfalls.
dart-cli-app-best-practices
kevmoo/dash_skills
Open the skill to read its SKILL.md instructions.
Popular code quality & workflow skills
grill-me
mattpocock/skills
A relentless interview to sharpen a plan or design.
improve-codebase-architecture
mattpocock/skills
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
handoff
mattpocock/skills
Compact the current conversation into a handoff document for another agent to pick up.
domain-modeling
mattpocock/skills
Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.
codebase-design
mattpocock/skills
Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
diagnosing-bugs
mattpocock/skills
Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.