{
  "skill_name": "flutter-riverpod-state-management",
  "evals": [
    {
      "id": 1,
      "prompt": "Create a Riverpod provider that fetches products from a repository.",
      "expected_output": "Use @riverpod annotation on an AsyncNotifier. The build() method calls the repository. UI uses ref.watch() with AsyncValue.when() for data/loading/error states.",
      "assertions": [
        { "type": "contains", "value": "@riverpod" },
        { "type": "contains", "value": "AsyncNotifier" }
      ]
    },
    {
      "id": 2,
      "prompt": "How do I trigger a navigation side effect when a provider's state changes in Riverpod?",
      "expected_output": "Use ref.listen() inside the widget's build() method (ConsumerWidget). Never put side-effects in provider init. Use ref.read() only in callbacks like onPressed.",
      "assertions": [
        { "type": "contains", "value": "ref.listen" },
        { "type": "contains", "value": "ConsumerWidget" }
      ]
    },
    {
      "id": 3,
      "prompt": "How do I override a Riverpod provider in tests?",
      "expected_output": "Use ProviderScope with overrides: ProviderScope(overrides: [provider.overrideWithValue(Mock())]). Enable riverpod_lint for cycle detection.",
      "assertions": [
        { "type": "contains", "value": "ProviderScope" },
        { "type": "contains", "value": "overrides" }
      ]
    }
  ],
  "should_not_trigger": [
    "How do I create a BLoC for the cart feature?",
    "Set up GetX state management with observables",
    "Add a loading spinner widget to the product list screen",
    "Write a unit test for the repository layer"
  ]
}
