PluginBench
Skill
Pass
Audit score 90

flutter-expert

jeffallan/claude-skills

Senior Flutter engineer for cross-platform apps with Riverpod, Bloc, GoRouter, and performance optimization.

What is flutter-expert?

Expert guidance for building high-performance Flutter 3+ applications with Dart. Use this skill when implementing widgets, state management (Riverpod/Bloc), navigation (GoRouter), platform-specific code, and performance tuning across iOS, Android, web, and desktop.

  • Build reusable, const-optimized widgets and custom animations
  • Implement scalable state management with Riverpod providers or Bloc/Cubit patterns
  • Configure navigation and deep linking with GoRouter
  • Write widget and integration tests with proper coverage
  • Profile and optimize performance using Flutter DevTools
  • Handle platform-specific implementations across iOS, Android, web, and desktop

How to install flutter-expert

npx skills add https://github.com/jeffallan/claude-skills --skill flutter-expert
Prerequisites
  • Flutter 3+ SDK installed
  • Dart 3+ compatible
  • Basic understanding of widget lifecycle and state management concepts
Claude Code
Cursor
Windsurf
Cline

How to use flutter-expert

  1. 1.Run `flutter pub get` to install dependencies after adding the skill
  2. 2.Define state management using Riverpod providers or Bloc classes
  3. 3.Build widgets as ConsumerWidget or ConsumerStatefulWidget, never StatefulWidget with app-wide state
  4. 4.Run `flutter analyze` and fix all lints before proceeding
  5. 5.Write tests with `flutter test` after each feature and verify coverage
  6. 6.Profile with `flutter run --profile` and use DevTools to identify and fix jank
  7. 7.Apply `const` constructors to all static widgets and use proper keys for lists

Use cases

Good for
  • Scaffolding a new Flutter project with routing, state management, and testing structure
  • Refactoring setState-based widgets to use Riverpod ConsumerWidgets for better performance
  • Debugging jank and frame drops by profiling with DevTools and applying const optimization
  • Implementing complex navigation flows with GoRouter and deep linking support
  • Building custom widgets with proper key management and rebuild optimization
Who it's for
  • Mobile engineers building cross-platform applications
  • Flutter developers optimizing performance and architecture
  • Teams adopting Riverpod or Bloc for state management
  • Developers implementing platform-specific native integrations

flutter-expert FAQ

When should I use Riverpod vs Bloc?

Use Riverpod for simpler, functional state management with providers and notifiers. Use Bloc for event-driven, complex business logic with explicit event/state separation. Both work; choose based on team preference and complexity.

Why does hot reload not reflect my state changes?

State held in StateNotifier persists across hot reloads. Use hot restart (R in terminal) to fully reset app state and reload all code.

How do I fix jank and dropped frames?

Profile with `flutter run --profile` and DevTools. Check rebuild counts in the Performance overlay, isolate expensive `build()` calls, apply `const` constructors, use `RepaintBoundary`, and move heavy work to `compute()`.

Should I use StatefulWidget for app-wide state?

No. Use ConsumerWidget with Riverpod or BlocBuilder with Bloc instead. StatefulWidget causes full subtree rebuilds and is only appropriate for local, scoped state like form input.

What's the correct pattern for Riverpod providers?

Define providers at module level, use StateNotifierProvider for mutable state, and consume with ConsumerWidget or ref.watch(). Never mutate state directly—always create new instances in StateNotifier.

Full instructions (SKILL.md)

Source of truth, from jeffallan/claude-skills.


name: flutter-expert description: Use when building cross-platform applications with Flutter 3+ and Dart. Invoke for widget development, Riverpod/Bloc state management, GoRouter navigation, platform-specific implementations, performance optimization. license: MIT metadata: author: https://github.com/Jeffallan version: "1.1.0" domain: frontend triggers: Flutter, Dart, widget, Riverpod, Bloc, GoRouter, cross-platform role: specialist scope: implementation output-format: code related-skills: react-native-expert, test-master, fullstack-guardian

Flutter Expert

Senior mobile engineer building high-performance cross-platform applications with Flutter 3 and Dart.

When to Use This Skill

  • Building cross-platform Flutter applications
  • Implementing state management (Riverpod, Bloc)
  • Setting up navigation with GoRouter
  • Creating custom widgets and animations
  • Optimizing Flutter performance
  • Platform-specific implementations

Core Workflow

  1. Setup — Scaffold project, add dependencies (flutter pub get), configure routing
  2. State — Define Riverpod providers or Bloc/Cubit classes; verify with flutter analyze
    • If flutter analyze reports issues: fix all lints and warnings before proceeding; re-run until clean
  3. Widgets — Build reusable, const-optimized components; run flutter test after each feature
    • If tests fail: inspect widget tree with Flutter DevTools, fix failing assertions, re-run flutter test
  4. Test — Write widget and integration tests; confirm with flutter test --coverage
    • If coverage drops or tests fail: identify untested branches, add targeted tests, re-run before merging
  5. Optimize — Profile with Flutter DevTools (flutter run --profile), eliminate jank, reduce rebuilds
    • If jank persists: check rebuild counts in the Performance overlay, isolate expensive build() calls, apply const or move state closer to consumers

Reference Guide

Load detailed guidance based on context:

TopicReferenceLoad When
Riverpodreferences/riverpod-state.mdState management, providers, notifiers
Blocreferences/bloc-state.mdBloc, Cubit, event-driven state, complex business logic
GoRouterreferences/gorouter-navigation.mdNavigation, routing, deep linking
Widgetsreferences/widget-patterns.mdBuilding UI components, const optimization
Structurereferences/project-structure.mdSetting up project, architecture
Performancereferences/performance.mdOptimization, profiling, jank fixes

Code Examples

Riverpod Provider + ConsumerWidget (correct pattern)

// provider definition
final counterProvider = StateNotifierProvider<CounterNotifier, int>(
  (ref) => CounterNotifier(),
);

class CounterNotifier extends StateNotifier<int> {
  CounterNotifier() : super(0);
  void increment() => state = state + 1; // new instance, never mutate
}

// consuming widget — use ConsumerWidget, not StatefulWidget
class CounterView extends ConsumerWidget {
  const CounterView({super.key});

  @override
  Widget build(BuildContext context, WidgetRef ref) {
    final count = ref.watch(counterProvider);
    return Text('$count');
  }
}

Before / After — State Management

// ❌ WRONG: app-wide state in setState
class _BadCounterState extends State<BadCounter> {
  int _count = 0;
  void _inc() => setState(() => _count++); // causes full subtree rebuild
}

// ✅ CORRECT: scoped Riverpod consumer
class GoodCounter extends ConsumerWidget {
  const GoodCounter({super.key});
  @override
  Widget build(BuildContext context, WidgetRef ref) {
    final count = ref.watch(counterProvider);
    return IconButton(
      onPressed: () => ref.read(counterProvider.notifier).increment(),
      icon: const Icon(Icons.add), // const on static widgets
    );
  }
}

Constraints

MUST DO

  • Use const constructors wherever possible
  • Implement proper keys for lists
  • Use Consumer/ConsumerWidget for state (not StatefulWidget)
  • Follow Material/Cupertino design guidelines
  • Profile with DevTools, fix jank
  • Test widgets with flutter_test

MUST NOT DO

  • Build widgets inside build() method
  • Mutate state directly (always create new instances)
  • Use setState for app-wide state
  • Skip const on static widgets
  • Ignore platform-specific behavior
  • Block UI thread with heavy computation (use compute())

Troubleshooting Common Failures

SymptomLikely CauseRecovery
flutter analyze errorsUnresolved imports, missing const, type mismatchesFix flagged lines; run flutter pub get if imports are missing
Widget test assertion failuresWidget tree mismatch or async state not settledUse tester.pumpAndSettle() after state changes; verify finder selectors
Build fails after adding packageIncompatible dependency versionRun flutter pub upgrade --major-versions; check pub.dev compatibility
Jank / dropped framesExpensive build() calls, uncached widgets, heavy main-thread workUse RepaintBoundary, move heavy work to compute(), add const
Hot reload not reflecting changesState held in StateNotifier not resetUse hot restart (R in terminal) to reset full app state

Output Templates

When implementing Flutter features, provide:

  1. Widget code with proper const usage
  2. Provider/Bloc definitions
  3. Route configuration if needed
  4. Test file structure

Documentation

Related skills

More from jeffallan/claude-skills and the wider catalog.

LA

laravel-specialist

jeffallan/claude-skills

Build Laravel 10+ applications with Eloquent models, Sanctum auth, queues, APIs, and Livewire components.

17k installsAudited
GO

golang-pro

jeffallan/claude-skills

Senior Go developer for concurrent systems, microservices, and production-grade performance optimization.

15k installsAudited
PH

php-pro

jeffallan/claude-skills

Senior PHP developer for modern PHP 8.3+, Laravel, Symfony with strict typing, PHPStan level 9, and enterprise patterns.

12k installsAudited
KU

kubernetes-specialist

jeffallan/claude-skills

Deploy and manage Kubernetes workloads with secure manifests, RBAC, networking, and troubleshooting.

11k installs
DE

devops-engineer

jeffallan/claude-skills

Creates Dockerfiles, configures CI/CD pipelines, writes Kubernetes manifests, and generates Terraform/Pulumi infrastructure templates. Handles deployment automation, GitOps configuration, incident response runbooks, and internal developer platform tooling. Use when setting up CI/CD pipelines, containerizing applications, managing infrastructure as code, deploying to Kubernetes clusters, configuring cloud platforms, automating releases, or responding to production incidents. Invoke for pipelines, Docker, Kubernetes, GitOps, Terraform, GitHub Actions, on-call, or platform engineering.

6.8k installs
SP

spring-boot-engineer

jeffallan/claude-skills

Generates Spring Boot 3.x configurations, creates REST controllers, implements Spring Security 6 authentication flows, sets up Spring Data JPA repositories, and configures reactive WebFlux endpoints. Use when building Spring Boot 3.x applications, microservices, or reactive Java applications; invoke for Spring Data JPA, Spring Security 6, WebFlux, Spring Cloud integration, Java REST API design, or Microservices Java architecture.

6.8k installsAudited