using-flutter-hooks

using-flutter-hooks is a skill for Claude Code, Codex from Poorgramer-Zack/dart-expert-skills. It costs 140 tokens per session (1,905 once invoked), scanned A, original, MIT.

A guide to Flutter Hooks, tools that manage local screen state and side effects with less StatefulWidget code. Side effects are actions such as starting an animation, tracking focus, or attaching a controller.

In plain words
What is it for?
Use it for local UI state, controllers, animations, focus tracking, countdowns, and reusable widget logic.
Why use it?
It reduces repeated widget setup and makes UI behavior easier to reuse across screens, while leaving shared business data to other state-management tools.

Skill for Claude CodeCodex

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

Good fit Use it for local UI state, controllers, animations, focus tracking, countdowns, and reusable widget logic.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/poorgramer-zack/dart-expert-skills/flutter-hooks
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 Poorgramer-Zack/dart-expert-skills --skill flutter-hooks
Clone the repo
git clone --depth 1 https://github.com/Poorgramer-Zack/dart-expert-skills

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 using-flutter-hooks

README.md
[![agentmods](https://agentmods.dev/badge/skills/poorgramer-zack/dart-expert-skills/flutter-hooks/github.svg)](https://agentmods.dev/skills/poorgramer-zack/dart-expert-skills/flutter-hooks)
Your own site
<a href="https://agentmods.dev/skills/poorgramer-zack/dart-expert-skills/flutter-hooks"><img src="https://agentmods.dev/badge/skills/poorgramer-zack/dart-expert-skills/flutter-hooks/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 using-flutter-hooks

Your own site · 80×15
<a href="https://agentmods.dev/skills/poorgramer-zack/dart-expert-skills/flutter-hooks"><img src="https://agentmods.dev/badge/skills/poorgramer-zack/dart-expert-skills/flutter-hooks.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 140 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,905 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.00140 $0.01905
Opus 5 $0.00070 $0.00953
Sonnet 5 $0.00028 $0.00381
Haiku 4.5 $0.00014 $0.00191

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

Security

Grade A, and why

using-flutter-hooks 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/flutter-hooks/SKILL.md · 159 lines

How it starts

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

Flutter Hooks Latest Version Best Practices Guide (v0.21.x)

Goal

flutter_hooks is a package developed by Remi Rousselet (author of Riverpod and Freezed). Its core philosophy stems from React Hooks. The current latest version is 0.21.3+1.

Hooks primarily exist to solve the verbose boilerplate code brought about by StatefulWidget, and the extreme difficulty of reusing UI Logic across Widgets.

Instructions

1. Core Concept: What are Hooks?

Hooks are tools used to manage "local and ephemeral UI state or side effects".

  • Not Suitable For: Global business logic management (this should be handed over to Riverpod or Bloc).
  • Suitable For: Any Widget attaching a Controller, animation management, focus tracking, or countdown timers.
Dependency Installation
dependencies:
  flutter_hooks: ^0.21.3
  hooks_riverpod: ^3.3.0 # If you are simultaneously using Riverpod

2. Widget Declaration: Replacing StatefulWidget

To use Hooks, your Widget cannot inherit from a standard StatelessWidget or StatefulWidget; it must instead inherit from HookWidget. (If you are mixing it with Riverpod, inherit from HookConsumerWidget instead).

All Hooks are only allowed to be called at the top level inside the build method. Writing them inside if statements is strictly prohibited.

3. Built-in Hooks Overview and Best Practices

flutter_hooks provides a massive number of practical built-in Hooks. Leveraging them effectively can save hundreds of lines of dispose() and initState().

3.1 State and Caching (State & Caching)
  • useState(initialData):
    • Purpose: Manages the simplest local state (essentially wraps ValueNotifier).
    • Usage: final counter = useState(0); counter.value++;
  • useMemoized(compute, [keys]):
    • Purpose: Caches the result of an expensive computation, or ensures an object (e.g., a custom class) is instantiated only once during Rebuilds.
    • Usage: final complexObj = useMemoized(() => HeavyObject(), []);
  • useCallback(callback, [keys]):
    • Purpose: Caches a function reference. If passed to deep Widgets, it prevents triggering unnecessary refreshes because parent Rebuilds generate a new function memory location.
  • useRef(initialValue):
    • Purpose: Holds a mutable object across Rebuild cycles, and changing its value does not trigger a UI refresh (unlike useState). Perfect for storing the width of a previous screen, or a Timer instance for subsequent clearing.

Read the full file on GitHub · 159 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. 11d ago First seen · 159 lines · 140 tokens per session scan A 1fa9299f0105

Subscribe to this mod's changes

using-flutter-hooks is a skill published in the GitHub repository Poorgramer-Zack/dart-expert-skills (7 stars, last pushed 1mo ago), licensed MIT. It adds 140 tokens to every session and 1,905 once invoked, about $0.0007 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.