dart-best-practices
General best practices for Dart development. Covers code style, effective Dart, and language features.
Guidelines for maintaining external Dart packages, covering versioning, publishing workflows, and pull request management. Use when updating Dart packages, preparing for a release, or managing collaborative changes in a repository.
$ npx -y skills add kevmoo/dash_skills --skill dart-package-maintenance --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/dart-package-maintenanceContext preview
The summary Claude sees to decide when to auto-load this skill.
Guidelines for maintaining external Dart packages, covering versioning, publishing workflows, and pull request management. Use when updating Dart packages, preparing for a release, or managing collaborative changes in a repository.
name: dart-package-maintenance description: |- Guidelines for maintaining external Dart packages, covering versioning, publishing workflows, and pull request management. Use when updating Dart packages, preparing for a release, or managing collaborative changes in a repository. key_features: - Versioning & CHANGELOG sync - Publishing workflow guidelines - Pull request management
Guidelines for maintaining Dart packages in alignment with the canonical Dart team [External Package Maintenance](https://github.com/dart-lang/sdk/blob/main/docs/External-Package-Maintenance.md) specification.
Use this skill when:
changes in a repository.
Do NOT apply package maintenance version bumps or changelog updates when:
`pubspec.yaml` that are not published to `pub.dev` (e.g., application root packages or internal monorepo tooling).
that only modify repository-level files outside a published package (such as `.github/workflows/`, repo-root `SKILL.md`, or root docs in a monorepo) or that only fix typos/formatting in historical `CHANGELOG.md` sections.
where the version already carries an appropriate `-wip` suffix.
Dart packages use [semantic versioning](https://semver.org) with a [pre-`1.0.0` variation](https://dart.dev/tools/pub/dependencies#caret-syntax) where the version numbers are shifted to the right before a `1.0.0` release; see also the [`package:pub_semver` semantics](https://pub.dev/packages/pub_semver#semantics):
bumped for breaking changes, such as `0.4.2` to `0.5.0-wip`, and the third number is bumped for non-breaking features and bug fixes, such as `0.4.2` to `0.4.3-wip`. Avoid `+1` build suffixes (in `package:pub_semver`, `0.4.2+1-wip` parses `+1-wip` as build metadata rather than a `-wip` pre-release).
Choose the version bump based on the impact of the change:
`executables` entry.
new class or adding a `pubspec.yaml` `executables` entry.
constraint updates, or any other change that does not impact calling code.
Whenever the code in the repo differs from the latest version published on `pub.dev`, both `pubspec.yaml` and `CHANGELOG.md` must use a `-wip` version. We bump to `-wip` on the _first_ change after a release, even if we don't plan on publishing the code in that state or if the change doesn't impact consumers.
When opening or merging a PR, check the current version in `pubspec.yaml` and `CHANGELOG.md`:
version bump, append `-wip` in `pubspec.yaml`, and add a matching `## <version>-wip` section at the top of `CHANGELOG.md`.
`-wip` bump against the bump required for your change. If your change requires a larger bump, such as from a _patch_ bump to a _minor_ bump when adding a feature, update `pubspec.yaml` and rename the existing `## <version>-wip` heading in `CHANGELOG.md` in place.
`- Initial release.` entry without adding per-PR changelog entries until after the first release.
cleanups, `test/`, `tool/`, or `README.md` updates, or `dev_dependencies` and `dependency_overrides` changes:
heading with no bullet items below it.
untouched and apply the `skip-changelog-check` PR label.
an unreleased change in the current `-wip` section, such as bumping an SDK or dependency constraint again before publishing, update or remove the existing `-wip` bullet in place instead of adding a duplicate entry.
already-published version heading, especially after merging `main` when a release landed while your PR was open.
downstream breakage.
1. **Preparation**: Remove the `-wip` suffix from `pubspec.yaml` and `CHANGELOG.md` in a dedicated pull request. 2. **Execution**: Run `dart pub publish` (or `flutter pub publish`) and resolve all warnings and errors. 3. **Tagging**: Create and push a git tag for the published version:
General best practices for Dart development. Covers code style, effective Dart, and language features.
Best practices for validating Dart documentation comments. Covers using `dart doc` to catch unresolved references and macros.
Guidelines for handling long lines in Dart code to adhere to the 80-column rule. The `lines_longer_than_80_chars` lint.
Best practices for using `expect` and `package:matcher`. Focuses on readable assertions, proper matcher selection, and avoiding…
Guidelines for using modern Dart features (v3.0 - v3.10) such as Records, Extension Types, Class Modifiers, Wildcards, Digit…
Guidelines and best practices for refactoring consecutive prints, single-line string concatenations, and complex output blocks…