green-gate

Drives Dart and Flutter packages green through an analyze, format, test, and coverage loop.

162|23|Updated Feb 27, 2026
One-click install
npx skills add https://github.com/VeryGoodOpenSource/vgv-ai-flutter-plugin --skill green-gate-verygoodopensource
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: green-gate
Source: https://github.com/VeryGoodOpenSource/vgv-ai-flutter-plugin/tree/main/skills/green-gate
Command: npx skills add https://github.com/VeryGoodOpenSource/vgv-ai-flutter-plugin --skill green-gate-verygoodopensource

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Getting a Dart or Flutter package fully green before a pull request means juggling analyzer errors, formatting drift, failing tests, and coverage gaps across repeated manual runs. This Skill automates that entire verify-fix-rerun loop, fixing objective failures autonomously and only stopping when all four gates pass in the same observed round. ## Core Features & Use Cases - Four-gate autonomous loop: Runs analyze, format, test, and coverage in fixed precedence order via MCP tools, re-evaluating every gate each round until all pass simultaneously. - Stall and oscillation detection: Tracks per-gate failure fingerprints and iteration counts to detect no-progress loops, gate oscillation, and budget exhaustion, escalating with actionable reports instead of retrying forever. - Coverage enforcement: Holds packages to a configurable coverage target (default 100) with generated-file exclusion globs and // coverage:ignore support, parsing coverage/lcov.info for per-file fix targets. - Monorepo support: Discovers all pubspec.yaml package roots and applies a per-package iteration budget so one failing package never blocks the others. - Use Case: Before opening a PR, ask the assistant to make your package green; it fixes analyzer errors, reformats code, repairs failing tests, writes missing coverage tests, and confirms the final passing numbers. ## Quick Start Run the green-gate loop on my Flutter package and keep fixing failures until analyze, format, tests, and 100 percent coverage all pass.

Frequently Asked Questions about green-gate

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

FAQPage Schema
How do I make a Flutter package pass analyze, format, test, and coverage?

Run the green-gate loop on the package root. It executes the four gates in fixed order using MCP tools, fixes failures autonomously, and re-verifies every gate each round until all four pass in a single observed iteration.

How do I enforce 100 percent test coverage in a Dart package?

Pass coverage: true, min_coverage: 100, and check_ignore: true together to the very_good_cli test tool. Generated files are excluded via the exclude_coverage glob, so 100 percent applies only to testable hand-written code.

Does the green-gate loop work in a Dart or Flutter monorepo?

Yes. It discovers every pubspec.yaml package root, runs the loop per package with its own iteration budget of 5, and continues past failures so one red package does not block the others. A single min_coverage target applies to all packages.

Why is my coverage lcov.info file missing after running tests?

A missing lcov.info has three causes: the coverage flag was not passed, tests ran but produced no coverage, or no test files exist. The first is fixed by correcting the tool call; the others require escalation or authoring tests.

When does the green-gate loop stop and ask the user instead of retrying?

It escalates on identical failure fingerprints between rounds, two gates trading green and red, reaching the iteration cap with gates still red, genuine product decisions, or tool failures such as test timeouts. A standing keep-going instruction does not override these triggers.