ワンクリックで
dart-migrate-to-checks-package
Replace the usage of `expect` and similar functions from `package:matcher` to `package:checks` equivalents.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Replace the usage of `expect` and similar functions from `package:matcher` to `package:checks` equivalents.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Use when designing UI with OpenPencil — creating layouts via op CLI, batch design DSL, or MCP tools. Covers PenNode schema, semantic roles, typography, color, spacing, and common component patterns.
Work with Figma .fig design files and the running OpenPencil editor — inspect structure, query nodes, analyze design tokens, export images/SVG/JSX, and modify designs programmatically. Use when asked to open, inspect, export, analyze, or edit .fig files, or to control the running OpenPencil app.
Use when creating, updating, prioritizing, or querying GitHub Project todo items for omni-stream-ai/omni-code, especially backlog drafts, issue promotion, status changes, labels, and priority edits.
Write and organize unit tests for functions, methods, and classes using `package:test`. Use when creating new logic or fixing bugs to ensure code remains correct and regression-free.
Entrypoint structure, exit codes, cross-platform scripts. Use when building command line utilities, scripts, or applications.
Collect coverage using the coverage packge and create an LCOV report
| name | dart-migrate-to-checks-package |
| description | Replace the usage of `expect` and similar functions from `package:matcher` to `package:checks` equivalents. |
| metadata | {"model":"models/gemini-3.1-pro-preview","last_modified":"Fri, 24 Apr 2026 15:15:22 GMT"} |
Manage dependencies using the Dart Tooling MCP Server pub tool or standard CLI commands.
package:checks as a dev_dependency using dart pub add dev:checks.package:matcher if it is explicitly listed in the pubspec.yaml (note: it is often transitively included by package:test, which is fine).package:checks/checks.dart in all test files undergoing migration.Transition test assertions from the package:matcher syntax to the literate API provided by package:checks.
expect(actual, equals(expected)) or expect(actual, expected) with check(actual).equals(expected).expect(actual, isA<Type>()) with check(actual).isA<Type>().expect(actual.property, expected) with check(actual).has((a) => a.property, 'property name').equals(expected)...) to chain multiple expectations on a single subject.Future, await the check call: await check(someFuture).completes((r) => r.equals(expected));.Stream, wrap it in a StreamQueue for multiple checks, or use .withQueue for single/broadcast checks.Leverage the Dart MCP Server tools to automate and validate the migration process.
pub to run dart pub get or dart pub add.analyze_files to run static analysis on the project or specific paths.run_tests to execute Dart or Flutter tests with an agent-centric UX. ALWAYS use this instead of shell commands like dart test.dart_fix to apply automated fixes if applicable.Copy and use the following checklist to track progress when migrating a test suite:
package:checks as a dev dependency.package:matcher (expect calls).package:checks/checks.dart in target test files.expect(...) statements to check(...) statements.analyze_files).run_tests).analyze_files tool on the modified test directories.isA, unawaited futures).run_tests tool.package:checks provides detailed context (e.g., Which: has length of <2>).check() expectations or the underlying code to resolve the failure.Input (matcher):
expect(someList.length, 1);
expect(someString, startsWith('a'));
expect(someObject, isA<Map>());
Output (checks):
check(someList).length.equals(1);
check(someString).startsWith('a');
check(someObject).isA<Map>();
Input (matcher):
expect('foo,bar,baz', allOf([
contains('foo'),
isNot(startsWith('bar')),
endsWith('baz')
]));
Output (checks):
check('foo,bar,baz')
..contains('foo')
..not((s) => s.startsWith('bar'))
..endsWith('baz');
Input (matcher):
expect(Future.value(10), completion(equals(10)));
expect(Future.error('oh no'), throwsA(equals('oh no')));
Output (checks):
await check(Future.value(10)).completes((it) => it.equals(10));
await check(Future.error('oh no')).throws<String>().equals('oh no');
Input (matcher):
var stdout = StreamQueue(Stream.fromIterable(['Ready', 'Go']));
await expectLater(stdout, emitsThrough('Ready'));
Output (checks):
var stdout = StreamQueue(Stream.fromIterable(['Ready', 'Go']));
await check(stdout).emitsThrough((it) => it.equals('Ready'));