flutter-build

flutter-build is a command for coding agents from sifxprime/kodelyth-ecc. It costs 25 tokens per session (992 once invoked), scanned A, a copy of flutter-build, MIT.

A Flutter build troubleshooting workflow that diagnoses Dart analyzer errors, dependency problems, generated-code failures, and platform build errors.

In plain words
What is it for?
Use it when Flutter analysis or builds fail, packages conflict, or code generation breaks for Android or web builds.
Why use it?
It reduces the time spent tracing build failures by fixing one reported problem at a time and rechecking the project after each change.

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/sifxprime/kodelyth-ecc/flutter-build
Clone the repo
git clone --depth 1 https://github.com/sifxprime/kodelyth-ecc

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-build

README.md
[![agentmods](https://agentmods.dev/badge/commands/sifxprime/kodelyth-ecc/flutter-build.svg)](https://agentmods.dev/commands/sifxprime/kodelyth-ecc/flutter-build)
Your own site
<a href="https://agentmods.dev/commands/sifxprime/kodelyth-ecc/flutter-build"><img src="https://agentmods.dev/badge/commands/sifxprime/kodelyth-ecc/flutter-build.svg" alt="Measured on agentmods" height="20"></a>
Per session 25 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 992 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% 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.00025 $0.00992
Opus 5 $0.00013 $0.00496
Sonnet 5 $0.00005 $0.00198
Haiku 4.5 $0.00003 $0.00099

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

Security

Grade A, and why

flutter-build 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

100% identical to flutter-build — 2 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-build.md · 165 lines

How it starts

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

Flutter Build and Fix

This command invokes the dart-build-resolver agent to incrementally fix Dart/Flutter build errors with minimal changes.

What This Command Does

  1. Run Diagnostics: Execute flutter analyze, flutter pub get
  2. Parse Errors: Group by file and sort by severity
  3. Fix Incrementally: One error at a time
  4. Verify Each Fix: Re-run analysis after each change
  5. Report Summary: Show what was fixed and what remains

When to Use

Use /flutter-build when:

  • flutter analyze reports errors
  • flutter build fails for any platform
  • dart pub get / flutter pub get fails with version conflicts
  • build_runner fails to generate code
  • After pulling changes that break the build

Diagnostic Commands Run

# Analysis
flutter analyze 2>&1

# Dependencies
flutter pub get 2>&1

# Code generation (if project uses build_runner)
dart run build_runner build --delete-conflicting-outputs 2>&1

# Platform builds
flutter build apk 2>&1
flutter build web 2>&1

Example Session

User: /flutter-build

Agent:
# Flutter Build Resolution

## Initial Diagnostics

```
$ flutter analyze
Analyzing project...

  error • lib/features/user/data/user_repository_impl.dart:34:16 •
    A value of type 'String?' can't be assigned to a variable of type 'String'. •
    invalid_assignment

  error • lib/features/cart/presentation/cart_page.dart:58:5 •
    The method 'add' isn't defined for the type 'List<Item>'.
    Try correcting the name to the name of an existing method, or defining a method named 'add'. •
    undefined_method

2 errors found.
```

## Fix 1: Null Safety

File: lib/features/user/data/user_repository_impl.dart:34
Error: A value of type 'String?' can't be assigned to type 'String'

Changed:
```dart
final id = response.id;
```
To:
```dart
final id = response.id ?? '';
```

```
$ flutter analyze
1 error found.
```

## Fix 2: Immutable List

File: lib/features/cart/presentation/cart_page.dart:58
Error: The method 'add' isn't defined for the type 'List<Item>'
Cause: State holds an unmodifiable list; mutation goes through Cubit

Changed:
```dart
state.items.add(item);
```
To:
```dart
context.read<CartCubit>().addItem(item);
// Note: Cubit exposes named methods (addItem, removeItem);
// .add(event) is the BLoC event API — don't mix them.
```

```
$ flutter analyze
No issues found!
```

## Final Verification

```
$ flutter test
All tests passed.
```

## Summary

| Metric | Count |
|--------|-------|
| Analysis errors fixed | 2 |
| Files modified | 2 |
| Remaining issues | 0 |

Build Status: PASS ✓

Read the full file on GitHub · 165 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 · 165 lines · 25 tokens per session scan A 84cbaba905d7

Subscribe to this mod's changes

flutter-build is a command published in the GitHub repository sifxprime/kodelyth-ecc (11 stars, last pushed 2d ago), licensed MIT. It adds 25 tokens to every session and 992 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to flutter-build, differing in 2 lines, and is treated as a copy.