agentleFS
TenrainingTenraining/Claude-Skills/skills/flutter-conventions/SKILL.md

flutter-conventions

Skill1 starsChanged 20 days agoMITView on GitHub

Write, review, fix or explain Flutter and Dart code using the user's own conventions guide — widgets and layout, StatefulWidget state, theming with ColorScheme.fromSeed, forms and validation, gestures, HTTP/JSON fetching, and Navigator routing (named routes, onGenerateRoute, returning data, nested navigation). Use this whenever the user is working on a Flutter app or Dart file, asks to build a screen, widget, form or route, asks how to structure a Flutter project, asks why their Flutter code misbehaves (setState after dispose, scrolling cut off, form not saving, route crash), or asks for a Flutter concept explained — even if they don't mention conventions or the guide.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

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

    Write and review Flutter/Dart code using the user's conventions.

    line 8
  2. Distinctive:

    Not for Dart backends or CLI tools beyond the basics in guide sections 1–2, and not for other mobile frameworks (React Native, SwiftUI, …

    line 18
  3. Distinctive:

    Match the project: Read the files near where you're working.

    line 23
  4. Very specific:

    Check before finishing: every await followed by setState has a mounted check.

    line 28
  5. Very specific:

    When a guide rule shaped a non-obvious choice, cite it in one line (e.g.

    line 36

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

Flutter Conventions

Write and review Flutter/Dart code using the user's conventions. They live in references/flutter-guide.md, organised by topic, and each rule says why it exists.

The guide is the source of truth. Read the sections that match the task before writing code; the user edits it over time, so don't rely on memory of its rules. Where the guide and general Flutter advice disagree, follow the guide. Where the guide is silent, use current Flutter best practice in the same spirit: small widgets, explicit state, theme-driven styling.

When to use

  • Writing a new screen, widget, form, route or data fetch in a Flutter app.
  • Reviewing or fixing Flutter/Dart code ("does this look right?", "why does this crash?").
  • Planning where files go in lib/.
  • Explaining a Flutter or Dart concept. Use the guide's React/JS analogies; the user knows React.
  • Not for Dart backends or CLI tools beyond the basics in guide sections 1–2, and not for other mobile frameworks (React Native, SwiftUI, Kotlin).

Steps

  1. Read the relevant guide sections. Pick by topic from the contents list. Most tasks touch 2–4 sections. Always include section 11 (pitfalls) when writing or reviewing code.
  2. Match the project. Read the files near where you're working. Keep the project's existing SDK idioms (dot shorthand or not, import style, folder names) unless they break a guide rule.
  3. Do the task.
    • Writing: follow the guide's patterns. Use const constructors, stateless widgets unless state is owned, theme colors and text styles, relative imports for project files, and route constants.
    • Reviewing/fixing: walk the code against the relevant sections and the section 11 checklist. Report real problems only. A style the guide allows (e.g. a private _buildX() helper, ALL-CAPS section comments) is not a finding.
    • Explaining: answer the question first, then show a short example in the guide's style.
  4. Check before finishing: every await followed by setState has a mounted check; every controller is disposed; every widget uses its inputs; no route string is repeated.

Output format

  • Code: complete, runnable files or clearly marked changed sections, with file paths (lib/pages/coop_page.dart). Keep comments short and about why, the way the guide does.
  • Review: a list ordered by impact. For each item: location, the guide rule (e.g. "§6.3 mounted after await"), one sentence on the concrete consequence, then a minimal before/after.
  • Explanation: a direct answer, an analogy if it helps (React/JS), and a short code example.

When a guide rule shaped a non-obvious choice, cite it in one line (e.g. "Route names are constants in routes.dart (§9.5), so a typo fails at compile time."). This keeps the user learning the conventions instead of copying output.

References

  • references/flutter-guide.md: the full conventions guide (Dart basics, async/HTTP, imports and layout, widgets, theming, state, gestures, forms, routing, dev loop, pitfalls checklist).

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.