← All writing

Your Flutter dependencies can now teach your AI coding agent

Dart package skills put library-specific guidance beside the dependency. Here is why that could matter more than another clever prompt.

An AI assistant writes a convincing networking layer. The imports look familiar. The error handling reads well. Then you run the analyzer: a method does not exist in the version your app actually uses.

The frustrating part is that the package author probably already explained the correct approach somewhere. The assistant simply did not have that explanation when it wrote the code.

Dart’s package skills address that gap. Package maintainers can distribute agent instructions and examples with their pub packages. The skills command discovers guidance from supported dependencies and installs it into the project’s agent skills directory.

A dependency can carry its own instruction manual

From a Dart or Flutter project, the documented discovery command is:

dart run skills@ get

It scans immediate dependencies for available skills and lets you choose what to install. Not every package provides them. You can inspect managed installations with:

dart run skills@ list

The interesting possibility is a tighter connection between the library in your app and the examples your assistant follows. Instead of repeatedly pasting a package’s conventions into chat, a team can make that guidance part of its development setup.

The experiment worth running

Take one small task that your assistant has previously struggled with: perhaps handling a failed upload without discarding the user’s selected file.

Start from the same clean revision for two attempts. In the first, use your normal setup. In the second, add any available skill for the relevant dependency. Keep the task description unchanged:

Add upload retry to this feature. Preserve the selected file on failure,
follow this project's existing state pattern, and test a failed request
followed by a successful retry. Explain any dependency APIs you use.

Compare the results using things you can verify: analyzer failures, nonexistent APIs, unnecessary dependencies, and whether retry preserves the file. Record the package and skill versions with the result. This is a proposed experiment, not a benchmark we have run.

If the second attempt only produces a longer explanation, the extra context has not yet earned its place. If it avoids a recurring API mistake, the benefit is concrete.

Instructions and live evidence do different jobs

The official Flutter AI development guide describes another part of the workflow: the Dart and Flutter MCP server connects an assistant to project tools such as diagnostics, symbol resolution, tests, and runtime inspection.

That gives you a useful pairing. Package guidance explains an intended pattern; project tools check whether the implementation fits the actual app. Neither a polished explanation nor a successful compile proves that retry behaves correctly, so the behavioral test still matters.

Review the guidance like another development input

Before adopting a skill, read it. Does it match the package version and your architecture? Does it suggest commands or conventions your team wants? Keep the useful parts small enough to review when they change.

My takeaway: improving AI-assisted Flutter work may depend as much on getting the right package knowledge into the session as on choosing a more capable model. This is a small enough idea to test on one frustrating bug before changing your whole workflow.

Something to add? I’d love to hear it.

Let’s talk about it ↗