dart-migrate-to-checks-package 是做什么的?
将 package:matcher 中的 expect 及相关函数替换为 package:checks 的等效实现。
将 `package:matcher` 中的 `expect` 及相关函数替换为 `package:checks` 的等效实现。
此技能用于将 Dart 项目中 `package:matcher` 的 `expect`、`expectAsync` 等断言函数迁移至 `package:checks` 提供的 `check`、`expectAsync` 等现代校验 API。它主要面向使用 Dart 语言编写测试的开发者,支持在主项目或测试文件中执行迁移。工作原理是通过代码分析和自动重构,将旧风格的断言调用替换为等价的 `checks` 包语法,例如 `expect(value, equals(expected))` 转换为 `check(value).equals(expected)`。该迁移有助于统一 Dart 测试生态,利用更简洁且类型安全的校验库。技能本体为 Replit 兼容的 Agent Skill,可通过 Replit 环境执行。
npx skills add https://github.com/dart-lang/skills/tree/main/skills/dart-migrate-to-checks-packageInstalled? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →
将 package:matcher 中的 expect 及相关函数替换为 package:checks 的等效实现。
This repo contains 8 individual skills — each has its own dedicated page.
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
Uses get_runtime_errors and lsp to fetch an active stack trace, locate the failing line, apply a fix, and verify resolution via hot_reload.
Define and generate mock objects for external dependencies using `package:mockito` and `build_runner`. Use when unit testing classes that depend on complex external services like APIs or databases.
Workflow for fixing package version conflicts. Use this when `pub get` fails due to incompatible package versions.
Execute `dart analyze` to identify warnings and errors, and use `dart fix --apply` to automatically resolve mechanical lint issues. Use during development to ensure code quality and before committing changes.
Use switch expressions and pattern matching where appropriate
Send and manage iMessages via BlueBubbles, including attachments, tapbacks, edits, replies, and groups.
Control Eight Sleep pods (status, temperature, alarms, schedules).
BluOS CLI (blu) for discovery, playback, grouping, and volume.
Create, search, and manage Bear notes via grizzly CLI.
Capture frames or clips from RTSP/ONVIF cameras.
Search GIF providers with CLI/TUI, download results, and extract stills/sheets.