/dart-flutter:dart-migrate-to-checks-packagefrom Dart and Flutter
Replace the usage of `expect` and similar functions from `package:matcher` to `package:checks` equivalents.
Ships in Dart and Flutter. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Use this skill when you need to migrate a Dart test suite from the legacy
package:matcher (which is exported by default from package:test/test.dart)
to the modern, type-safe, and literate package:checks assertion library.
Follow this structured workflow to safely and systematically migrate a test suite:
package:checks as a dev_dependency in pubspec.yaml:
dart pub add dev:checks
package:matcher if it is explicitly listed under dev_dependencies
(it is typically transitively included by package:test, which is fine).expect or expectLater calls.For any target test file:
import 'package:test/test.dart'; with:
import 'package:test/scaffolding.dart';
import 'package:checks/checks.dart';
import 'package:test/expect.dart'; // Temporarily allows legacy expect()
expect and expectLater calls
to check syntax following the Key Syntax Differences and
Pitfalls and the
Matcher-to-Checks Mapping Table.import 'package:test/expect.dart'; line. Any remaining un-migrated expect
calls will immediately surface as compiler errors, making them easy to
find and fix.dart analyze
Pay close attention to generic type parameters on .isA<Type>() and
ensure asynchronous expectations are properly awaited (check for
unawaited_futures warnings).dart test
If a test fails, review the extremely detailed failure output of
package:checks to diagnose if the test is genuinely failing or if the
expectation was translated incorrectly.Read matcher conversion details for collection equality, asynchronous expectations, custom matchers, and the mapping table when they apply to the target tests.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub mordechai30/flutter-dart-skills --plugin dart-flutter26 skills in this plugin
/dart-add-unit-testAdd focused unit tests for Dart code with package:test, or flutter_test in Flutter projects. Use for new logic and regressions that can be checked without a running app./dart-build-cli-appBuild Dart command-line tools with sound argument parsing, streams, exit status, packaging, and subprocess behavior. Use for console apps and installed Dart executables./dart-collect-coverageCollect and inspect LCOV test coverage for Dart or Flutter projects. Use when the user requests a coverage report or needs to find untested behavior./dart-fix-runtime-errorsDiagnose and fix observed Dart or Flutter runtime failures from a stack trace, failing test, or running app. Use for exceptions, failed casts, late initialization errors, and similar failures./dart-generate-test-mocksGenerate Mockito test doubles for Dart or Flutter dependencies when hand-written fakes are impractical. Use for controlled service responses and interaction verification./dart-resolve-package-conflictsDiagnose and resolve Dart or Flutter pub dependency conflicts. Use when pub get fails, a package is retracted, or constraints block a needed upgrade.