Google's official agent skill for writing production Maps Platform code — grounded in freshly fetched docs, with a demo key path that needs no billing account.
Dart CLI Application ArchitectureSkill
Summary
The Dart team's skill for structuring real command-line apps — thin entrypoints, honest exit codes, stream routing, signal teardown and AOT-safe subprocess spawning.
Features
- Thin entrypoint pattern: logic in lib/src/, bin/ as a shim, so the CLI is testable
- Avoids destructive exit(N) calls that truncate buffered output
- stdout vs stderr routing and diagnostic formatting for pipeable tools
- Argument parsing with package:args — ArgParser and CommandRunner
- pubspec executables: mapping and single-source versioning via package:build_version
- Subprocess spawning that survives AOT compilation
- Signal handling and terminal teardown
- Audit checklist for reviewing an existing CLI
Install This Skill
Add this skill to your favorite AI agent in a few steps.
Skill Content
Usage Instructions
Learn how to use this skill with different AI agents.
Example Usage
Create a production CLI app structure with CommandRunner and clean exit codes.
Description
Maintained by the Dart team, this skill teaches an agent how a Dart command-line application should be put together, which is the knowledge that separates a script that works on the author's machine from a tool that behaves correctly in a pipeline.
What it corrects
Destructive exits. The skill argues against scattering exit(N) through the codebase and shows the patterns that let a CLI unwind cleanly — the difference between a tool that flushes its output and one that truncates it.
The thin entrypoint. Logic belongs in lib/src/, with bin/ reduced to a shim. That is what makes a CLI testable at all, and the skill has a section on testing CLI applications that depends on it.
Streams and diagnostics. Guidance on what belongs on stdout versus stderr, and how to format diagnostics — the distinction that decides whether your tool can be piped into another.
What it covers beyond structure
Argument parsing and command routing with package:args, using either ArgParser or CommandRunner; mapping executables in pubspec.yaml under executables:; single-source versioning via package:build_version; caching conventions; modern async and stack traces; signal handling and terminal teardown; and compilation and distribution of native binaries.
Two sections are worth calling out because they are where agents most often produce subtly broken code. Subprocess spawning and AOT resilience covers what changes when a Dart program is compiled ahead of time and spawns another Dart process — the assumptions that hold in JIT and quietly stop holding in an AOT binary. And the workflows and audit checklist at the end gives the agent a concrete pass to run over an existing CLI rather than only a recipe for new ones.
Scope
It is explicitly not for Flutter UI widgets, web applications or standalone HTTP servers. Install the whole Dart collection with npx skills add dart-lang/skills --skill '*' --agent universal --yes, which places it in the standard .agents/skills folder that most agents read.
Related Skills
Railway's official agent skill: create projects, provision databases and buckets, deploy, manage variables and domains, and read build failures back — from the CLI, API or MCP server.
Diagnoses wrong gradients in differentiable NVIDIA Warp programs by measuring first — comparing autodiff against finite differences on a shrunk reproduction before proposing any fix.
Google's official skill for the gws CLI — drive Gmail, Drive, Calendar, Sheets, Docs, Chat and Admin APIs from an agent, with Model Armor screening.