flutter-idioms

flutter-idioms is a skill for Claude Code, Codex from irahardianto/awesome-agv. It costs 46 tokens per session (6,565 once invoked), scanned A, original, MIT.

A set of recommended patterns for building Flutter apps with Riverpod 3 for app state, Freezed for immutable data, and GoRouter for navigation.

In plain words
What is it for?
Use it when implementing Flutter widgets, state providers, immutable models, navigation, repositories, and generated Riverpod code.
Why use it?
It gives a consistent way to structure Flutter code, catch provider and type errors during compilation, and reduce unnecessary UI rebuilding.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it when implementing Flutter widgets, state providers, immutable models, navigation, repositories, and generated Riverpod code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/irahardianto/awesome-agv/flutter-idioms
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.

Any agent
npx skills add irahardianto/awesome-agv --skill flutter-idioms
Clone the repo
git clone --depth 1 https://github.com/irahardianto/awesome-agv

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/irahardianto/awesome-agv/flutter-idioms/github.svg)](https://agentmods.dev/skills/irahardianto/awesome-agv/flutter-idioms)
Your own site
<a href="https://agentmods.dev/skills/irahardianto/awesome-agv/flutter-idioms"><img src="https://agentmods.dev/badge/skills/irahardianto/awesome-agv/flutter-idioms/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for flutter-idioms

Your own site · 80×15
<a href="https://agentmods.dev/skills/irahardianto/awesome-agv/flutter-idioms"><img src="https://agentmods.dev/badge/skills/irahardianto/awesome-agv/flutter-idioms.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 46 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,565 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found 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.1 $0.00046 $0.06565
Opus 5.5 $0.00018 $0.02626
Sonnet 5.5 $0.00009 $0.01313
Haiku 4.5 $0.00005 $0.00656

Measured 1mo ago against content hash 391ced925b2d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

flutter-idioms 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 1mo ago.

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.

.agents/skills/flutter-idioms/SKILL.md · 875 lines

How it starts

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

Flutter Idioms and Patterns (Riverpod 3)

Core Philosophy

Flutter is a UI toolkit first — performance is a first-class concern. const widgets and immutable data keep the render tree efficient. Riverpod 3 is the canonical state management solution: compile-safe, testable without BuildContext, no implicit global state, and with automatic retry and pause/resume built in.

Code generation is mandatory. All providers must use @riverpod / @Riverpod(keepAlive: true) annotations with riverpod_generator and build_runner. This catches type errors, missing overrides, and broken provider graphs at compile time — bugs are caught before they reach users.

Required dependencies:

# pubspec.yaml
dependencies:
  flutter_riverpod: 3.2.1
  riverpod_annotation: 4.0.2

dev_dependencies:
  riverpod_generator: 4.0.3
  build_runner: # latest
  riverpod_lint: # latest

Scope: This file covers Flutter/Dart coding idioms. For file and folder layout, see references/project-structure.md. For test naming, see testing-strategy.md. For general error handling principles, see error-handling-principles.md.


const Constructors — Everywhere

Make every widget const when possible. const widgets are created once and never rebuilt unless their inputs change — this is Flutter's most impactful performance optimization.

// ✅ const constructor — widget is rebuild-safe
class TaskCard extends StatelessWidget {
    const TaskCard({super.key, required this.task});
    final Task task;
    // ...
}

// Usage — compile-time constant
const TaskCard(task: myTask)

// ❌ Missing const — rebuilt on every parent rebuild
TaskCard(task: myTask)

Rules:

  • Every StatelessWidget that has no mutable state must have a const constructor
  • Pass const keyword at the call site, not just the definition
  • Lint rule prefer_const_constructors must be enabled in analysis_options.yaml

Widget Decomposition

Large build methods are the primary source of performance problems and unmaintainable UI code.

Read the full file on GitHub · 875 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago Changed · -3 lines · +24 tokens per session 391ced925b2d
  2. 1mo ago First seen · 878 lines · 22 tokens per session scan A 20232036213b

Subscribe to this mod's changes

flutter-idioms is a skill published in the GitHub repository irahardianto/awesome-agv (156 stars, last pushed 13d ago), licensed MIT. It adds 46 tokens to every session and 6,565 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

android-finance-spec

Use when generating, reviewing, or refactoring Android Kotlin code for financial apps that require BigDecimal/String precision, RTL/i18n safety, Kotlin style discipline, and "do not reinvent existing project patterns" constraints.

brycegao/android-finance-spec · 48 tokens

common-store-changelog

Generate user-facing release notes for the App Store and Google Play from git history (App Store <=4000 chars, Google Play <=500). Use when generating release notes, app store changelog, play store release, or "what's new" text for a mobile app.

HoangNguyen0403/agent-skills-standard · 60 tokens

android-navigation-3

Install and migrate to Jetpack Navigation 3. Use when implementing Navigation 3 patterns including NavDisplay, NavKey routes, deep links, multiple backstacks, scenes (dialogs, bottom sheets), or migrating from Navigation 2.

HoangNguyen0403/agent-skills-standard · 52 tokens

flutter-auto-route-navigation

Implement typed routing, nested routes, and auth guards using autoroute in Flutter. Use when the task explicitly uses autoroute or its generated router; defer generic deep-link setup and other routing libraries.

HoangNguyen0403/agent-skills-standard · 44 tokens

flutter-dependency-injection

Configure service locator setup using injectable and getit in Flutter. Use when wiring dependency injection with getit or injectable.

HoangNguyen0403/agent-skills-standard · 29 tokens

flutter-getx-state-management

Implement reactive state with GetX controllers, bindings, and observables in Flutter. Use when managing app state with GetxController, Obx, GetBuilder, or dependency lifecycle—not unit tests for existing controllers.

HoangNguyen0403/agent-skills-standard · 48 tokens