dart-use-pattern-matching は何をしますか?
適切な箇所で switch 式とパターンマッチングを使用します。
適切な箇所で switch 式とパターンマッチングを使用します。
このスキルは、Dart 言語の強力な機能である switch 式とパターンマッチングを、コードベース内で適切に活用することを推奨します。特に Dart 3.0 以降で導入されたこれらの機能は、従来の if-else チェーンや複雑な型チェックをより簡潔で表現力豊かに置き換えることができます。開発者はこのスキルを使用することで、コードの可読性を向上させ、潜在的なバグを減らし、Dart のモダンな機能を最大限に活用できるようになります。このスキルは、Claude Code や Cursor などの AI エージェントが Dart コードを生成・レビューする際に、switch 式やパターンマッチングを積極的に利用するようガイドします。具体的には、nullable な値の処理、型の絞り込み、代数的データ型のような構造の分解など、様々な場面でパターンマッチングを適用することを提案します。
npx skills add https://github.com/dart-lang/skills/tree/main/skills/dart-use-pattern-matchingInstalled? Explore more コーディング&開発 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →
適切な箇所で switch 式とパターンマッチングを使用します。
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.
Replace the usage of `expect` and similar functions from `package:matcher` to `package:checks` equivalents.
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.
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.