State management (Riverpod) Agent Skill

Enforces feature state as one Notifier/AsyncNotifier/StreamNotifier ViewModel over an immutable state value with value equality, private…

Context cost
7.7k tokensestimated from the bundle, loaded when it triggers
Bundle
5 files · 33.6 kB1 script among them — read before you run
Licence
MITthe author’s own terms
Last change
—no release on file
Servers it uses
Noneruns standalone

What it does

Enforces feature state as one Notifier/AsyncNotifier/StreamNotifier ViewModel over an immutable state value with value equality, private mutable state mutated only through intent methods, derive-don't-store, a single write path through a repository, and unidirectional data flow; Riverpod 3.x is DI (providers-as-collaborators, ProviderScope overrides per flavor, throwing seams), reads split ref.watch/.select for display vs ref.read(p.notifier) in callbacks vs ref.listen for side effects, async modeled as AsyncValue, per-entity state family-keyed + autoDispose, and stale-closure captures /…

What this skill changes about the agent has not been set out here as a list. Its SKILL.md, shown below, says it in the author’s own words.

mobile

The skill itself

A skill is instructions the model reads, so you can see what you are getting: below is the start of its SKILL.md. The front matter loads with every session, the body loads when the skill triggers, and the whole file comes with the install.

SKILL.md17.2 kB · preview
--- name: state-management-riverpod ---
6# State management (Riverpod)
7
8State and dependency injection are one mechanism: Riverpod 3.x. Each feature has one Notifier/AsyncNotifier/StreamNotifier ViewModel that exposes an **immutable** state value; dumb ConsumerWidgets read it. Widgets hold only ephemeral UI state; every durable mutation routes through one repository (the single write path). This skill covers the state-agnostic core first, then the Riverpod "how", then a Provider/ChangeNotifier appendix for the official Flutter-guide stack.
9
10Read the reference for the task at hand:
11
12- references/ownership-and-lifecycle.md — the ownership table (which provider shape), family/autoDispose/onDispose rules, composition-root DI.
13- references/reads-and-side-effects.md — watch vs read vs listen vs select, the stale-closure hole, void action methods, ref.mounted/BuildContext guards.
14- references/riverpod3-api-and-testing.md — Riverpod 3.x API shifts (legacy moves, overrideWithValue, retry, ProviderContainer.test), what 2023 tutorials get wrong, and testing seams.
15
16Run scripts/ban-legacy-providers.sh before a PR.
17
18## Non-negotiable rules
19
20These hold regardless of the state library.
21
221. **One ViewModel per feature over one immutable state value.** The state is a value type with value equality (freezed/sealed + copyWith), never a mutable field bag. Cross-feature/shared state lives in a repository, not a ViewModel — two ViewModels owning the same fact is two facts that will disagree.
232. **State is private; mutate only through intent methods.** No widget reaches into the state to poke a field. A view calls notifier.rename(id, name); it never sets state. This is the one door through which state changes, so every change is reviewable in one place.
243. **Every transition assigns a *new* value.** Value-equality listeners diff by value — a mutated-in-place instance reassigned to the same reference is missed and the UI silently stales. Always copyWith into a new instance.
This is a preview of SKILL.md. Download or install the skill to get the whole thing.
In the file
SKILL.md2,210 words
Files5
LicenceMIT
Why you can read it

Nothing in a skill executes. The client loads the text and the model follows it, so a skill can be audited the way a runbook is — by reading it.

What it costs in context

Skills are not billed by the call. They are paid for in context: every token the instructions occupy is a token your code, your diff and your conversation cannot use. Here is what this one takes and when it takes it.

≈240
always loaded
The name and description, so the model knows the skill exists and when to reach for it.
7,435
on trigger
The instruction body and 4 supporting files, read only when the skill fires.
3.8%
of a 200k window
Ten skills this size would take about 38% of the window before you open a file.
050k100k150k200k context window

7.7k tokens, estimated from the bundle at four bytes to the token, held for the rest of the session once it triggers. Heavy. Teams tend to install this one per project rather than globally, and load it only when the job comes up.

Servers bill, skills cost

A server charges by the month. A skill charges once per session, in context, and then keeps charging it for as long as the session lives.

Before and after

The same question, put to the same model twice: once as it comes, and once with these instructions loaded.

No worked example has been published for this skill yet.

The procedure it runs

The procedure has not been set out here step by step. It is in the body of its SKILL.md: the start of it is shown above, and the whole file comes with the install.

Prose, not code

These steps are written for a model to follow, not executed by a runtime. It can still be told to skip one, and it will say so when it does.

Servers it uses

None. This skill calls no MCP servers at all.

Everything it needs is in the instructions, so it works in a project with nothing connected — the model reads the file and changes how it works with what it can already reach.

Its SKILL.md does not declare which tools it asks the agent for, so what it touches is whatever the instructions themselves ask for — read them before you install it.

What it asks for
Writes filesnot declared
Network accessnot declared

This SKILL.md carries no allowed-tools line, so neither is declared. A skill grants no permissions of its own — it can only ask for tools your client already has.

What it will not do

Every skill is narrow, and the useful ones say where they stop. These are the jobs this one is the wrong tool for.

What this skill is not for has not been published here. Nothing is implied by that: it is a section the author has not filled in.

What is in the bundle

5 files, 33.6 kB on disk. Mostly text — the instructions the model reads — with 1 script in it that your client would run only if the instructions tell it to. 2 files of its source are not in the download — listed after these, with why.

  • SKILL.md17.2 kB
  • references/ownership-and-lifecycle.md4.7 kB
  • references/reads-and-side-effects.md4.3 kB
  • references/riverpod3-api-and-testing.md4.5 kB
  • scripts/ban-legacy-providers.sh2.9 kB

Not in the download

Not carried is a type a skill download does not hold. Take them from its source.

  • examples/composition_root.dartnot carried
  • examples/task_list_feature.dartnot carried
What is not in it

A skill installs nothing and depends on nothing: it is a folder your client reads. This one carries 1 script beside the text, so the download is 5 files — not the whole of its source: 2 files are left out. They are listed under the files, with why. The MIT licence covers the templates and examples as well as the instructions.

Install

Installing copies the bundle into your project. Nothing runs at install time — the files sit on disk until the model reads them.

# State management (Riverpod) · 7.7k tokens when loaded · macOS, Linux mkdir -p .claude/skills && t=$(mktemp -d) && curl -fsSL -o "$t/bundle.tar.gz" https://mcprush.com/api/skills/state-management-riverpod/bundle.tar.gz && tar -xzf "$t/bundle.tar.gz" -C "$t" && [ -d "$t/state-management-riverpod" ] && { [ ! -e .claude/skills/state-management-riverpod ] || { mv .claude/skills/state-management-riverpod "$t/.previous" && echo "Previous copy moved to $t/.previous"; }; } && mv "$t/state-management-riverpod" .claude/skills/ && echo "Installed .claude/skills/state-management-riverpod"
On Windows, or any OS with Node 20+
npx mcprush@latest skill add zakariaf/state-management-riverpod

Windows PowerShell says 'running scripts is disabled on this system'? Run Set-ExecutionPolicy -Scope CurrentUser RemoteSigned once, or type npx.cmd instead of npx (codex.cmd, gemini.cmd, grok.cmd likewise). PowerShell 7 needs neither. Writes to .claude/skills/state-management-riverpod/ in the current project. For every project instead, run mkdir -p ~/.claude/skills && t=$(mktemp -d) && curl -fsSL -o "$t/bundle.tar.gz" https://mcprush.com/api/skills/state-management-riverpod/bundle.tar.gz && tar -xzf "$t/bundle.tar.gz" -C "$t" && [ -d "$t/state-management-riverpod" ] && { [ ! -e ~/.claude/skills/state-management-riverpod ] || { mv ~/.claude/skills/state-management-riverpod "$t/.previous" && echo "Previous copy moved to $t/.previous"; }; } && mv "$t/state-management-riverpod" ~/.claude/skills/ && echo "Installed ~/.claude/skills/state-management-riverpod" (macOS, Linux) — or add --global to the npx line. The curl line replaces .claude/skills/state-management-riverpod/ only after the download succeeds, so files left there by another skill of the same name, or by an older release, do not mix in. A copy already there is moved aside, not deleted, and the line prints where. Not in this download: 2 files of its source (the full list, and why). Take them from its source.

Which clients pick it up on their own

A skill is a folder of text. Most of these read a skills folder and pick it up without being told; the rest take the same folder another way — an upload in the app, a parameter on an API call — and then choose it by its description just the same.

Claude Code.claude/skills/
Claude DesktopCustomize › Skills
ChatGPTSkills › Create › Upload
Cursor.cursor/skills/
VS Code.github/skills/
Codex CLI.agents/skills/
Gemini CLI.gemini/skills/
Grok Build.grok/skills/
Microsoft CopilotSkills › Upload a skill
PerplexityComputer › Skills › Upload a skill
DeepSeek Harness.dsh/skills/
Zed.agents/skills/
Devin Desktop.devin/skills/
Windsurf (legacy).windsurf/skills/
OpenAI Agents SDKInstructions or sandbox Skills
HTTP / APIa request parameter
This release
Versionnot versioned
Publishedno release date on file
PriceFree
Referencezakariaf/state-management-riverpod

Versions

Its author publishes no version number, so there is nothing here to pin to: what you install is the folder as it stands today. Instructions change more often than APIs do — a skill can be rewritten entirely without anything it depends on moving.

Pinning

Nothing to pin to: this skill carries no version number of its own. What you install is what the folder holds on the day you install it.

Reviews

—no reviews yet

Nobody has reviewed this skill yet. The rating is the mean of the reviews written here, so there is none until somebody writes the first.

Sign in to review it

A review is tied to an account so it can be answered, edited and taken down by the person who wrote it.

Sign in
Who can post

Anybody with an account, one review each. It carries the version that was current when you wrote it, and the publisher may reply once.

Publisher
Servers0
Claim this skill