ui-states-and-feedback

ui-states-and-feedback is a skill for Claude Code from zakariaf/Flutter-Skills. It costs 212 tokens per session (3,699 once invoked), scanned A, original, MIT.

A screen-state pattern for showing loading, empty, error, and content views in a Flutter app.

In plain words
What is it for?
Use it to design state-driven screens, delayed skeleton loading, refresh behavior, error messages, empty results, and accessible feedback.
Why use it?
It prevents conflicting state flags and ensures that failures, no data, delayed loading, and refreshes are handled visibly and consistently.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the flutter plugin — 40 skills shipped together

Good fit Use it to design state-driven screens, delayed skeleton loading, refresh behavior, error messages, empty results, and accessible feedback.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/zakariaf/flutter-skills/ui-states-and-feedback
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 zakariaf/Flutter-Skills --skill ui-states-and-feedback
Clone the repo
git clone --depth 1 https://github.com/zakariaf/Flutter-Skills

Made for: Claude Code.

Or install flutter, the plugin that ships this one along with the rest of its 40 skills.

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 ui-states-and-feedback

README.md
[![agentmods](https://agentmods.dev/badge/skills/zakariaf/flutter-skills/ui-states-and-feedback/github.svg)](https://agentmods.dev/skills/zakariaf/flutter-skills/ui-states-and-feedback)
Your own site
<a href="https://agentmods.dev/skills/zakariaf/flutter-skills/ui-states-and-feedback"><img src="https://agentmods.dev/badge/skills/zakariaf/flutter-skills/ui-states-and-feedback/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 ui-states-and-feedback

Your own site · 80×15
<a href="https://agentmods.dev/skills/zakariaf/flutter-skills/ui-states-and-feedback"><img src="https://agentmods.dev/badge/skills/zakariaf/flutter-skills/ui-states-and-feedback.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 212 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,699 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.00212 $0.03699
Opus 5 $0.00106 $0.01850
Sonnet 5 $0.00042 $0.00740
Haiku 4.5 $0.00021 $0.00370

Measured 11d ago against content hash 2f5b60f39426, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

ui-states-and-feedback 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 11d 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.

skills/ui-states-and-feedback/SKILL.md · 271 lines

How it starts

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

UI states and feedback

Most of a screen's code is the happy path; most of its defects are not. This skill governs everything a screen shows when there is no data yet, no data at all, no data matching the filter, a failure, or a write that just returned — and which surface each of those is allowed to use. The first-frame/cold-start path belongs to app-startup-and-bootstrap; the error values belong to error-handling-typed-results. This skill is only about how they are rendered and announced.

Non-negotiable rules

  1. One state, resolved in one place. A screen renders exactly one of loading / empty / error / content, chosen by a single switch over an AsyncValue or a sealed view state. Never a triple of isLoading, error, items booleans. WHY: separate flags make impossible states representable — loading and error, empty and loading — and every such combination eventually renders.
  2. The ViewModel decides the state; the View renders it. No FutureBuilder or StreamBuilder wrapped around a repository call in the middle of a widget tree. WHY: state scattered across the tree cannot be tested without pumping widgets, and rebuilds re-fire the future. See state-management-riverpod, widget-composition.
  3. Empty, filtered-empty, and error are three different screens. "You haven't added anything yet" (offer the primary action), "Nothing matches this filter" (offer to clear it), and "We couldn't load this" (offer retry) answer three different user questions. WHY: showing "no items" for a failed load teaches the user their data is gone.
  4. Never render an exception. No e.toString(), no stack trace, no failure class name in the UI. Map the typed Failure.code to a localized message via ARB. WHY: a raw exception is untranslatable, unactionable, and often leaks paths or ids.
  5. Every error state offers a next action. Retry (ref.invalidate(provider)), go back, or change the input — and retry must preserve scroll position, filters, and entered text. WHY: a dead-end error screen turns a transient failure into an uninstall.
  6. A refresh never blanks the screen. While reloading, keep the previous content and show a subtle indicator (AsyncValue.when's skipLoadingOnRefresh default, or valueOrNull + isRefreshing). WHY: replacing a list with a spinner loses the user's place and reads as data loss.
  7. Loading is a delayed skeleton shaped like the result — not a centered spinner. Suppress it for roughly the first 150–300 ms so a fast load does not flash, and match the final layout so nothing jumps when content arrives. WHY: a flash and a reflow are two separate perceived defects; both are free to avoid. (Every duration in this skill is a behavioral threshold, not a value to hardcode — the numbers themselves belong to the duration tokens in design-system-structure.)
  8. An in-flight action shows progress on its own control, not over the app. Disable the button, show progress in it, keep the rest interactive. A full-screen modal barrier is earned only when continuing would corrupt state. WHY: a blocking barrier over a 200 ms write is the most common self-inflicted "the app froze".
  9. Pick the surface by the ladder: inline < snackbar < banner < dialog. Take the lowest one that works (table below). A modal is earned only by a decision that must resolve before the user can continue. WHY: every step up the ladder takes control away from the user, and dialogs are the only one that also blocks.
  10. Information the user must act on never lives only in a snackbar. It auto-dismisses, it can be missed entirely, and a screen reader may never reach it. Use a banner or an inline state for anything that still matters in ten seconds.
  11. Prefer soft delete + Undo over a confirmation dialog. Confirm only what is genuinely irreversible, and then name the consequence ("Delete 12 notes permanently") rather than asking "Are you sure?", with barrierDismissible: false. WHY: Undo is faster for the 99% who meant it and safer for the 1% who did not. See error-handling-typed-results for the soft-delete write path.
  12. showDialog/showModalBottomSheet return Future<T?>null means dismissed, and it is its own outcome. Switch over a sealed result and handle dismissal explicitly; never ?? true. WHY: ?? true silently converts a tap outside the dialog into a confirmed deletion.
  13. Capture ScaffoldMessenger/Navigator before the await, guard mounted after. Then show the snackbar. WHY: the BuildContext may be gone when the write returns — this is the exact use_build_context_synchronously hole (async-safety).
  14. Announce what only the eye can see. A result that appears (saved, deleted, retried, filtered) is announced with liveRegion: true or SemanticsService.announce, and auto-dismissal is lengthened or removed when MediaQuery.accessibleNavigationOf(context) is true. WHY: a 4-second snackbar is invisible to a screen-reader user mid-sentence. Announcements are best-effort per platform — never the only channel for something important.

Read the full file on GitHub · 271 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. 11d ago First seen · 271 lines · 212 tokens per session scan A 2f5b60f39426

Subscribe to this mod's changes

ui-states-and-feedback is a skill published in the GitHub repository zakariaf/Flutter-Skills (2 stars, last pushed 13d ago), licensed MIT. It adds 212 tokens to every session and 3,699 once invoked, about $0.0011 per session on Opus 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-31.

Related

Other skills, from other repositories

animations

Best practices for Flutter animations using the built-in animation framework, covering implicit animations, explicit AnimationController animations, page transitions, and Material 3 motion tokens. Use when creating, modifying, or reviewing animations, transitions, motion, or animated widgets, and also for custom route…

VeryGoodOpenSource/vgv-ai-flutter-plugin · 105 tokens

android-compose-migration

Migrate an Android XML View to Jetpack Compose following a structured 10-step workflow. Use when converting XML layouts to Compose, setting up Compose in an existing View-based project, or incrementally adopting Compose.

HoangNguyen0403/agent-skills-standard · 47 tokens

android-compose

Build high-performance declarative UI with Jetpack Compose. Use when writing Composable functions, optimizing recomposition, hoisting state, or working with LazyColumn and side effects; defer deep-link and navigation routing to android-navigation.

HoangNguyen0403/agent-skills-standard · 48 tokens

flutter-navigation

Implement navigation patterns with gorouter, deep linking, and named routes in Flutter. Use when building navigation, deep linking, or routing.

HoangNguyen0403/agent-skills-standard · 30 tokens

android-xml-views

Implement ViewBinding, RecyclerView, and XML layouts correctly on Android. Use when changing XML view binding or RecyclerView behavior, including its item animations and layout managers; defer standalone animation or layout-manager questions unrelated to RecyclerView.

HoangNguyen0403/agent-skills-standard · 51 tokens

maptiler

Expert coding skill for the full MapTiler platform — Cloud REST APIs, MapTiler SDK JS (built on MapLibre GL JS), native mobile SDKs, on-premise infrastructure, and vector tile schemas. USE WHEN the user wants to add a map to a web or mobile app, show locations or routes, display geographic data, build a store locator…

maptiler/maptiler-skills · 294 tokens