Agent skill

Dart Modern Features

by kevmoo in 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.

Apache-2.0Auto-check passedMobile

Install Dart Modern Features

skills CLI
$ npx skills add kevmoo/dash_skills --skill dart-modern-features -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install kevmoo/dash_skills dart-modern-features --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/kevmoo/dash_skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/dart-modern-features .claude/skills/dart-modern-features && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
dart-modern-features
GitHub stars
147
Token cost
~1.6k tokens
SKILL.md length
592 words
Files
2
Skills in repo
12
Repo updated
First seen
Licence
Apache-2.0

At a glance

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.

  • Works in 2 steps: When to use this skill → Features
  • Tasks that involve Cross-platform mobile apps
  • SKILL.md covers 1. When to use this skill, Discovery, 2. Features and Related Skills
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Dart Modern Features is an agent skill from 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.

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `evals/evals.json`).

It sits in Mobile, covering Cross-platform mobile apps. It works with Dart. The repository describes itself as: Agent Skills for Dart and Flutter ecosytem. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Cross-platform mobile apps

Example prompts

  • “Use the dart-modern-features skill to guideline for using modern Dart features (v3.0 - v3.10) such as Records, Extension Types, Class Modifiers…”
  • “/dart-modern-features”

Workflow steps

2 steps, taken from the step headings in SKILL.md.

  1. When to use this skill
  2. Features

What it can do on your machine

Read from SKILL.md and the folder at commit 397a703. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are dart).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Dart Modern Features loads about 1.6k tokens when it runs. Until then it costs about 50 tokens; SKILL.md has 592 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~50
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from kevmoo/dash_skills at commit 397a703, republished under its Apache-2.0 licence (© kevmoo). 592 words, ~1,614 tokens.

Download SKILL.mdSave it as .claude/skills/dart-modern-features/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
dart-modern-features
description
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.
key_features
Records & Extension Types, Class Modifiers & Wildcards, Null-aware elements & Dot shorthands

Dart Modern Features

1. When to use this skill

Use this skill when:

  • Writing or reviewing Dart code targeting Dart 3.0 or later.
  • Refactoring legacy Dart code to use modern, concise, and zero-cost features such as records, extension types, class modifiers, null-aware collection elements, dot shorthands, and digit separators.
  • Looking for idiomatic ways to handle multiple return values or zero-cost domain wrappers.

For pattern matching, switch expressions, and list/map/split destructuring, use dart-use-pattern-matching. For converting closed class hierarchies into exhaustive sealed types, use dart-seal-type-hierarchies.

When NOT to use (Abstention Guardrails)

Do NOT apply modern features or refactor code when:

  • SDK Constraint < 3.0.0: The package's pubspec.yaml specifies an SDK constraint that supports Dart 2.x (e.g., sdk: '>=2.19.0 <4.0.0'). Refactoring to Dart 3 features will introduce syntax errors for Dart 2 users.
  • Public API Records with > 3 Fields: Records work well for 2–3 return values or internal tuples, but complex public API payloads are clearer and more extensible as dedicated classes or extension types.

Discovery

To find candidates for modernization:

Null-Aware Elements

Search for collection if statements checking for null:

  • Regex: if\s*\(\w+\s*!=\s*null\)\s*\w+
Digit Separators

Search for long numbers without separators:

  • Regex: \b\d{6,}\b (Matches numbers with 6 or more digits).

2. Features

Records

Use records as anonymous, immutable, aggregate structures to bundle multiple objects without defining a custom class. Prefer them for returning multiple values from a function or grouping related data temporarily.

Avoid: Creating a dedicated class for simple multiple-value returns.

dart
class UserResult {
  final String name;
  final int age;
  UserResult(this.name, this.age);
}

UserResult fetchUser() {
  return UserResult('Alice', 42);
}

Prefer: Using records to bundle types seamlessly on the fly.

dart
(String, int) fetchUser() {
  return ('Alice', 42);
}

void main() {
  var user = fetchUser();
  print(user.$1); // Alice
}
Class Modifiers

Use class modifiers (final, base, interface, sealed) to restrict how classes can be subtyped outside their defining library:

  • interface class: External libraries may implement, but cannot extend.
  • base class: External libraries may extend, but cannot implement (preserving private implementation invariants).
  • final class: External libraries can neither extend nor implement.
  • sealed class: Closed family of subtypes within the same library enabling exhaustive switching (see dart-seal-type-hierarchies).

Avoid: Leaving internal implementation classes open to arbitrary external subclassing or interface implementation when invariants must be enforced.

dart
class TokenStore {
  void save(String token) {}
}

Prefer: Declaring explicit subtyping capabilities with class modifiers.

dart
final class TokenStore {
  void save(String token) {}
}
Show full SKILL.md (252 more words)Show less
Extension Types

Use extension types for a zero-cost wrapper around an existing type. Use them to restrict operations or add custom behavior without runtime overhead.

Avoid: Allocating new wrapper objects just for domain-specific logic or type safety.

dart
class Id {
  final int value;
  Id(this.value);
  bool get isValid => value > 0;
}

Prefer: Using extension types which compile down to the underlying type at runtime.

dart
extension type Id(int value) {
  bool get isValid => value > 0;
}
Digit Separators

Use underscores (_) in number literals strictly to improve visual readability of large numeric values.

Avoid: Long number literals that are difficult to read at a glance.

dart
const int oneMillion = 1000000;

Prefer: Using underscores to separate thousands or other groupings.

dart
const int oneMillion = 1_000_000;
Wildcard Variables

Use wildcards (_) as non-binding variables or parameters to explicitly signal that a value is intentionally unused.

Avoid: Inventing clunky, distinct variable names to avoid "unused variable" warnings.

dart
void handleEvent(String ignoredName, int status) {
  print('Status: $status');
}

Prefer: Explicitly dropping the binding with an underscore.

dart
void handleEvent(String _, int status) {
  print('Status: $status');
}
Null-Aware Elements

Use null-aware elements (?) inside collection literals to conditionally include items only if they evaluate to a non-null value.

Avoid: Using collection if statements for simple null checks.

dart
var names = [
  'Alice',
  if (optionalName != null) optionalName,
  'Charlie'
];

Prefer: Using the ? prefix inline.

dart
var names = ['Alice', ?optionalName, 'Charlie'];
Dot Shorthands

Use dot shorthands to omit the explicit type name when it can be confidently inferred from context, such as with enums or static fields.

Avoid: Fully qualifying type names when the type is obvious from the context.

dart
LogLevel currentLevel = LogLevel.info;

Prefer: Reducing visual noise with inferred shorthand.

dart
LogLevel currentLevel = .info;
  • dart-use-pattern-matching: Authoritative guide for Dart 3 pattern matching, switch expressions, and list/map/String.split() destructuring.
  • dart-seal-type-hierarchies: Converting closed class hierarchies into sealed types for exhaustive switching.
  • dart-best-practices: General code style and foundational Dart idioms that predate or complement the modern syntax features.

© kevmoo, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in skills/dart-modern-features of kevmoo/dash_skills.

  • SKILL.md
  • evals/evals.json

Open the folder on GitHubat commit 397a703

Compare with similar skills

Dart Modern Features next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Dart Modern Features compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Dart Modern Features this skillkevmoo/dash_skills147—~1.6kAutomated safety check: PassApache-2.0
Fjson Dart Bean GeneratorK3vinb5/unyo-app664—~2.2kAutomated safety check: PassBSD-3-Clause
Flutter Riverpod State Managementandrewyng/context-hub14k—~1.1kAutomated safety check: PassMIT
BlocVeryGoodOpenSource/vgv-ai-flutter-plugin170—~2kAutomated safety check: PassMIT
Flutter Dart Code Reviewaffaan-m/ECC276k2 repos~5.8kAutomated safety check: NotesMIT
Signals for Flutterrodydavis/signals.dart819—~1.9kAutomated safety check: PassApache-2.0

Similar skills

  • Generate Dart bean classes from JSON and regenerate serialization helpers using the fjson CLI.

    664 GitHub stars~2.2k tokensUpdated 3 mo ago
    MobileAuto-check passed
  • Guides Flutter state management with Riverpod: choosing provider types, wiring ConsumerWidgets, handling async state and lifecycle, and overriding providers in tests.

    14k GitHub stars~1.1k tokensUpdated 4 mo ago
    MobileAuto-check passed
  • Bloc

    VeryGoodOpenSource/vgv-ai-flutter-plugin

    Best practices for Bloc state management in Flutter/Dart, covering Cubit versus Bloc, event and state naming, sealed classes with Equatable, the Page/View split with BlocProvider, BlocBuilder…

    170 GitHub stars~2k tokensUpdated 3 days ago
    MobileAuto-check passed
  • Library-agnostic Flutter/Dart code review checklist covering widget best practices, state management patterns (BLoC, Riverpod, Provider, GetX, MobX, Signals), Dart idioms, performance…

    276k GitHub starsUsed in 2 repos~5.8k tokens
    MobileAuto-check: notes
  • Signals for Flutter

    rodydavis/signals.dart

    Reference for the signals_flutter package: reactive signals, computed values, effects, async signals and collection signals bound to Flutter widgets.

    819 GitHub stars~1.9k tokensUpdated 26 days ago
    MobileAuto-check passed
  • Taskflow

    MelbourneDeveloper/dart_node

    Build and run the full TaskFlow demo stack (Express backend + React frontend + mobile)

    113 GitHub stars~327 tokensUpdated 25 days ago
    MobileAuto-check: notes

More from kevmoo/dash_skills

All 12 skills in this repo
  • Dart Test Coverage

    kevmoo/dash_skills

    Understand and improve test coverage in a Dart package. An agent skill from kevmoo/dash_skills.

    147 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Profile Dart Code

    kevmoo/dash_skills

    Profile Dart command-line applications using the VM Service protocol to capture CPU samples and identify performance bottlenecks.

    147 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Dart Best Practices

    kevmoo/dash_skills

    General best practices for Dart development. An agent skill from kevmoo/dash_skills.

    147 GitHub stars~709 tokensUpdated yesterday
    Auto-check passed
  • Dart Doc Validation

    kevmoo/dash_skills

    Best practices for validating Dart documentation comments. An agent skill from kevmoo/dash_skills.

    147 GitHub stars~822 tokensUpdated yesterday
    Auto-check passed
  • Dart Long Lines

    kevmoo/dash_skills

    Guidelines for handling long lines in Dart code to adhere to the 80-column rule.

    147 GitHub stars~1k tokensUpdated yesterday
    Auto-check passed
  • Dart Matcher Best Practices

    kevmoo/dash_skills

    Best practices for using expect and package:matcher. An agent skill from kevmoo/dash_skills.

    147 GitHub stars~1.6k tokensUpdated yesterday
    Auto-check passed

Works with

Categories

Questions about Dart Modern Features

What does Dart Modern Features do?

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 Modern Features is an agent skill from kevmoo/dash_skills.10) such as Records, Extension Types, Class Modifiers, Wildcards, Digit Separators, Null-Aware Elements, and Dot Shorthands.

When should I use Dart Modern Features?

Dart Modern Features fits situations like: tasks that involve Cross-platform mobile apps.

How do I install Dart Modern Features in Claude Code?

Run `npx skills add kevmoo/dash_skills --skill dart-modern-features -a claude-code`. Or copy the skill folder (skills/dart-modern-features in kevmoo/dash_skills) into .claude/skills/dart-modern-features in your project. Claude Code loads it when a task matches its description.

How do I install Dart Modern Features in Codex?

Run `npx skills add kevmoo/dash_skills --skill dart-modern-features -a codex`. Or copy the skill folder (skills/dart-modern-features in kevmoo/dash_skills) into .agents/skills/dart-modern-features in your project. Codex loads it when a task matches its description.

Can I use Dart Modern Features in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add kevmoo/dash_skills --skill dart-modern-features -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/dart-modern-features, .gemini/skills/dart-modern-features, .github/skills/dart-modern-features and .opencode/skills/dart-modern-features in your project.

What does Dart Modern Features need to run?

SKILL.md names no scripts, command-line tools or credentials: Dart Modern Features is instructions for the agent only.

Does Dart Modern Features access the network?

SKILL.md names 1 domain. As links in the text: github.com. This is read from the text; nothing was executed.

Is Dart Modern Features safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Dart Modern Features use?

Dart Modern Features is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Dart Modern Features use?

About 1.6k tokens (SKILL.md is roughly 6.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Dart Modern Features?

Skills that share tags, products or a category with Dart Modern Features: Fjson Dart Bean Generator (K3vinb5/unyo-app, 664 stars), Flutter Riverpod State Management (andrewyng/context-hub, 14k stars), Bloc (VeryGoodOpenSource/vgv-ai-flutter-plugin, 170 stars) and Flutter Dart Code Review (affaan-m/ECC, 276k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Dart Modern Features?

kevmoo (a GitHub user) maintains it in kevmoo/dash_skills, which has 147 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on October 8, 2026.

Source: kevmoo/dash_skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.