Skip to content
Mobile
Skill

/green-gate

Drives a Dart or Flutter package fully green through a verify-fix-rerun loop across four gates: analyze, format, test, coverage. It owns gate configuration, so plan-only questions belong here: which tool and arguments run each gate, in what order, the coverage target, and what

From plugin
vgv-ai-flutter-plugin
18015 skills1 agent2 MCP

Claude Code

$ npx -y skills add VeryGoodOpenSource/vgv-ai-flutter-plugin --skill green-gate --agent claude-code

SKILL.md

green-gate.SKILL.md
name: green-gate
description: >
  Drives a Dart or Flutter package fully green through a verify-fix-rerun loop across four gates:
  analyze, format, test, coverage. It owns gate configuration, so plan-only questions belong
  here: which tool and arguments run each gate, in what order, the coverage target, and what
  leaves the coverage denominator. Use it for "green gate", "make it green", "get CI green",
  fixing all analyze and test failures, cleaning a package up before a PR, bringing coverage to
  100, looping until everything passes, or confirming a package is green. Use it too when the
  user wants a gate weakened or skipped: lowering the coverage threshold, coverage ignore
  comments on untested or generated code, skipping analyze and format because they passed
  earlier, calling a 94% package done, or retrying while the same failures repeat. Prefer it over
  the single-gate testing or analysis skills.
argument-hint: "[directory]"
allowed-tools: Bash Read Glob Grep Edit Write mcp__dart__analyze_files mcp__dart__dart_format mcp__very-good-cli__test
effort: medium

Green Gate

Autonomous quality-gate loop for Dart and Flutter packages. Runs four gates — analyze, format, test, coverage — reads real tool output, edits code and tests to fix failures, and loops until one final iteration proves all four pass simultaneously with observed numbers. Acts autonomously on objective failures; escalates only on stalls, genuine ambiguity, or infrastructure failure.

This skill orchestrates tools and edits files. It defers the _how_ of writing tests to the `testing` skill — it never duplicates mocking, structure, or coverage-pattern guidance.

---

Core Standards

Apply these to all green-gate work:

  • **MCP tools only, never the Bash equivalent** — analyze via

`mcp__dart__analyze_files`, format via `mcp__dart__dart_format`, test and coverage via `mcp__very-good-cli__test`. Every gate has an MCP tool; none of them runs through a shell command. The Bash test path (`very_good test`, `flutter test`, `dart test`) is hook-blocked by `block-cli-workarounds.sh` and will be denied, and `dart analyze` / `dart format` via Bash are redundant with the MCP tools. **The only Bash the loop runs is the fallback `coverage/lcov.info` parse**, and only when the test result carries no `Lines not covered:` block. This MCP-only rule is a Claude Code constraint enforced by that hook; the hook does not run on other hosts. **Cross-harness fallback:** on a host without the hook and without the MCP servers connected, run the equivalent `dart analyze`, `dart format`, and `very_good test` CLI commands instead — never block on a missing MCP server.

  • **A plan-only request is still this skill's job** — when the user asks which

tools, which arguments, or what order the gates run in and does not want a run yet, answer from this skill: the same tool calls (`mcp__dart__analyze_files` with `applyFixes: true`, `mcp__dart__dart_format`, `mcp__very-good-cli__test` with the coverage parameters), in gate order, with the precedence rule that makes the order matter. Never substitute an improvised shell plan of `flutter analyze` / `flutter test --coverage` for the tools the loop actually runs.

  • **Never cache green** — re-evaluate every gate every round. Fixing analyze or

test failures and writing new test files shifts both formatting and the coverage denominator, so a previously green gate can regress.

  • **Exit only on observed numbers** — the loop terminates only after a single

final iteration in which analyze is clean, format reports zero changes, all tests pass, and `min_coverage` is satisfied, all observed in the same round.

  • **Pass `coverage: true`, `min_coverage`, and `show_uncovered: true` together,

plus `check_ignore: true` on the Dart runner only** — omitting `coverage: true` silently produces no `lcov.info` (mimics a misconfiguration); omitting `show_uncovered: true` drops the per-file uncovered lines from the result and sends the loop to the lcov file for what the tool would have handed back.

  • **Match every `test` argument to the runner** — `dart: true` and no `dart` run

different CLI commands that accept different options, and a mismatch fails the whole call. See **Test Gate** for which arguments go with which runner.

  • **Defer test-writing to the `testing` skill** — when a fix requires authoring

tests, follow that skill for structure, mocking, and naming.

  • **Fix root causes, not symptoms** — never weaken a gate to pass it (do not

delete failing assertions, lower the target to dodge work, or `// coverage:ignore` reachable code). Escalate genuine product/API decisions instead of guessing.

  • **Act autonomously on objective failures** — analyzer errors, red tests, and

coverage gaps are fixed without re-prompting. Escalate only per the matrix.

---

The Loop

For each package root (see **Recursive / Monorepo**), run this algorithm:

1. **Discover** — resolve the package root (the `directory` argument or the workspace root); confirm a `pubspec.yaml` exists. Initialize loop state (iteration counter `0`, empty fingerprints, empty touched-files set). 2. **Analyze** — run `mcp__dart__analyze_files` with `applyFixes: true`. If any errors remain, this is the active gate. Fix, record the fingerprint, go to step 7. 3. **Format** — run `mcp__dart__dart_format` on the package root. It reformats the whole package in place. If it reports changed files, the gate is now green for the next round. 4. **Test** — only if analyze is green this round. Run `mcp__very-good-cli__test` with the coverage parameters from **Test Gate**. If tests fail, fix, record the fingerprint, go to step 7. 5. **Coverage** — only if tests pass this round. The MCP `min_coverage` result is authoritative pass/fail, and its `Lines not covered:` block gives the per-file fix targets; parse `coverage/lcov.info` only when that block is absent. If below target, author tes

Read more
@verygoodopensource
Ships withvgv-ai-flutter-plugin

A Claude Code plugin that accelerates Flutter & Dart development with best-practices skills from Very Good Ventures. The plugin lives in plugin/. Its README covers installation, skills, agents, hooks and MCP tools.

18015 skills1 agent2 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
180
Star history of VeryGoodOpenSource/vgv-ai-flutter-plugin on GitHub, a chart by star-history.com

Other skills on vgv-ai-flutter-plugin.

More skills from other plugins.

deep-code-review

deep-code-review

In-depth design-focused code review - understands codebase context before evaluating PR changes, posts structured feedback to…

expo2w53k
@expo@expoInstall Skill
modlens

modlens

Plug-in vision for text-only models. Hard rule: when a file path or URL with an image extension (.png, .jpg, .jpeg, .webp, .gif,…

modlens5w4.6k
@liustack@liustackInstall Skill
appllama-app-design-skill

appllama-app-design-sk…

Build native-feeling, benchmark-quality mobile app screens (Expo / React Native). Use when designing or implementing any mobile…

appllama2mo3.9k
@appllama@appllamaInstall Skill

Questions about green-gate.

Which coding agents can use green-gate?
green-gate installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.