dart-collect-coverage

Automate Dart and Flutter test coverage collection and LCOV reporting.

428|29|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/dart-lang/skills --skill dart-collect-coverage
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dart-collect-coverage
Source: https://github.com/dart-lang/skills/tree/main/skills/dart-collect-coverage
Command: npx skills add https://github.com/dart-lang/skills --skill dart-collect-coverage

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Collecting test coverage for Dart and Flutter projects can be tedious, error-prone, and hard to share with CI systems, which obscures code health and progress.

Core Features & Use Cases

  • Dev dependency workflow: integrate the coverage package as a dev_dependency to enable coverage collection during tests.
  • LCOV generation: generate a standards-compliant LCOV report for dashboards and audits.
  • Workspace support: works for single-package projects and multi-package workspaces, producing centralized coverage artifacts.

Quick Start

Add the coverage package as a dev_dependency and run the coverage workflow to generate an LCOV report.

Frequently Asked Questions about dart-collect-coverage

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate an LCOV report for Dart and Flutter tests?

To generate an LCOV report for Dart and Flutter tests, add the coverage package as a dev_dependency and run the bundled scripts to execute tests and produce a standards-compliant lcov.info file.

What is the best way to collect test coverage across a multi-package Flutter workspace?

The best way to collect test coverage across a multi-package Flutter workspace is using an automated workflow that runs tests and produces centralized coverage artifacts, including an LCOV report for the entire workspace.

Does Dart coverage collection require the coverage package as a dev_dependency?

Yes, Dart coverage collection requires the coverage package as a dev_dependency. This enforces proper test execution and enables the scripts to generate the necessary coverage.json and lcov.info files.

Why does my Flutter test coverage workflow fail to find the lcov.info file?

Your Flutter test coverage workflow fails to find the lcov.info file if proper test execution and validation steps are skipped. The workflow enforces validation to ensure both coverage.json and lcov.info exist in the coverage directory.