riverpod
Skill by evanca
Riverpod is a skill that sets out how to use Riverpod for state management in Flutter and Dart apps. It covers provider setup, ref usage, disposal, side effects and testing. It is aimed at Flutter and Dart developers.
Install riverpod
Built from the published package, never by AI.
git clone --depth 1 https://github.com/evanca/flutter-ai-rules /tmp/flutter-ai-rules && mkdir -p ~/.claude/skills && cp -r /tmp/flutter-ai-rules/skills/riverpod ~/.claude/skills/riverpodRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/evanca/flutter-ai-rules /tmp/flutter-ai-rules && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/flutter-ai-rules/skills/riverpod ~/.gemini/antigravity-cli/skills/riverpodAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill is a set of guidelines for using Riverpod, a state management library for Flutter and Dart applications. It explains how to wrap an app in ProviderScope, define providers with code generation, and choose between ref.watch, ref.read, ref.listen and ref.onDispose. It also covers combining providers, passing arguments through families, and controlling state disposal with autoDispose and keepAlive.
The skill also describes eager initialization, performing side effects from Notifier methods, and using provider observers. For testing, it shows how to create a ProviderContainer or ProviderScope per test and inject fakes with overrides. It is written for Flutter and Dart developers who use Riverpod in their projects.
Written from the project's SKILL.md and checked against it.
What it can do
- App setupShows how to wrap the app in ProviderScope directly in runApp.
- Defining providersCovers functional, FutureProvider and Notifier providers using code generation.
- Using refExplains when to use ref.watch, ref.read, ref.listen and ref.onDispose.
- Combining providersShows how to await an async provider's value with ref.watch on its future.
- Passing argumentsDescribes families for parameterized providers and equality rules for parameters.
- State disposalExplains autoDispose, keepAlive, ref.invalidate and ref.refresh behavior.
- Eager initializationShows how to force a provider to initialize early under ProviderScope.
- Side effectsShows how Notifier methods update state with AsyncValue.guard.
- Provider observersShows a ProviderObserver that logs updates and reports failures.
- Testing providersShows unit and widget tests using ProviderContainer and overrides.
What you need
- Flutter
- Dart
Try asking
- Set up a Riverpod ProviderScope in my Flutter app
- Write a Riverpod Notifier that adds a todo with loading and error states
- Show me how to test a Riverpod provider with a fake repository
Good to know
- Examples use code generation with the @riverpod annotation.
- The skill focuses on Riverpod guidance and does not provide a runnable package.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/riverpod/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md7 KB
Alternatives to riverpod
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
riverpod: common questions
What does the Riverpod skill cover?
It covers setting up providers, using ref, combining providers, passing arguments, managing disposal, performing side effects and testing. It is written for Flutter and Dart apps.
How does Riverpod handle state disposal in this skill?
With code generation, state is destroyed by default when no longer listened to, and keepAlive opts out. Without code generation, state is kept alive by default unless autoDispose is used.
How should I test providers with Riverpod?
The skill advises creating a new ProviderContainer or ProviderScope for each test and using overrides to inject fakes. It recommends mocking repositories rather than Notifiers.
How do I install riverpod?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is riverpod free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is riverpod safe to use?
It scores 82 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to riverpod?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
