dart-add-unit-test
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…
Entrypoint structure, exit codes, cross-platform scripts. Use when building command line utilities, scripts, or applications.
$ npx -y skills add flutter/agent-plugins --skill dart-build-cli-app --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/dart-build-cli-appContext preview
The summary Claude sees to decide when to auto-load this skill.
Entrypoint structure, exit codes, cross-platform scripts. Use when building command line utilities, scripts, or applications.
name: dart-build-cli-app description: Entrypoint structure, exit codes, cross-platform scripts. Use when building command line utilities, scripts, or applications. metadata: model: models/gemini-3.1-pro-preview last_modified: Fri, 04 May 2026 17:41:00 GMT
Initialize new CLI projects using the official Dart template to ensure standard directory structures.
Import the `args` package to manage command-line arguments, flags, and subcommands.
Leverage the `io` and `stack_trace` packages to build robust, production-ready CLI tools.
> [!IMPORTANT] > **All new commands and significant features must be covered by automated tests.** Manual verification is not sufficient for testing logic. However, manual verification of help text and user experience (UX) is still required to ensure the interface is intuitive and correct.
Use `test_process` and `test_descriptor` to write high-fidelity integration tests for your CLI.
Select the appropriate compilation target based on your distribution requirements.
<details> <summary>Cross-Compilation Targets (Linux Only)</summary>
Dart supports cross-compiling to Linux from macOS, Windows, or Linux hosts. Use the `--target-os` and `--target-arch` flags with `dart compile exe` or `dart compile aot-snapshot`.
Example: `dart compile exe --target-os=linux --target-arch=arm64 bin/cli.dart` </details>
Agent plugins for Flutter, maintained by the Flutter team. A collection of plugins designed to extend AI agent capabilities for Flutter development.
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…
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…
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.