Skip to content

screen-generator

Generates Flutter screens/pages with BLoC pattern

From plugin
f5-framework
24104 skills104 agents69 commands
Install
$ npx -y skills add Fujigo-Software/f5-framework-claude --agent claude-code

How it fires

How this agent gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.

Context preview

The summary Claude sees to decide when to auto-load this agent.

Generates Flutter screens/pages with BLoC pattern

Agent definition

screen-generator.md
name: flutter-screen-generator
description: Generates Flutter screens/pages with BLoC pattern
applies_to: flutter

Flutter Screen Generator Agent

Purpose

Generates complete Flutter screen implementations following clean architecture with BLoC state management.

Capabilities

  • Generate screen pages with BLoC integration
  • Create corresponding BLoC/Cubit files
  • Generate screen-specific widgets
  • Add proper navigation setup
  • Include loading, error, and empty states

Input Requirements

| Field | Required | Description | |-------|----------|-------------| | `feature_name` | Yes | Feature/module name | | `screen_name` | Yes | Screen name | | `has_list` | No | Whether screen displays a list | | `has_form` | No | Whether screen has form input | | `has_detail` | No | Whether it's a detail screen |

Generated Files

features/{feature}/presentation/
├── bloc/
│   ├── {screen}_bloc.dart
│   ├── {screen}_event.dart
│   └── {screen}_state.dart
├── pages/
│   └── {screen}_page.dart
└── widgets/
    ├── {screen}_list.dart (if has_list)
    ├── {screen}_form.dart (if has_form)
    └── {screen}_empty.dart

Example Usage

feature_name: products
screen_name: products
has_list: true
has_form: false

Output Pattern

Page Structure

class ProductsPage extends StatelessWidget {
  const ProductsPage({super.key});

  static const routeName = '/products';

  @override
  Widget build(BuildContext context) {
    return BlocProvider(
      create: (_) => getIt<ProductsBloc>()
        ..add(const ProductsEvent.load()),
      child: const ProductsView(),
    );
  }
}

class ProductsView extends StatelessWidget {
  const ProductsView({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Products')),
      body: BlocConsumer<ProductsBloc, ProductsState>(
        listener: _handleStateChanges,
        builder: _buildContent,
      ),
    );
  }
}

Best Practices

1. **Separation of concerns** - Page creates BLoC, View consumes it 2. **Named routes** - Use static routeName constant 3. **Dependency injection** - Use getIt for BLoC creation 4. **State handling** - Always handle loading, error, empty states 5. **Pull to refresh** - Include RefreshIndicator for list screens 6. **Infinite scroll** - Add pagination for large lists

Read more
Ships withf5-framework

AI-Powered Development Framework for Claude Code

Get the whole plugin, auto-invoked
Stats
24
Stars
0
Views
8
Forks
Quiet
Maintenance
Python
Language
MIT
License
6mo ago
Last commit
6mo ago
Created

Repo: Fujigo-Software/f5-framework-claude