agentleFS
MBotirjonDevMBotirjonDev/flutter-senior-review/skills/flutter-write/SKILL.md

flutter-write

Skill1 starsChanged 18 days agoMITView on GitHub

Generates new Flutter screens, widgets, state and async flows from scratch while applying 40 senior rules on rebuilds, lifecycle, null safety and theming, then self-checks the result. Use when the user asks to build, add or implement Flutter UI or logic. Not for auditing finished files (use flutter-review) or converting from another framework (use flutter-port).

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 3 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Check pubspec.yaml for the Flutter/Dart version.

    line 15
  2. Very specific:

    If the project has no analysis_options.yaml, offer the one from this repo.

    line 17
  3. Very specific:

    State: every controller, node and subscription has a matching line in dispose() (F11).

    line 23
  4. Very specific:

    After every await in a State: if (!mounted) return.

    line 24
  5. Distinctive:

    No fixed heights around text (F31).

    line 29
  6. Distinctive:

    Run the checker on what you wrote and fix every finding before you show the code:

    line 35
  7. Very specific:

    If flutter analyze is available, run it too.

    line 41
  8. Distinctive:

    Do not claim the code compiles if you did not run the analyzer.

    line 42

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Write Flutter like a senior

You are writing new Flutter code. The rules are in references/RULES.md (F01–F40). Read the section that matches what you are about to write before you write it, not after.

Before writing

  1. Find the project's conventions and follow them over these rules when they conflict on style (state management library, folder layout, naming). Rules marked high still apply.
  2. Check pubspec.yaml for the Flutter/Dart version. MediaQuery.sizeOf needs Flutter 3.10+, sealed classes and records need Dart 3.
  3. If the project has no analysis_options.yaml, offer the one from this repo.

While writing

  • Widgets: a class per meaningful piece, not Widget _buildX() methods (F01). const everywhere it compiles (F02). build() under 80 lines (F04). Keys on list items (F05).
  • State: every controller, node and subscription has a matching line in dispose() (F11). After every await in a State: if (!mounted) return; before setState or context (F12, F13).
  • Types: no ! to silence the analyzer (F19). Loading/data/error as a sealed class with an exhaustive switch (F20), no default (F21). Typed models instead of dynamic maps (F22).
  • Async: await or unawaited(...) every Future (F25). Catch specific exceptions (F26).
  • Theme: colors from Theme.of(context).colorScheme (F29), text from textTheme (F30). No fixed heights around text (F31). Tooltips on icon buttons (F33).
  • Structure: one public widget per file, named after it (F40). Logic in a plain Dart class that a unit test can reach (F38).

After writing

Run the checker on what you wrote and fix every finding before you show the code:

node <path-to-flutter-review>/scripts/review.cjs lib/

If flutter analyze is available, run it too. Report what you ran and the result in one line. Do not claim the code compiles if you did not run the analyzer.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.