flutter-state-management

flutter-state-management is a skill for Claude Code, Codex from makifbaysal/tasktrooper. It costs 59 tokens per session (1,009 once invoked), scanned A, original, Apache-2.0.

A Flutter state-management guide for keeping screen data and business rules outside visual widgets. State management is the way an app stores changing data and tells screens when to update.

In plain words
What is it for?
Use it when a Flutter screen loads data, responds to events, or shares state. It covers controllers and notifiers, loading/data/empty/error states, immutable state, and following the repository's existing approach.
Why use it?
It prevents duplicated state, tangled network logic, and screens that only handle the successful response. It also addresses cleanup of controllers and subscriptions to avoid leaks.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when a Flutter screen loads data, responds to events, or shares state. It covers controllers and notifiers, loading/data/empty/error states, immutable state, and following the repository's existing approach.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/makifbaysal/tasktrooper/flutter-state-management
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 makifbaysal/tasktrooper --skill flutter-state-management
Clone the repo
git clone --depth 1 https://github.com/makifbaysal/tasktrooper

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-state-management

README.md
[![agentmods](https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/flutter-state-management/github.svg)](https://agentmods.dev/skills/makifbaysal/tasktrooper/flutter-state-management)
Your own site
<a href="https://agentmods.dev/skills/makifbaysal/tasktrooper/flutter-state-management"><img src="https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/flutter-state-management/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-state-management

Your own site · 80×15
<a href="https://agentmods.dev/skills/makifbaysal/tasktrooper/flutter-state-management"><img src="https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/flutter-state-management.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,009 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.
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.00059 $0.01009
Opus 5.5 $0.00024 $0.00404
Sonnet 5.5 $0.00012 $0.00202
Haiku 4.5 $0.00006 $0.00101

Measured 8d ago against content hash 95dfbd209b5e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

flutter-state-management 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 8d 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.

catalog/agents/mobile-developer/skills/flutter-state-management/SKILL.md · 99 lines

How it starts

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

Flutter State Management

Overview

Widgets render state; something else owns it. Keeping business logic and data out of the widget tree is what makes Flutter screens testable and rebuilds cheap.

Core principle: Follow the app's existing state solution (Riverpod, Bloc, Provider, etc.) — do not introduce a second one. The pattern matters more than the library.

Rules (library-agnostic)

  • One source of truth per piece of state, owned by a controller/notifier/bloc — never duplicated across widgets via setState.
  • Presentation ↔ state via a thin interface: the widget watches state and sends events/intents; it never contains the business rule or the network call.
  • StatefulWidget is for ephemeral UI only (animation controllers, focus, scroll) — anything that outlives a rebuild or comes from a service is app state.
  • Handle all async states explicitly: loading, data, empty, error. A FutureBuilder/AsyncValue that only renders the happy path ships a spinner-forever bug.
  • Dispose controllers/subscriptions to avoid leaks.
  • Immutable state objects (copyWith) so rebuilds are diff-friendly and predictable.

Worked Example — Riverpod 3 (Notifier/AsyncNotifier, not StateNotifier)

StateNotifier/StateNotifierProvider/StateProvider/ChangeNotifierProvider are legacy as of Riverpod 3 — use Notifier/AsyncNotifier in new code. If the repo still uses StateNotifier, follow it; don't migrate existing code on your own initiative.

// state owner: no widgets, pure logic — unit-testable without pumping a widget
class TaskListNotifier extends AsyncNotifier<List<Task>> {
  @override
  Future<List<Task>> build() => ref.read(taskRepositoryProvider).list();

  Future<void> reload() async {
    state = const AsyncLoading();
    state = await AsyncValue.guard(() => ref.read(taskRepositoryProvider).list());
  }
}

final taskListProvider = AsyncNotifierProvider<TaskListNotifier, List<Task>>(TaskListNotifier.new);

// widget: watches state, renders each case, sends intents — no logic
ref.watch(taskListProvider).when(
  loading: () => const AppSpinner(),
  error:   (e, _) => AppErrorView(message: e.toString(), onRetry: () => ref.read(taskListProvider.notifier).reload()),
  data:    (tasks) => tasks.isEmpty ? const EmptyView() : TaskList(tasks: tasks),
);

Read the full file on GitHub · 99 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. 8d ago First seen · 99 lines · 59 tokens per session scan A 95dfbd209b5e

Subscribe to this mod's changes

flutter-state-management is a skill published in the GitHub repository makifbaysal/tasktrooper (113 stars, last pushed yesterday), licensed Apache-2.0. It adds 59 tokens to every session and 1,009 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-10-05.

Related

Other skills, from other repositories

architecture-design

Use this skill to design system architecture with documented trade-offs and decisions before any implementation begins. Activates when a feature, system, or component requires non-trivial structural decisions about how components interact, what data stores to use, or how to decompose a problem.

karthikrshet/aiskills · 60 tokens

repository-discovery

Use this skill to systematically explore an unfamiliar codebase before making any changes. Activates when starting work in an unknown repository, adding a new feature, debugging without prior context, or when no CONTEXT.md exists. Produces a grounded understanding of architecture, conventions, and constraints.

karthikrshet/aiskills · 61 tokens

rapid-prototyping

Use this skill to build disposable, rapid proof-of-concept prototypes and spikes to test feasibility, validate API designs, or explore library capabilities before committing to a full production architecture.

karthikrshet/aiskills · 45 tokens

ramp

Fetch and follow Ramp's published agent playbooks inside Paperclip, with mandatory approval gates for spend, incorporation, cards, account setup, and other financial actions.

paperclipai/paperclip · 35 tokens

github-pr-workflow

Prepare a GitHub pull request from a feature branch — branch hygiene, commit shape, title/body, verification notes, screenshots for UI work, and replies to review comments.

paperclipai/paperclip · 39 tokens

paperclip-task-bridge

Create, comment on, update, and list Paperclip tasks from Hermes using scoped Paperclip API credentials.

paperclipai/paperclip · 27 tokens