dart-collect-coverage

Automate Dart and Flutter test coverage collection and LCOV report generation.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires coverage.

What problem does it solve?

This skill eliminates the manual overhead of configuring, executing, and formatting test coverage data, ensuring your Dart and Flutter projects maintain high testing standards without complex setup.

Core Features & Use Cases

  • Automated LCOV Generation: Automatically runs tests and converts raw VM coverage data into standard LCOV reports.
  • Coverage Directives: Provides clear guidance on using ignore comments to exclude untestable code from metrics.
  • Use Case: Use this skill when you need to verify that your test suite covers critical business logic or when preparing coverage reports for CI/CD pipelines.

Quick Start

Use the dart-collect-coverage skill to run all project tests and generate a comprehensive LCOV report in the coverage directory.

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 my Dart and Flutter tests?

To generate an LCOV report for Dart and Flutter tests, you can automate test execution and convert raw VM coverage data into standard LCOV files. This skill configures the extraction process automatically, placing the output in your coverage directory.

Do I need the coverage package to collect Dart test coverage?

Yes, you need the coverage package to collect Dart test coverage. This skill requires the package and access to the Dart VM service to extract raw coverage data and format it into LCOV reports.

Can I exclude untestable code from Flutter test coverage metrics?

You can exclude untestable code from Flutter test coverage metrics by applying coverage ignore directives. This skill provides guidance on using ignore comments to exclude specific code blocks from your final coverage reports.

What is the best way to automate test coverage collection for a CI/CD pipeline?

The best way to automate test coverage collection for a CI/CD pipeline is to use a skill that runs tests and formats raw VM data into standard LCOV reports. This eliminates manual configuration overhead and ensures consistent coverage verification.

Why does my Dart test coverage collection require access to the VM service?

Dart test coverage collection requires access to the VM service to extract raw execution data during test runs. The VM service provides the underlying profiling data needed to generate accurate LCOV reports.