dart-migrate-to-checks-package

Migrate Dart test assertions from package:matcher to package:checks syntax.

Updated Nov 23, 2025
One-click install
npx skills add https://github.com/manuelbrandner85/Weltenbibliothekapp --skill dart-migrate-to-checks-package-manuelbrandner85
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dart-migrate-to-checks-package
Source: https://github.com/manuelbrandner85/Weltenbibliothekapp/tree/main/.agents/skills/dart-migrate-to-checks-package
Command: npx skills add https://github.com/manuelbrandner85/Weltenbibliothekapp --skill dart-migrate-to-checks-package-manuelbrandner85

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses the technical debt of using legacy matcher-based assertions in Dart and Flutter test suites, providing a structured path to adopt the more readable and expressive package:checks API.

Core Features & Use Cases

  • Syntax Migration: Automates the transition from expect-based assertions to the fluent check-based API.
  • Asynchronous Handling: Provides clear patterns for migrating complex Future and Stream expectations.
  • Validation Workflow: Integrates static analysis and test execution to ensure the migration maintains code integrity.

Quick Start

Use the dart-migrate-to-checks-package skill to identify and rewrite all legacy expect statements in the current test directory to the modern checks syntax.

Frequently Asked Questions about dart-migrate-to-checks-package

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I migrate Dart tests from package:matcher to the checks API?

To migrate Dart tests from package:matcher to the checks API, you can use this Skill to automatically identify and rewrite legacy expect statements into the modern, fluent check-based syntax. It provides standardized conversion patterns for equality and type checking.

What is the best way to refactor Flutter unit tests to use package:checks?

Refactoring Flutter unit tests to use package:checks is best handled by automating the transition from expect-based assertions to the fluent check-based API. This Skill facilitates the refactoring process while ensuring standardized syntax conversion for your test suite.

Can I migrate asynchronous Stream and Future expectations in Dart to the checks API?

Yes, you can migrate asynchronous Stream and Future expectations in Dart to the checks API. This Skill provides clear, structured patterns specifically designed for migrating complex asynchronous operations from legacy matchers to the modern checks syntax.

Does migrating to the checks package require static analysis integration?

Migrating to the checks package requires integration with Dart MCP tools for static analysis and test validation. This integration is necessary to ensure a zero-regression migration while refactoring assertions from package:matcher to the checks API.

Why should I modernize Dart test suites by moving away from package:matcher?

Modernizing Dart test suites by moving away from package:matcher addresses technical debt and allows you to adopt the more readable and expressive checks API. This transition provides a structured path to improve your assertion syntax for both unit and widget tests.