Use when setting up providers, consuming state, optimizing rebuilds, using ProxyProvider, or migrating from deprecated providers (Provider package).
npx skills add https://github.com/evanca/flutter-ai-rules --skill provider
This skill defines how to correctly use the provider package in Flutter applications.
| Provider | Use for |
|---|---|
| Provider | Exposing any immutable value |
| ChangeNotifierProvider | Mutable state with ChangeNotifier |
| FutureProvider | Exposing a Future result |
| StreamProvider | Exposing a Stream |
| ProxyProvider / ChangeNotifierProxyProvider | Objects that depend on other providers |
MultiProvider(
providers: [
Provider<Something>(create: (_) => Something()),
ChangeNotifierProvider(create: (_) => MyNotifier()),
FutureProvider<String>(create: (_) => fetchData(), initialData: ''),
],
child: MyApp(),
)
MultiProvider to group multiple providers and avoid deeply nested trees.ChangeNotifierProvider automatically disposes the model when it is no longer needed.ProxyProvider instead.StackOverflowError.Always specify the generic type for type safety:
// Listen and rebuild on change — only valid inside build() or a Provider's update method
final count = context.watch<MyModel>().count;
// Access without listening — use in callbacks, not inside build()
context.read<MyModel>().increment();
// Listen to only part of the state
final count = context.select<MyModel, int>((m) => m.count);
Use Consumer<T> or Selector<T, R> widgets when you need fine-grained rebuilds and cannot access a descendant BuildContext:
Consumer<MyModel>(
builder: (context, model, child) => Text('${model.count}'),
child: const ExpensiveWidget(), // rebuilt only once
)
Selector<MyModel, int>(
selector: (_, model) => model.count,
builder: (_, count, __) => Text('$count'),
)
Use ProxyProvider or ChangeNotifierProxyProvider for objects that depend on other providers or values that can change:
MultiProvider(
providers: [
Provider<Auth>(create: (_) => Auth()),
ProxyProvider<Auth, Api>(
update: (_, auth, __) => Api(auth.token),
),
],
)
initState or constructors — use them in build, callbacks, or lifecycle methods where the widget is fully mounted.ChangeNotifier; use Provider.value() with a StatefulWidget if needed.Implement toString or DiagnosticableTreeMixin to improve how your objects appear in Flutter DevTools:
class MyModel with DiagnosticableTreeMixin {
final int count;
MyModel(this.count);
@override
String toString() => 'MyModel(count: $count)';
}
ValueListenableProvider is deprecated. Use Provider with ValueListenableBuilder instead:
ValueListenableBuilder<int>(
valueListenable: myValueListenable,
builder: (context, value, _) {
return Provider<int>.value(
value: value,
child: MyApp(),
);
},
)
Integration with protocols.io API for managing scientific protocols. This skill should be used when working with protocols.io to search, create, update, or publish protocols; manage protocol steps and materials; handle discussions and comments; organize workspaces; upload and manage files; or integrate protocols.io functionality into workflows. Applicable for protocol discovery, collaborative protocol development, experiment tracking, lab protocol management, and scientific documentation.
Analyzes job descriptions and generates tailored resumes that highlight relevant experience, skills, and achievements to maximize interview chances
Generate Excalidraw diagrams from natural language descriptions. Use when asked to "create a diagram", "make a flowchart", "visualize a process", "draw a system architecture", "create a mind map", or "generate an Excalidraw file". Supports flowcharts, relationship diagrams, mind maps, and system architecture diagrams. Outputs .excalidraw JSON files that can be opened directly in Excalidraw.
Build and distribute Expo development clients locally or via TestFlight
Use when you have a written implementation plan to execute in a separate session with review checkpoints
Data structure for annotated matrices in single-cell analysis. Use when working with .h5ad files or integrating with the scverse ecosystem. This is the data format skill—for analysis workflows use scanpy; for probabilistic models use scvi-tools; for population-scale queries use cellxgene-census.
Benchling R&D platform integration. Access registry (DNA, proteins), inventory, ELN entries, workflows via API, build Benchling Apps, query Data Warehouse, for lab data management automation.
Comprehensive molecular biology toolkit. Use for sequence manipulation, file parsing (FASTA/GenBank/PDB), phylogenetics, and programmatic NCBI/PubMed access (Bio.Entrez). Best for batch processing, custom bioinformatics pipelines, BLAST automation. For quick lookups use gget; for multi-service integration use bioservices.
Take evanca/provider from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.