agentsclimarketplace

Flutter ui

Skill Naimehossein77/claude-flutter-ui-skills/flutter-ui

Pixel-perfect Flutter UI β€” smooth animations, GoRouter navigation, back/forth logic, Riverpod + Provider state management. Use when building Flutter screens, navigation flows, animations, or state-connected widgets.From its SKILL.md

Install
npx -y skills add Naimehossein77/claude-flutter-ui-skills --skill flutter-ui

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

8.4 KB, ~2.1k tokens by cl100k_base, as published. Nobody here has run it

Flutter UI System

Philosophy: Flutter owns every pixel. Const-first. Theme-driven. GPU-animated. State-scoped.


πŸ”§ Runtime Scripts

ScriptPurposeUsage
scripts/flutter_ui_audit.pyAudit: missing const, dispose leaks, deprecated APIspython scripts/flutter_ui_audit.py <path>

πŸ”΄ MANDATORY: Read Reference Files First

β›” DO NOT code until relevant files are read:

FileContentPriority
flutter-design-thinking.mdAnti-memorization, forces context analysis⬜ CRITICAL FIRST
flutter-state-ui.mdRiverpod + Provider rules Claude MUST enforce⬜ CRITICAL
flutter-navigation.mdGoRouter, PopScope, back logic, deep links⬜ CRITICAL
flutter-animations.mdImplicit, explicit, Hero, page transitions, physics⬜ CRITICAL
flutter-performance.mdconst, RepaintBoundary, 60fps, shader warmup⬜ CRITICAL
flutter-theme-system.mdMaterial 3, ColorScheme, TextTheme, ThemeExtension⬜ Read
flutter-layout-system.mdResponsive, LayoutBuilder, MediaQuery, Slivers⬜ Read
flutter-custom-paint.mdCanvas, CustomPainter, pixel-perfect rendering⬜ Read

🧠 flutter-design-thinking.md FIRST β€” prevents AI from applying memorized patterns.


⚠️ ASK BEFORE ASSUMING

AspectAsk
State manager"Riverpod, Provider, BLoC, or vanilla?"
Navigation"GoRouter, auto_route, or Navigator 1.0?"
Design system"Material 3, Cupertino, or custom?"
Platforms"Mobile only, or tablet/desktop adaptive?"
Flutter version"3.12+? (PopScope vs WillPopScope)"

β›” ANTI-PATTERNS

Performance

❌ NEVERβœ… ALWAYS
ListView with static children for long listsListView.builder
setState in animation loopAnimatedBuilder
Opacity(opacity: 0) to hideVisibility or conditional render
IntrinsicHeight/IntrinsicWidth in listsFixed heights or SliverFixedExtentList
Missing const on StatelessWidgetconst MyWidget({super.key}) always
Column + ListView without ExpandedWrap ListView in Expanded
Hardcoded Color(0xFF...) in widgetsTheme.of(context).colorScheme.primary
Hardcoded fontSizeTheme.of(context).textTheme.bodyLarge

Animation

❌ NEVERβœ… ALWAYS
Animate width/heightAnimate Transform (scale/translate)
AnimationController without dispose()Dispose in dispose() method
addListener(() => setState((){}))AnimatedBuilder
Missing RepaintBoundary on complex paintersWrap CustomPaint in RepaintBoundary
Hero tag collisionUnique data-driven tags
No easing curveCurves.easeInOut minimum

Navigation

❌ NEVERβœ… ALWAYS
WillPopScope (Flutter 3.12+ deprecated)PopScope with canPop + onPopInvokedWithResult
Navigator.push in GoRouter appcontext.go() / context.push()
Hardcoded route strings everywhereCentralized route constants
No route guard for auth screensGoRouter redirect callback
Back button does nothing at rootPopScope(canPop: false) + exit dialog

State

❌ NEVERβœ… ALWAYS
ref.read() in build() (Riverpod)ref.watch() in build()
Provider defined inside build()Top-level final myProvider = ...
context.read<T>() in build() (Provider)context.watch<T>() in build()
BuildContext in ChangeNotifierPass data, not context
notifyListeners() before mutationMutate first, then notifyListeners()
.when() without error handlerAlways when(data:, loading:, error:)
Consumer<T> wrapping entire screenSelector<T, R> on smallest widget

πŸ—ΊοΈ Navigation: go() vs push() vs replace()

MethodBack StackUse When
context.go('/path')Replaces stackTab switching, auth redirect
context.push('/path')Adds to stackDrill-down navigation
context.replace('/path')Replaces current, no popLogin β†’ Home after auth
context.pop()Removes currentBack button, close modal
context.pop(result)Removes + returns dataForm submit, picker result

🎬 Animation Selection

WHAT ARE YOU ANIMATING?
β”œβ”€β”€ Simple property change β†’ AnimatedContainer, AnimatedOpacity, TweenAnimationBuilder
β”œβ”€β”€ Complex sequence/stagger β†’ AnimationController + CurvedAnimation + AnimatedBuilder
β”œβ”€β”€ Shared element (cross-screen) β†’ Hero widget + unique tag
β”œβ”€β”€ Page enter/exit β†’ GoRouter CustomTransitionPage or pageBuilder
β”œβ”€β”€ Spring/bounce/momentum β†’ SpringSimulation, BouncingScrollPhysics
└── Vector/sprite β†’ Rive or Lottie package

GPU-safe: transform, opacity β†’ smooth CPU-bound: width, height, margin, padding β†’ jank


πŸ“Š State Manager Auto-Detect

Scan imports before writing any state code:

Import FoundUse
flutter_riverpodRiverpod rules
provider packageProvider rules
NeitherAsk user β†’ recommend Riverpod for new projects

⚑ Performance Quick Reference

class MyCard extends StatelessWidget {
  const MyCard({super.key});
  @override
  Widget build(BuildContext context) => const Padding(
    padding: EdgeInsets.all(16),
    child: Text('Hello'),
  );
}

RepaintBoundary(child: AnimatedWidget(...))

ListView.builder(itemCount: n, itemBuilder: (ctx, i) => Item(items[i]))

final name = ref.watch(userProvider.select((u) => u.name));

🧠 CHECKPOINT (Fill Before Any Flutter Work)

🧠 FLUTTER CHECKPOINT:

State:      [ Riverpod / Provider / BLoC / Vanilla ]
Navigation: [ GoRouter / auto_route / Navigator 1.0 ]
Design:     [ Material 3 / Cupertino / Custom ]
Platforms:  [ Mobile / Tablet / Desktop / Web ]
Files Read: [ List files read ]

3 Rules I Will Apply:
1. _______________
2. _______________
3. _______________

Anti-Patterns I Will Avoid:
1. _______________
2. _______________

πŸ”΄ Can't fill checkpoint? β†’ Read the skill files.


πŸ“‹ Checklists

Per Screen

  • ConsumerWidget if Riverpod? const constructor?
  • Touch targets β‰₯ 48dp?
  • Loading + error states defined?
  • Back navigation tested (PopScope or GoRouter canPop)?
  • No hardcoded colors or font sizes?

Per Animation

  • Animating transform/opacity, not width/height?
  • AnimationController.dispose() called?
  • Duration β‰₯ 150ms with easing curve?
  • RepaintBoundary on complex painters?

Pre-Release

  • Run audit script β€” fix all πŸ”΄ findings
  • flutter analyze β€” no missing const warnings
  • Android back button tested β€” no stuck screens
  • Dark mode tested β€” all colors from Theme
  • Tablet layout tested β€” no overflow
  • All .when() handle error state

πŸ“š Reference Files

FileUse When
flutter-design-thinking.mdFIRST β€” prevents AI defaults
flutter-state-ui.mdRiverpod + Provider rules, patterns, migration
flutter-navigation.mdGoRouter, back logic, deep links, tabs
flutter-animations.mdImplicit, explicit, Hero, transitions, physics
flutter-theme-system.mdMaterial 3, ColorScheme, TextTheme
flutter-layout-system.mdResponsive, LayoutBuilder, Slivers
flutter-performance.mdconst, RepaintBoundary, DevTools
flutter-custom-paint.mdCanvas, CustomPainter, pixel-perfect

Pixel-perfect = every spacing, color, and type choice is intentional and theme-driven. Own the pixels through your design system, not magic numbers.

What ships with it: 9 files

61.2 KB alongside SKILL.md, 1 of them executable

scripts/

Keep looking

Skills are one crate of 326,834. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.