flutter-review

flutter-review is a command for coding agents from Fmarzochi/EGC. It costs 32 tokens per session (921 once invoked), scanned A, a copy of flutter-review, Apache-2.0.

A review command for Flutter and Dart changes, covering code structure, widgets, state management, performance, accessibility, and security. Flutter is a toolkit for building apps, while Dart is its programming language.

In plain words
What is it for?
Use it to review widgets, services, state-management code, or a complete change set before a pull request or production release.
Why use it?
It finds problems and suggests fixes before code is submitted or released, including issues that may not appear during a normal build.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/fmarzochi/egc/flutter-review
Clone the repo
git clone --depth 1 https://github.com/Fmarzochi/EGC

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for flutter-review

README.md
[![agentmods](https://agentmods.dev/badge/commands/fmarzochi/egc/flutter-review.svg)](https://agentmods.dev/commands/fmarzochi/egc/flutter-review)
Your own site
<a href="https://agentmods.dev/commands/fmarzochi/egc/flutter-review"><img src="https://agentmods.dev/badge/commands/fmarzochi/egc/flutter-review.svg" alt="Measured on agentmods" height="20"></a>
Per session 32 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 921 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 95% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00032 $0.00921
Opus 5 $0.00016 $0.00461
Sonnet 5 $0.00006 $0.00184
Haiku 4.5 $0.00003 $0.00092

Measured yesterday against content hash c992781a7bde, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

flutter-review scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

95% identical to flutter-review — 20 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

commands/flutter-review.md · 117 lines

How it starts

The opening of the file, as written. The whole thing — 117 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Flutter Code Review

This command invokes the flutter-reviewer agent to review Flutter/Dart code changes.

What This Command Does

  1. Gather Context: Review git diff --staged and git diff
  2. Inspect Project: Check pubspec.yaml, analysis_options.yaml, state management solution
  3. Security Pre-scan: Check for hardcoded secrets and critical security issues
  4. Full Review: Apply the complete review checklist
  5. Report Findings: Output issues grouped by severity with fix guidance

Prerequisites

Before running /flutter-review, ensure:

  1. Build passes: run /flutter-build first; a review on broken code is incomplete
  2. Tests pass: run /flutter-test to confirm no regressions
  3. No merge conflicts: resolve all conflicts so the diff reflects only intentional changes
  4. flutter analyze is clean: fix analyzer warnings before review

When to Use

Use /flutter-review when:

  • Before submitting a PR with Flutter/Dart changes (after build and tests pass)
  • After implementing a new feature to catch issues early
  • When reviewing someone else's Flutter code
  • To audit a widget, state management component, or service class
  • Before a production release

Review Areas

Area Severity
Hardcoded secrets, cleartext HTTP CRITICAL
Architecture violations, state management anti-patterns CRITICAL
Widget rebuild issues, resource leaks HIGH
Missing dispose(), BuildContext after await HIGH
Dart null safety, missing error/loading states HIGH
Const propagation, widget composition HIGH
Performance: expensive work in build() HIGH
Accessibility, semantic labels MEDIUM
Missing tests for state transitions HIGH
Hardcoded strings (l10n) MEDIUM
Pub dependency hygiene LOW

Example Session

User: /flutter-review

Agent:
# Flutter Code Review

## Context

Changed files:
- lib/features/auth/presentation/login_page.dart
- lib/features/auth/data/auth_repository_impl.dart

State management: Riverpod (detected from pubspec.yaml)
Architecture: feature-first

## Security Pre-scan

✓ No hardcoded secrets detected
✓ No cleartext HTTP calls

## Review Findings

[HIGH] BuildContext used after async gap without mounted check
File: lib/features/auth/presentation/login_page.dart:67
Issue: `context.go('/home')` called after `await auth.login(...)` with no `mounted` check.
Fix: Add `if (!context.mounted) return;` before any navigation after awaits (Flutter 3.7+).

[HIGH] AsyncValue error state not handled
File: lib/features/auth/presentation/login_page.dart:42
Issue: `ref.watch(authProvider)` switches on loading/data but has no `error` branch.
Fix: Add error case to the switch expression or `when()` call to show a user-facing error message.

[MEDIUM] Hardcoded string not localized
File: lib/features/auth/presentation/login_page.dart:89
Issue: `Text('Login')`: user-visible string not using localization system.
Fix: Use the project's l10n accessor: `Text(context.l10n.loginButton)`.

## Review Summary

| Severity | Count | Status |
|----------|-------|--------|
| CRITICAL | 0     | pass   |
| HIGH     | 2     | block  |
| MEDIUM   | 1     | info   |
| LOW      | 0     | note   |

Verdict: BLOCK: HIGH issues must be fixed before merge.

Read the full file on GitHub · 117 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 117 lines · 32 tokens per session scan A c992781a7bde

Subscribe to this mod's changes

flutter-review is a command published in the GitHub repository Fmarzochi/EGC (48 stars, last pushed today), licensed Apache-2.0. It adds 32 tokens to every session and 921 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 95% identical to flutter-review, differing in 20 lines, and is treated as a copy.