Clean Architecture Scaffolder

Generate Clean Architecture feature scaffolds with BLoC and Freezed in Flutter projects.

5|2|Updated Sep 4, 2024
One-click install
npx skills add https://github.com/tsiresymila1/youtube-dl-mobile --skill clean-architecture-scaffolder
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Clean Architecture Scaffolder
Source: https://github.com/tsiresymila1/youtube-dl-mobile/tree/main/.agent/skills/clean-arch-scaffold
Command: npx skills add https://github.com/tsiresymila1/youtube-dl-mobile --skill clean-architecture-scaffolder

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill automates the creation of a complete feature scaffold in Flutter projects following Clean Architecture, Bloc, and Freezed, eliminating repetitive boilerplate.

Core Features & Use Cases

  • Full feature skeleton: Creates data/, domain/, and presentation/ layers under lib/features/<feature_name>/ with typical folders and files.
  • Boilerplate generation: Produces models, repositories, use cases, blocs, pages, and widgets wired to a service locator.
  • Use Case: When starting a new feature named "payments", you run the scaffold and immediately have a working structure ready for development.

Quick Start

Run the scaffold tool to generate the new feature structure at lib/features/<feature_name>/ and then run code generation with:

  • dart run build_runner build --delete-conflicting-outputs

Frequently Asked Questions about Clean Architecture Scaffolder

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I scaffold a Flutter feature with Clean Architecture and BLoC?

To scaffold a Flutter feature with Clean Architecture and BLoC, this tool generates the complete directory structure under lib/features/<feature_name>/, including data, domain, and presentation layers with models, repositories, use cases, and blocs.

What is the best way to generate Freezed data classes and repository interfaces in Flutter?

Generating Freezed data classes and repository interfaces is handled by creating full feature skeletons that produce boilerplate models, data sources, and use cases, which are then compiled using build_runner to finalize the Freezed code.

How do I add a new feature to a Flutter project without writing repetitive boilerplate?

Adding a new feature without repetitive boilerplate involves running a scaffolder that instantly creates data, domain, and presentation layers wired to a service locator, leaving your feature ready for immediate development.

Do I need to run build_runner after generating a Clean Architecture feature scaffold?

Yes, you need to run build_runner after generating a Clean Architecture feature scaffold to execute post-run code generation, specifically using the command dart run build_runner build --delete-conflicting-outputs.

Can I use this scaffolder for an existing Flutter feature that uses Riverpod instead of BLoC?

This scaffolder is specifically designed for Flutter projects using BLoC and Freezed conventions, meaning it is not suitable for existing features utilizing Riverpod or other state management solutions.

What files and folders are created when scaffolding a Clean Architecture feature in Flutter?

Scaffolding a Clean Architecture feature creates data, domain, and presentation folders containing models, repository interfaces, use cases, data sources, Bloc boilerplate, pages, widgets, and service locator wiring.