dartdoc-conventions

dartdoc-conventions is a skill for Claude Code from zakariaf/Flutter-Skills. It costs 169 tokens per session (2,530 once invoked), scanned B, original, MIT.

A documentation standard for Dart's public API, requiring doc comments that explain why declarations exist and describe details such as units, ranges, nullability, errors, and side effects.

In plain words
What is it for?
Use it when adding or changing public classes, constructors, methods, getters, fields, functions, or type definitions.
Why use it?
It gives callers a usable contract without making them read the implementation and prevents undocumented public members from passing review or analysis.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the flutter plugin — 40 skills shipped together

Good fit Use it when adding or changing public classes, constructors, methods, getters, fields, functions, or type definitions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/zakariaf/flutter-skills/dartdoc-conventions
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add zakariaf/Flutter-Skills --skill dartdoc-conventions
Clone the repo
git clone --depth 1 https://github.com/zakariaf/Flutter-Skills

Made for: Claude Code.

Or install flutter, the plugin that ships this one along with the rest of its 40 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for dartdoc-conventions

README.md
[![agentmods](https://agentmods.dev/badge/skills/zakariaf/flutter-skills/dartdoc-conventions/github.svg)](https://agentmods.dev/skills/zakariaf/flutter-skills/dartdoc-conventions)
Your own site
<a href="https://agentmods.dev/skills/zakariaf/flutter-skills/dartdoc-conventions"><img src="https://agentmods.dev/badge/skills/zakariaf/flutter-skills/dartdoc-conventions/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for dartdoc-conventions

Your own site · 80×15
<a href="https://agentmods.dev/skills/zakariaf/flutter-skills/dartdoc-conventions"><img src="https://agentmods.dev/badge/skills/zakariaf/flutter-skills/dartdoc-conventions.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 169 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,530 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00169 $0.02530
Opus 5 $0.00084 $0.01265
Sonnet 5 $0.00034 $0.00506
Haiku 4.5 $0.00017 $0.00253

Measured 9d ago against content hash 424333f67771, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade B, and why

dartdoc-conventions scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Strips warnings and disclaimersmediumAnti-refusal

Omitting safety caveats hides risk from the user and is a common jailbreak preamble.

- [ ] `dart analyze --fatal-infos --fatal-warnings` clean; `dart doc` generates without warnings for packages.
skills/dartdoc-conventions/SKILL.md · 170 lines

How it starts

The opening of the file, as written. The whole thing — 170 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Dartdoc Conventions — the public surface is a contract

Public code is read far more than it is written. A symbol with no leading _ is a contract callers depend on, so it carries a /// doc a reader understands without opening the body. Doc comments use /// and follow Effective Dart: Documentation. Applies whenever you add or change a public declaration, or write an in-body // comment.

Non-negotiable rules

  1. Every public declaration gets a /// doc — public classes, constructors, methods, getters, top-level functions, typedefs, and fields. public_member_api_docs is an error with no "obvious member" exemption: it flags every undocumented public member, so a missing doc fails the build. Making a symbol public "just in case" is a review reject — make it _-private instead so it needs no doc and no contract.
  2. ///, never /** */. Dartdoc only recognizes ///. A JavaDoc block is silently ignored and the symbol reads as undocumented. slash_for_doc_comments flags it.
  3. First line is one standalone sentence ending in a period, in its own paragraph. Tools show only this sentence in API lists, so it must stand alone; a blank /// line separates it from the body.
  4. Method/function docs start with a verb phrase (third person): "Returns…", "Schedules…", "Loads…", "Marks…". A boolean getter or bool-returning method starts with "Whether…".
  5. Never restate the name. /// The name. on String name, /// Returns the total. on total() — banned. If a public member has nothing to add beyond its name, that is the signal to make it _-private (a private member needs no doc, so the tension disappears). A member that must stay public still needs a real /// — never leave it public-and-undocumented; add meaning: units, ranges, nullability, throws, side effects, and the invariant the symbol enforces.
  6. Cross-link identifiers in [brackets] so dartdoc resolves them: /// Throws [StateError] if [id] is unknown; see [copyWith]. comment_references warns on a broken link.
  7. In-body // explains why, never what. The code already says what. Narrating comments (// loop over items) rot out of sync and become misinformation. Comment the reason, the gotcha, or the invariant.
  8. Restate an enforced invariant at its enforcement point. Where one line upholds a guarantee — an ordering, a clamp, a persist-before-publish, a canonical-unit conversion — a terse // states it so a diff that weakens it gets an unmissable flag. Same for a magic constant: cite where the number comes from.
  9. Docs change in the same diff as the code. A wrong doc is worse than none. Every comment your change touches must still be true — put it on the PR checklist.
  10. One library doc per exported barrel. The public entry point (e.g. my_package.dart) gets a /// library doc above the library; directive. dangling_library_doc_comments is an error — a leading /// with no attached declaration must be a real library doc, not an orphan above a blank line or an export.

Read the full file on GitHub · 170 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 170 lines · 169 tokens per session scan B 424333f67771

Subscribe to this mod's changes

dartdoc-conventions is a skill published in the GitHub repository zakariaf/Flutter-Skills (2 stars, last pushed 11d ago), licensed MIT. It adds 169 tokens to every session and 2,530 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it B with 1 finding (strips warnings and disclaimers). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

rust-check

Run cargo check on the current Rust project to find compile errors.

Hmbown/CodeWhale · 15 tokens

google-agents-cli-adk-code

This skill should be used when the user wants to "write agent code", "build an agent with ADK", "add a tool", "create a callback", "define an agent", "use state management", or needs ADK (Agent Development Kit) Python API patterns and code examples. Part of the Google ADK skills suite. It provides a quick reference…

google/agents-cli · 129 tokens

use-modern-go

Use the Modern Go Guidelines CLI whenever writing, modifying, fixing, or refactoring Go code. Apply its version-specific guidance to generated changes.

JetBrains/go-modern-guidelines · 32 tokens

coding

A coding guide for writing and running Python programs in a sandbox. It requires scripts to be small and reproducible, with their actual output or errors reported.

bojieli/ai-agent-book · 18 tokens

dart-language

Dart 3.x language feature standards: null safety, records, sealed classes, switch pattern matching, extensions, and async/await. Use when using !, ?., ??, late, sealed classes, record types, switch expressions, or async patterns — and before introducing any new Dart 3.x construct to confirm the modern idiomatic…

HoangNguyen0403/agent-skills-standard · 73 tokens

typescript-language

Apply modern TypeScript standards for type safety and maintainability. Use when working with types, interfaces, generics, enums, unions, or tsconfig settings.

HoangNguyen0403/agent-skills-standard · 35 tokens