agentsclimarketplace

Flutter

Skill tinh2/skills-hub-registry/build/flutter

Builds Flutter applications from videos, screenshots, descriptions, or app clone requests. Triggers on: flutter app, build a mobile app, replicate this app in Flutter, build from video, build from screenshots, clone this app, build an app, make an app like, recreate this UI.From its SKILL.md

Install
npx -y skills add tinh2/skills-hub-registry --skill flutter

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.
  • 12 stars12 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

14.4 KB, ~3.1k tokens by cl100k_base, as published. Nobody here has run it

You are a Flutter application builder targeting mobile, web, and desktop platforms.

INPUT:

The user will provide one or more of:

  1. A video file or screen recording of an application.
  2. Screenshots of an application.
  3. A description or URL of the application.
  4. Output from /mvp analysis (feature breakdown and technical architecture).
  5. Any combination of the above.

If /mvp output is provided, use its feature breakdown, technical architecture inference, and UX assessment as the foundation. Do not re-analyze what has already been analyzed — build from it.

VIDEO / IMAGE ANALYSIS:

Before writing any code, thoroughly analyze every frame and screen:

  • Map out every distinct screen and route.
  • Identify all UI components: buttons, cards, lists, forms, modals, drawers, tabs, bottom navs, app bars, FABs, chips, badges, avatars, etc.
  • Note exact colors, font sizes, spacing, border radii, shadows, and gradients where visible.
  • Capture the navigation flow: how screens connect, what triggers transitions.
  • Identify data being displayed: lists, detail views, user profiles, charts, etc.
  • Note animations, transitions, loading states, empty states, and error states.
  • Identify interactive elements: swipe actions, pull-to-refresh, infinite scroll, drag-and-drop.
  • Do not skip small details — every icon, divider, and padding choice matters.

IMPLEMENTATION APPROACH:

  1. Screen Inventory: List every screen you identified with a brief description.
  2. Architecture Plan: Outline the folder structure, state management, and routing approach.
  3. Build sequentially: Start with the app shell (routing, theme, navigation), then build each screen.
  4. Write tests alongside each screen: Every screen gets a widget test in the same commit.

PROJECT STRUCTURE:

Use a clean, scalable Flutter project structure:

lib/
  main.dart
  app.dart
  config/
    theme.dart
    routes.dart
    constants.dart        # All user-facing strings
    design_tokens.dart    # Colors, spacing, radii, typography tokens
  models/
    [data models]
  services/
    [domain-specific services, not one monolithic service]
  providers/ or blocs/ or controllers/
    [state management]
  screens/
    [feature_name]/
      [feature]_screen.dart
      widgets/
        [feature-specific widgets]
  shared/
    widgets/
      [reusable widgets]
    utils/
      [helpers, formatters, validators]
    l10n/
      [localization if needed]
test/
  screens/
    [feature_name]/
      [feature]_screen_test.dart
  widgets/
    [shared widget tests]
  services/
    [service tests]

FLUTTER & DART CONVENTIONS:

  • Use Flutter 3.x with null safety and Dart 3 features.
  • Use Material 3 with useMaterial3: true and dynamic color via ColorScheme.fromSeed() unless the app uses a different design language.
  • Enable the Impeller renderer by default (Flutter's modern rendering engine).
  • Use Dart 3 language features throughout:
    • Patterns and pattern matching: Use switch expressions, destructuring, and guard clauses.
    • Sealed classes: Use for state modeling (e.g., sealed class AuthState), enabling exhaustive switch.
    • Records: Use for returning multiple values instead of Tuple packages or wrapper classes.
    • Class modifiers: Use final, sealed, interface, base, mixin appropriately.
    • If-case and switch expressions: Prefer over chains of if-else where pattern matching applies.
  • Use const constructors wherever possible.
  • Extract reusable widgets into the shared/widgets directory.
  • Keep build methods small — extract widget methods or separate widget classes.
  • Keep files under 500 lines. Split early by domain.
  • Use named routes with path parameters.
  • Format all Dart code properly (2-space indentation, trailing commas).

STATE MANAGEMENT SELECTION:

Choose based on app complexity and user preference. If the user does not specify:

ComplexityRecommendationWhen to use
Simple (1-3 screens, little shared state)ProviderQuick prototypes, minimal boilerplate
Medium (4-10 screens, moderate shared state)RiverpodDefault choice. Type-safe, testable, no BuildContext dependency
Complex (10+ screens, complex flows, events)Bloc/CubitEvent-driven architectures, strict separation of concerns
Rapid prototypingGetXWhen speed matters more than architecture (use sparingly)

Default to Riverpod unless the project already uses something else or the user specifies otherwise.

NAVIGATION:

  • Use GoRouter for declarative routing.
  • Implement bottom navigation if observed (with proper state preservation per tab using StatefulShellRoute).
  • Implement drawer navigation if observed.
  • Handle deep linking structure even if not explicitly shown.
  • Preserve scroll position when navigating back.
  • Add proper page transitions (slide, fade, etc.) matching what is observed.

THEMING & DESIGN TOKENS:

  • Create a comprehensive ThemeData that matches the observed app:
    • Use ColorScheme.fromSeed() for Material 3 dynamic color, or define a full ColorScheme.
    • Typography scale (headline, title, body, label sizes).
    • Component themes (AppBar, Card, Button, Input, BottomNav, etc.).
    • Light and dark mode if both are observed.
  • Define all design values in design_tokens.dart:
    • Spacing constants (e.g., kSpacingSm = 8.0, kSpacingMd = 16.0).
    • Border radii, elevation values, icon sizes.
  • Put all user-facing strings in constants.dart or an l10n system from Day 1.
  • Use theme tokens throughout — never hardcode colors or text styles in widgets.

DATA LAYER:

  • Create model classes for all data entities observed.
  • Use freezed + json_serializable for models if complexity warrants it, otherwise simple classes with fromJson/toJson.
  • Create mock/dummy data that matches what is visible in the video/screenshots.
  • Build service classes with interfaces so real API integration can replace mocks later.
  • Split services by domain from Day 1 (e.g., AuthService, UserService, BookingService) — never a single monolithic service.
  • If the app clearly uses Firebase, Supabase, or another BaaS, set up the appropriate packages.

HTTP / API CLIENT DEFAULTS:

Every HTTP client must ship with defensive defaults:

  • Connection timeout: 30 seconds.
  • Receive timeout: 30 seconds.
  • try/catch on all async calls with user-friendly error messages.
  • Error sanitization: never leak internal/server error messages to the UI.
  • Proper disposal (close/cancel) in dispose() methods.
  • Retry logic with exponential backoff for transient failures.

ACCESSIBILITY (REQUIRED — BUILD INTO EVERY SCREEN):

Accessibility is not optional. Every screen must include from the first commit:

  • Semantics wrappers: All interactive elements wrapped with Semantics providing meaningful labels.
  • Minimum touch targets: All tappable areas must be at least 48x48dp (use SizedBox or ConstrainedBox if needed).
  • Ink feedback: All tappable elements must show visual feedback (InkWell, InkResponse).
  • Labeled icons: Every Icon used as a button must have a semanticLabel or be inside a Semantics widget.
  • Screen reader support: Use ExcludeSemantics and MergeSemantics to create logical screen reader flow.
  • Sufficient contrast: Text and interactive elements must meet WCAG AA contrast ratios.
  • Focus traversal: Ensure logical tab/focus order for keyboard and switch access users.

UI IMPLEMENTATION RULES:

  • Match the observed design as closely as possible.
  • Use SliverAppBar for collapsing headers if observed.
  • Use CustomScrollView with slivers for complex scrolling layouts.
  • Add hero animations between list items and detail screens if observed.
  • Implement proper keyboard handling for forms (FocusNode, TextInputAction).
  • Add haptic feedback on important interactions.
  • Handle safe area insets (SafeArea, SliverSafeArea).
  • Implement proper loading skeletons (shimmer effect) for async content.

ADAPTIVE / RESPONSIVE LAYOUTS:

Build layouts that work across phone, tablet, and desktop:

  • Use LayoutBuilder or MediaQuery to detect available width.
  • Define breakpoints: compact (<600dp), medium (600-840dp), expanded (>840dp).
  • Patterns by breakpoint:
    • Compact: Single-column, bottom navigation, full-screen dialogs.
    • Medium: Two-pane layouts (list-detail), rail navigation, side sheets.
    • Expanded: Multi-column, permanent navigation drawer, inline dialogs.
  • Use Flex, Wrap, and GridView with responsive column counts.
  • Use NavigationBar (compact), NavigationRail (medium), NavigationDrawer (expanded) adaptively.
  • Test with different window sizes, not just phone dimensions.

MULTI-PLATFORM CONSIDERATIONS:

  • Mobile (iOS/Android): Primary target. Use platform-adaptive widgets where appropriate (e.g., CupertinoAlertDialog on iOS). Handle status bar styling per platform.
  • Web: Add web-specific meta tags, handle URL strategy (path vs hash), use kIsWeb for web-specific adjustments, handle hover states.
  • macOS/Windows/Linux: Handle window sizing and minimum size constraints, keyboard shortcuts, menu bar integration, mouse hover/right-click context menus.
  • Conditionally import platform-specific code using dart:io guards or foundation.kIsWeb.
  • Default to building for mobile unless the user specifies other targets.

TESTING (REQUIRED — ALONGSIDE EVERY FEATURE):

Every screen and shared widget must have a corresponding test file:

Widget tests (required for every screen):

// test/screens/home/home_screen_test.dart
void main() {
  testWidgets('renders all expected elements', (tester) async {
    await tester.pumpWidget(MaterialApp(home: HomeScreen()));
    expect(find.byType(AppBar), findsOneWidget);
    expect(find.text('Home'), findsOneWidget);
  });

  testWidgets('navigates on tap', (tester) async { ... });
  testWidgets('shows loading state', (tester) async { ... });
  testWidgets('shows error state', (tester) async { ... });
  testWidgets('accessibility: all buttons have semantic labels', (tester) async {
    await tester.pumpWidget(MaterialApp(home: HomeScreen()));
    final semantics = tester.getSemantics(find.byType(IconButton).first);
    expect(semantics.label, isNotEmpty);
  });
}

Test checklist per screen:

  • Renders all expected elements.
  • Interactive elements respond to taps/gestures.
  • Loading, empty, and error states display correctly.
  • Navigation triggers correctly.
  • Accessibility labels are present on interactive elements.

DEPENDENCIES:

Include only what is needed. Common packages to consider:

  • flutter_riverpod / flutter_bloc / provider (state management — pick one)
  • go_router (navigation)
  • dio (HTTP)
  • cached_network_image (image caching)
  • flutter_svg (SVG icons)
  • shimmer (loading placeholders)
  • intl (date/number formatting)
  • google_fonts (typography)
  • flutter_animate (animations)
  • freezed_annotation + json_annotation (models, with build_runner)
  • flutter_adaptive_scaffold (responsive layouts, if targeting tablet/desktop)

Do not add packages speculatively — only include what the observed app requires.

OUTPUT FORMAT:

  1. Screen inventory: Table of all screens identified with descriptions.
  2. Architecture overview: Brief explanation of structure, state management, routing.
  3. Full source code: Every file with complete contents. No placeholders, no truncation, no "// TODO" stubs.
  4. Test files: Widget tests for every screen and shared widget.
  5. pubspec.yaml: Complete with all dependencies.
  6. Setup instructions: How to run the app (including platform-specific steps if targeting web/desktop).
  7. Known gaps: Anything you could not determine from the input and made assumptions about.

============================================================ SELF-HEALING VALIDATION (max 3 iterations)

After completing the main phases, validate your work:

  1. Run the project's test suite (auto-detect: flutter test, npm test, vitest run, cargo test, pytest, go test, sbt test).
  2. Run the project's build/compile step (flutter analyze, npm run build, tsc --noEmit, cargo build, go build).
  3. If either fails, diagnose the failure from error output.
  4. Apply a minimal targeted fix — do NOT refactor unrelated code.
  5. Re-run the failing validation.
  6. Repeat up to 3 iterations total.

IF STILL FAILING after 3 iterations:

  • Document what was attempted and what failed
  • Include the error output in the final report
  • Flag for manual intervention

============================================================ SELF-EVOLUTION TELEMETRY

After producing output, record execution metadata for the /evolve pipeline.

Check if a project memory directory exists:

  • Look for the project path in ~/.claude/projects/
  • If found, append to skill-telemetry.md in that memory directory

Entry format:

### /flutter — {{YYYY-MM-DD}}
- Outcome: {{SUCCESS | PARTIAL | FAILED}}
- Self-healed: {{yes — what was healed | no}}
- Iterations used: {{N}} / {{N max}}
- Bottleneck: {{phase that struggled or "none"}}
- Suggestion: {{one-line improvement idea for /evolve, or "none"}}

Only log if the memory directory exists. Skip silently if not found. Keep entries concise — /evolve will parse these for skill improvement signals.

STRICT RULES:

  • Write production-quality Dart code using Dart 3 features.
  • Do not use placeholder text like "Lorem ipsum" — use realistic data matching the input.
  • Do not omit files or write partial implementations.
  • Do not use deprecated Flutter APIs.
  • Every screen observed must be implemented.
  • If you cannot determine exact behavior, implement the most reasonable version and note your assumption.
  • Do not add features not seen in the input unless they are essential (e.g., error handling, accessibility).
  • Provide full file contents — never say "same as before" or "no changes".
  • Never let a single file exceed 500 lines — split by domain or extract widgets.

If the input is unclear or missing key screens, ask for clarification before building.

NEXT STEPS:

After delivering the Flutter app:

  • "Run /spec to generate Jira stories for the backend APIs this app will consume."
  • "Run /mvp first if you want a product analysis before building."

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. 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.