Skill: Dart CLI Application Architecture
by Dart team
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.
Compile C/C++ into Dart Code Assets with build and link hooks — local toolchain builds with linker tree-shaking, or hash-validated downloads of prebuilt libraries.
Add this skill to your favorite AI agent in a few steps.
Learn how to use this skill with different AI agents.
Setup native assets and compile my C code with build and link hooks.
Dart's Native Assets feature lets a package ship compiled C or C++ alongside its Dart code, so a consumer runs dart run or builds a Flutter app and the native library is produced and bundled automatically. Getting there means writing hook/build.dart and hook/link.dart against package:hooks and package:native_toolchain_c — orchestration that is easy to describe and fiddly to get right. This is the Dart team's skill for that job.
Local compilation with linker tree-shaking is the recommended route. The skill covers the host compiler toolchains you need per platform, laying out C sources and bindings, writing the build spec for the library, and implementing both hooks. The link hook is where package:record_use comes in: it maps which native symbols the Dart code actually reaches so the linker can drop the rest, which matters when a large C library would otherwise be shipped whole into a mobile binary.
Downloading precompiled dynamic libraries is the alternative when building from source is impractical. The skill's framing here is the security one — a build hook that downloads a binary is a supply-chain surface, so it orchestrates downloads with cryptographic hash validation rather than fetching and trusting.
The failure modes in native asset hooks are unforgiving: a hook that compiles on the author's macOS machine and fails on a Linux CI runner, a tree-shaking configuration that strips a symbol reached only through FFI lookup, a download step with no integrity check. The skill encodes the workflow — add dependencies, define C specifications, implement the hooks, run the hook cycle — along with the constraints that decide which approach fits, so the agent is not improvising toolchain orchestration.
It applies to plain Dart packages and Flutter plugins alike. Install with npx skills add dart-lang/skills --skill '*' --agent universal --yes.
by Dart team
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.
by Flutter
The Flutter team's official skill for diagnosing and fixing constraint errors — RenderFlex overflows, unbounded viewports and misplaced ParentData widgets.
by Flutter
The Flutter team's official skill for structuring an app in the recommended UI / Logic / Data layers, with MVVM view-models and the repository pattern.
Official WordPress skill for Gutenberg block work: block.json, attributes and serialization, dynamic rendering, and the deprecation path that keeps existing content valid.