desquared/agents-rules-skills

flutter-design-architecture

Use when scaffolding a new Flutter feature, setting up the data/domain/view folder structure, creating datasources, DTOs, repositories, or state management classes, or when the user asks how to organize a Flutter project.

First seen Mar 13, 2026

Installation

$ npx skills add desquared/agents-rules-skills --skill flutter-design-architecture

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from desquared/agents-rules-skills · top by installs.

npx skills add desquared/agents-rules-skills

Browse all from desquared/agents-rules-skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 4
License LICENSE
Default branch main
Open issues 0
Status Active

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,663 B
  • docs SUMMARY.md 256 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 11 installs

SKILL.md

Design Architecture Skill

Feature Structure (Mandatory)

lib/<features|feature>/<feature>/
  data/datasources/<feature>_remote_datasource.dart  # @RestApi
      dtos/<feature>_dto.dart                        # @JsonSerializable
      repositories/<feature>_repository_impl.dart    # @Injectable
  domain/models/<feature>.dart                       # Equatable
         repositories/<feature>_repository.dart      # Abstract
  view/<state_mgmt>/                                 # bloc/, provider/, getx/, riverpod/
       widgets/<feature>_card.dart
       <feature>_page.dart

Core Structure

lib/core/
  utils/extensions/, helpers/, validators/
  widgets/buttons/, cards/, dialogs/
  constants/app_constants.dart
  enums/app_enums.dart
test/<feature>/data/, domain/, view/
  fixtures/<feature>_fixtures.dart

Quick Templates

// Datasource (@RestApi)
abstract class <Feature>RemoteDatasource {
  factory <Feature>RemoteDatasource(Dio dio) = _<Feature>RemoteDatasource;
  @GET('/api/<endpoint>') Future<<Feature>Dto> fetch();
}

// DTO (@JsonSerializable)
class <Feature>Dto {
  final String id;
  factory <Feature>Dto.fromJson(Map<String, dynamic> json) => _$<Feature>DtoFromJson(json);
}

// Model (Equatable)
class <Feature> extends Equatable {
  final String id;
  const <Feature>({required this.id});
  @override List<Object?> get props => [id];
}

// Repository
abstract class <Feature>Repository { Future<<Feature>> fetch(); }

@Injectable(as: <Feature>Repository)
class <Feature>RepositoryImpl implements <Feature>Repository {
  final <Feature>RemoteDatasource _remote;
  @override Future<<Feature>> fetch() async => (await _remote.fetch()).toModel();
}

// State Management (Bloc|ChangeNotifier|GetxController|StateNotifier)
class <Feature>StateManager {
  final <Feature>Repository _repository;
  // Implement based on chosen state management
}

Error Handling

abstract class AppException implements Exception { final String message; }

// In repository
try { return await _remote.fetch(); }
on DioException catch (e) {
  if (e.response?.statusCode == 404) throw NotFoundException();
  throw NetworkException();
}

After Scaffolding

flutter pub run build_runner build  # Generate *.g.dart
flutter analyze                      # Must pass (0 errors)
flutter test                         # Create & run tests