agentleFS
thiennc-tesoglobalthiennc-tesoglobal/flutter-skills/skills/dart-language/SKILL.md

dart-language

Skill16 starsChanged 3 months agoBSD-3-ClauseView on GitHub

Apply modern Dart language and API patterns in non-concurrency code. Use for types, records, patterns, sealed classes, extensions, constructors, null safety, collections, and package APIs; route async and isolate work to dart-concurrency.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

12 rules. About 0 are common, 9 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Write clear Dart that fits the project's SDK constraint and established style.

    line 8
  2. Very specific:

    Read the SDK constraint in pubspec.yaml before using newer syntax.

    line 12
  3. Distinctive:

    Prefer simple types and direct control flow over abstractions with no demonstrated reuse.

    line 13
  4. Distinctive:

    Use records for small structural values.

    line 15
  5. Distinctive:

    Use pattern matching when it makes branching or destructuring clearer, not as a novelty.

    line 16
  6. Distinctive:

    Keep mutable state private and expose the smallest useful surface.

    line 18
  7. Very specific:

    Never hand-edit a generated file (*.g.dart, *.freezed.dart, or any file marked as generated).

    line 19
  8. Distinctive:

    Follow Effective Dart naming, documentation, usage, and design guidance.

    line 21
  9. Distinctive:

    Use Dart MCP semantic lookup and analysis when the current environment exposes them.

    line 25
  10. Distinctive:

    Read patterns and records migration when adopting pattern matching, destructuring, switch expressions, or multiple returns.

    line 36
  11. Distinctive:

    Read sealed class hierarchies when designing algebraic data types, closed result models, or exhaustively verified state families.

    line 37
  12. Very specific:

    Read code generation with build_runner when a class uses freezed, json_serializable, or another build_runner generator, or when generated …

    line 38

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Dart Language

Write clear Dart that fits the project's SDK constraint and established style.

Decisions

  • Read the SDK constraint in pubspec.yaml before using newer syntax.
  • Prefer simple types and direct control flow over abstractions with no demonstrated reuse.
  • Model closed variants with sealed types when exhaustive switching improves correctness.
  • Use records for small structural values; use named domain types when identity, validation, documentation, or evolution matters.
  • Use pattern matching when it makes branching or destructuring clearer, not as a novelty.
  • Preserve public API compatibility unless a breaking change is requested.
  • Keep mutable state private and expose the smallest useful surface.
  • Never hand-edit a generated file (*.g.dart, *.freezed.dart, or any file marked as generated); edit the annotated source and regenerate through the project's command.

Follow Effective Dart naming, documentation, usage, and design guidance. Match repository lint rules rather than adding conflicting style policy.

Verification

Use Dart MCP semantic lookup and analysis when the current environment exposes them; otherwise inspect source and use the project CLI. Run formatting, static analysis, and the narrowest relevant tests. When changing a public package API, check examples and downstream call sites.

Boundaries

  • Async, streams, cancellation, and isolates: use dart-concurrency.
  • Flutter widget composition or state ownership: use the relevant Flutter skill.
  • JSON and persistence schema behavior belongs to the corresponding data skill.
  • Regenerating after a code-generator or build_runner version bump belongs to flutter-dependency-upgrades; this skill owns writing correctly against an already-pinned generator version.

References

  • Read patterns and records migration when adopting pattern matching, destructuring, switch expressions, or multiple returns.
  • Read sealed class hierarchies when designing algebraic data types, closed result models, or exhaustively verified state families.
  • Read code generation with build_runner when a class uses freezed, json_serializable, or another build_runner generator, or when generated code is stale, conflicting, or failing to build.

Sources

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.