dart-doc-validation

Dart doc-comment best-practices validation skill: validates best practices for Dart documentation comments, including using `dart doc` to catch unresolved references and macros.

Last repository push
GitHub Stars
149
Forks
17
Issues / PRs
2

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "dart-doc-validation" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-76040695302e05a2ebdd9c616411c7089d3f53cbebdcbdf4abd245a2f8f9f0c8. Verify the upstream source and version against https://github.com/kevmoo/dash_skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

github.com

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Dart doc-comment best-practices validation skill: validates best practices for Dart documentation comments, including using `dart doc` to catch unresolved references and macros.

0 Downloads

Introduction source: third_party · kevmoo · 0.0.1 Reference

SkillPi interpretation

Tasks
|-
Audience
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.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: dart-doc-validation
description: |-
  Best practices for validating Dart documentation comments.
  Covers using `dart doc` to catch unresolved references and macros.
license: Apache-2.0
key_features:
  - Documentation comment validation
  - Unresolved reference checking
  - Dart doc macro verification

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 reference
  • warning: 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.

Current listing version

0.0.1

Verify the source revision ↗

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value78/100

Highlights

  • 为 Dart 开发者提供文档注释验证的完整最佳实践
  • 涵盖 lint 配置、本地验证命令及常见问题修复方案
Trigger Precision92/100

Highlights

  • 触发描述完整且位置正确,覆盖多种使用场景
Structure and Standards95/100

Highlights

  • 结构清晰,分章节明确,含端到端示例和完整 frontmatter
Execution Reliability90/100

Highlights

  • 工具来源明确,参数正确,覆盖主要异常并提供安全执行机制
Evidence Verifiability (mean of the first four)89/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • ...

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.