Agent Skills for Dart

Skills from the Dart team: tests and mocks, analysis and dart fix, CLI apps, FFI, documentation and package conflict fixes for an AI agent

  • 529 ★ on the repository
  • Last commit
  • BSD-3-Clause
SkillOfficial

Minimal access

Why this level

  • The skills are text instructions, but they have the agent run dart test, dart analyze and dart fix --apply, which change project files
All reasons and checks

dart-lang/skills

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add skills/agent-skills-for-dart

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Minimal accessThe tool runs nothing and makes no network calls.

  • The skills are text instructions, but they have the agent run dart test, dart analyze and dart fix --apply, which change project files

This is third-party code. Review the repository files before installing.

What it does

Agent Skills for Dart is a set of skills maintained by the Dart team. Each skill describes a repeatable workflow for a common Dart task so the agent makes fewer mistakes. The authors say skills complement MCP: MCP gives an agent tools, and a skill teaches it how to use them. The repository table lists 14 skills. For tests: dart-add-unit-test (package:test), dart-generate-test-mocks (package:mockito and build_runner), dart-collect-coverage (an LCOV report) and dart-migrate-to-checks-package (replacing matcher's expect with package:checks). For code quality: dart-run-static-analysis runs dart analyze and dart fix --apply, dart-write-documentation and dart-use-doc-examples set rules for /// docs and example injection through {@example}, and dart-use-pattern-matching pushes switch expressions and patterns. For building: dart-build-cli-app covers CLI structure, exit codes and subprocesses, dart-use-path-package covers paths, and dart-resolve-package-conflicts covers a failing pub get. For native code: dart-use-ffigen and dart-setup-ffi-assets. dart-fix-runtime-errors reads the stack through get_runtime_errors, finds the line, fixes it and verifies with hot_reload. Every skill in the table has an example prompt such as "Add a unit test for the Point class".

Who it is for. For Dart and Flutter developers who hand tests, analysis, documentation and CLI app building to an agent.

Good fit when

  • A new class needs unit tests laid out by the rules: files under test/ with the _test.dart suffix, groups through group()
  • A class depends on an external API or database and needs mocks via package:mockito and build_runner
  • pub get fails on incompatible versions and the agent needs a procedure for resolving the pubspec conflict
  • You are writing a Dart CLI and need CommandRunner, clear exit codes and stream routing
  • A public API needs documenting by Effective Dart: doc comments and examples through {@example}

Not a fit when

  • You need skills for Flutter UI: the authors point to the separate Agent Skills for Flutter set
  • The project is not written in Dart: the set is entirely about Dart tools and packages
  • You want the agent to run commands unchecked: the skills run dart test, dart fix and similar commands, and the results deserve a review
  • You need an MCP server with Dart tools: the skills only teach how to use them

Example request

Add unit tests for the Point class and generate a mock for ApiClient, then run dart test. Use the Dart skills

Limitations

You need the Dart SDK installed, and some skills also need Flutter and packages such as mockito, build_runner, ffigen and coverage. dart-fix-runtime-errors relies on get_runtime_errors, hot_reload and LSP tools, which a connected MCP server has to provide. The set holds instructions without tools of its own, so without the right packages in pubspec some scenarios will not run.

The default install puts all skills into the project's shared .agents/skills folder.

How to disable. Delete the dart-* folders you do not want from the project's .agents/skills, or the whole skills folder. npx skills update pulls updates; without running it the set stays as is.

FAQ

How do I install the Dart skills in a project?

In the project root run npx skills add dart-lang/skills --skill '*' --agent universal --yes. The --agent universal flag places the skills in the standard .agents/skills folder most agents read. Update with npx skills update.

Which skills does the Dart set include?

Fourteen: tests (add-unit-test, generate-test-mocks, collect-coverage, migrate-to-checks-package), analysis and docs (run-static-analysis, write-documentation, use-doc-examples, use-pattern-matching), building (build-cli-app, use-path-package, resolve-package-conflicts), native code (use-ffigen, setup-ffi-assets) and fix-runtime-errors.

How are the Dart skills different from the Flutter ones?

This repository covers Dart: tests, packages, CLIs, FFI and documentation. For Flutter apps the authors point to the separate Agent Skills for Flutter set in flutter/skills.

How does dart-fix-runtime-errors find the error?

It takes the active stack trace through get_runtime_errors and LSP, finds the failing line, applies a fix and verifies it through hot_reload. The agent needs those tools from a connected MCP server.

How do I replace expect with package:checks?

The dart-migrate-to-checks-package skill does it: it rewrites expect and similar functions from package:matcher to package:checks equivalents. The example prompt from the table: "Migrate the tests in test/user_test.dart to use package:checks".

Discussion

No questions or reviews yet.

Skills

Builder Skills

Skills for agents

A set of small skills from Builder.io for agent work habits: visual plans and diff recaps, docs-first checks, cross-agent review and clean status updates

SkillExtended access4.6KRepository stars

A vetted skill registry with a CLI that installs into twenty-plus agents and an MCP server for on-demand skill lookup

SkillExtended access7.1KRepository stars
Editors’ pick

A skill set from the Kotlin team for agents: Java to Kotlin conversion, build migrations and correct use of backend frameworks

PluginExtended access1.1KRepository stars

A set of 16 engineering skills for agents: Apple platform work, macOS packaging, React performance, code review and refactoring

SkillExtended access4KRepository stars

The author's personal set: shared agent rules and dozens of skills for GitHub, the browser, macOS, messaging and releases, plus a sync script

SkillBroad access7.4KRepository stars

Softaworks Agent Toolkit

Softaworks Agent Skills

A marketplace of skills, subagents and commands for coding agents: development, documentation, planning and workplace communication

PluginExtended access2.6KRepository stars

README in short

A short README: the Dart team maintains the set, and the skills describe repeatable processes that complement MCP. It gives a single install command into .agents/skills, an update command and a table of 14 skills with descriptions and example prompts. A link points to the separate Flutter set.

README badge

Original SKILL.md

---
name: dart-add-unit-test
description: 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.
metadata:
  model: models/gemini-3.1-pro-preview
  last_modified: Mon, 03 Aug 2026 21:51:24 GMT
---
# Testing Dart and Flutter Applications

## Contents
- [Structuring Test Files](#structuring-test-files)
- [Writing Tests](#writing-tests)
- [Executing Tests](#executing-tests)
- [Test Implementation Workflow](#test-implementation-workflow)
- [Examples](#examples)

## Structuring Test Files
Organize test files to mirror the `lib` directory structure to maintain predictability.

* Place all test code within the `test` directory at the root of the package.
* Append `_test.dart` to the end of all test file names (e.g., `lib/src/utils.dart` should be tested in `test/src/utils_test.dart`).
* If writing integration tests, place them in an `integration_test` directory at the root of the package.

## Writing Tests
Utilize `package:test` as the standard testing library for Dart applications.

* Import `package:test/test.dart` (or `package:flutter_test/flutter_test.dart` for Flutter).
* Group related tests using the `group()` function to provide shared context.
* Define individual test cases using the `test()` function.
* Validate outcomes using the `expect()` function alongside matchers (e.g., `equals()`, `isTrue`, `throwsA()`).
* Write asynchronous tests using standard `async`/`await` syntax. The test runner automatically waits for the `Future` to complete.
* Manage test setup and teardown using `setUp()` and `tearDown()` callbacks.
* If testing code that relies on dependency injection, use `package:mockito` alongside `package:test` to generate mock objects, configure fixed scenarios, and verify interactions.

## Executing Tests
Select the appropriate test runner based on the project type and test location.

* If working on a pure Dart project, execute tests using the `dart test` command.
* If working on a Flutter project, execute tests using the `flutter test` command.
* If running integration tests, explicitly specify the directory path, as the default runner ignores it: `dart test integration_test` or `flutter test integration_test`.

Report a problem

Foxx AIAgent Skills for Dart
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.