riverpod-patterns

Enforce Riverpod ref usage and AsyncValue handling patterns in Flutter code.

34|21|Updated Feb 1, 2026
One-click install
npx skills add https://github.com/kumaran-is/claude-code-onboarding --skill riverpod-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: riverpod-patterns
Source: https://github.com/kumaran-is/claude-code-onboarding/tree/main/.claude/skills/riverpod-patterns
Command: npx skills add https://github.com/kumaran-is/claude-code-onboarding --skill riverpod-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Flutter developers often struggle with applying Riverpod patterns correctly, leading to improper ref usage, inconsistent AsyncValue handling, and fragile lifecycle management.

Core Features & Use Cases

  • AsyncNotifier pattern guidance and best practices
  • Correct ref usage rules (watch in build, read in callbacks)
  • Lifecycle best practices and common anti-patterns
  • Use cases: scaffolding new Riverpod providers, reviewing existing code, onboarding teammates

Quick Start

Audit a Flutter project and apply Riverpod best practices to improve state management.

Frequently Asked Questions about riverpod-patterns

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use ref correctly in Riverpod providers?

Correct ref usage in Riverpod requires calling ref.watch inside the build method and ref.read inside event callbacks to prevent unnecessary rebuilds. This pattern ensures your providers maintain optimal lifecycle behavior.

What is the best way to handle AsyncValue in Flutter?

AsyncValue handling in Flutter requires exhaustive checking for loading, data, and error states. Using AsyncNotifier patterns ensures you manage asynchronous operations robustly without creating fragile state management logic.

How to scaffold new Riverpod providers for Flutter applications?

Scaffolding new Riverpod providers involves applying AsyncNotifier patterns and lifecycle best practices. Following these provider patterns during onboarding or refactoring ensures your Flutter state management remains robust.

What are common Riverpod anti-patterns during code reviews?

Common Riverpod anti-patterns include improper ref usage, inconsistent AsyncValue handling, and fragile lifecycle management. Code reviews should enforce correct watch and read rules to avoid these frequent Flutter state management mistakes.

Does Riverpod linting help enforce provider patterns?

Riverpod linting helps enforce provider patterns by catching improper ref usage and inconsistent AsyncValue handling. Applying these linting rules during code reviews prevents fragile lifecycle management in Flutter applications.

When should I use AsyncNotifier over basic providers in Flutter?

Use AsyncNotifier in Flutter when your providers need exhaustive AsyncValue handling for loading, data, and error states. This pattern provides robust lifecycle management compared to basic providers for asynchronous operations.