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).
In this repository2 other files it gives its agents.
- flutter-portSkill
- flutter-reviewSkill
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
- Very specific: line 15
Check pubspec.yaml for the Flutter/Dart version.
- Very specific: line 17
If the project has no analysis_options.yaml, offer the one from this repo.
- Very specific: line 23
State: every controller, node and subscription has a matching line in dispose() (F11).
- Very specific: line 24
After every await in a State: if (!mounted) return.
- Distinctive: line 29
No fixed heights around text (F31).
- Distinctive: line 35
Run the checker on what you wrote and fix every finding before you show the code:
- Very specific: line 41
If flutter analyze is available, run it too.
- Distinctive: line 42
Do not claim the code compiles if you did not run the analyzer.
≈ “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.
Files
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
- 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.
- Check
pubspec.yamlfor the Flutter/Dart version.MediaQuery.sizeOfneeds Flutter 3.10+, sealed classes and records need Dart 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).consteverywhere 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 everyawaitin a State:if (!mounted) return;beforesetStateorcontext(F12, F13). - Types: no
!to silence the analyzer (F19). Loading/data/error as a sealed class with an exhaustive switch (F20), nodefault(F21). Typed models instead ofdynamicmaps (F22). - Async: await or
unawaited(...)every Future (F25). Catch specific exceptions (F26). - Theme: colors from
Theme.of(context).colorScheme(F29), text fromtextTheme(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.
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
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.

