Agent skill

Flutter App Architecture

by evanca in evanca/flutter-ai-rules

A skill your agent uses when scaffolding a project, refactoring into layers, creating view models/repositories, configuring dependency injection, or implementing unidirectional data flow (MVVM).

MITAuto-check passedDevelopment

Install Flutter App Architecture

skills CLI
$ npx skills add evanca/flutter-ai-rules --skill flutter-app-architecture -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install evanca/flutter-ai-rules flutter-app-architecture --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/evanca/flutter-ai-rules.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/flutter-app-architecture .claude/skills/flutter-app-architecture && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
flutter-app-architecture
GitHub stars
649
Token cost
~1.7k tokens
SKILL.md length
483 words
Files
1
Skills in repo
37
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when scaffolding a project, refactoring into layers, creating view models/repositories, configuring dependency injection, or implementing unidirectional data flow (MVVM).

  • Works in 7 steps: Layer Structure → Component Responsibilities → Dependency Injection → …
  • Scaffolding a project
  • SKILL.md covers When to Use, 1. Layer Structure, 2. Component Responsibilities and 3. Dependency Injection, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Flutter App Architecture is an agent skill from evanca/flutter-ai-rules. Use when scaffolding a project, refactoring into layers, creating view models/repositories, configuring dependency injection, or implementing unidirectional data flow (MVVM).

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Design patterns, Project scaffolding and Refactoring. It works with Flutter. The repository describes itself as: Flutter AI Skills and Rules for Claude, Codex, Cursor, and Other AI-Powered IDEs. The licence is MIT.

When your agent uses it

  • Scaffolding a project
  • Refactoring into layers
  • Creating view models/repositories
  • Configuring dependency injection

Example prompts

  • “/flutter-app-architecture”

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Layer Structure
  2. Component Responsibilities
  3. Dependency Injection
  4. Use Cases (Domain Layer)
  5. Workflow: Scaffold a New Feature
  6. Data Storage
  7. Coding Conventions

What it can do on your machine

Read from SKILL.md and the folder at commit 7b9cce2. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are dart).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • docs.flutter.dev
    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Flutter App Architecture loads about 1.7k tokens when it runs. Until then it costs about 50 tokens; SKILL.md has 483 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~50
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from evanca/flutter-ai-rules at commit 7b9cce2, republished under its MIT licence (© evanca). 483 words, ~1,748 tokens.

Download SKILL.mdSave it as .claude/skills/flutter-app-architecture/SKILL.md (or your agent's skills folder).
name
flutter-app-architecture
description
Use when scaffolding a project, refactoring into layers, creating view models/repositories, configuring dependency injection, or implementing unidirectional data flow (MVVM).
license
MIT

Flutter App Architecture Skill

This skill defines how to structure Flutter applications using layered architecture, proper data flow, and MVVM patterns for maintainability and testability.

When to Use

Use this skill when:

  • Scaffolding a new Flutter project with layered architecture.
  • Creating or refactoring View Models, Repositories, or Services.
  • Wiring dependency injection between architectural components.
  • Implementing unidirectional data flow across layers.
  • Adding a Domain (Logic) Layer for complex business logic or shared use cases.

1. Layer Structure

Separate every app into a UI Layer and a Data Layer. Add a Logic (Domain) Layer only for complex apps.

┌──────────────────────────────────────────────────────────────┐
│   UI Layer    │  Views + ViewModels                           │
├──────────────────────────────────────────────────────────────┤
│  Logic Layer  │  Use Cases / Interactors  (optional)         │
├──────────────────────────────────────────────────────────────┤
│   Data Layer  │  Repositories + Services                     │
└──────────────────────────────────────────────────────────────┘

Rules:

  • Only adjacent layers may communicate. The UI layer must never access a Service directly.
  • Data changes always happen in the Data layer (SSOT = Repository). No mutation in UI or Logic layers.
  • Follow unidirectional data flow: state flows down (Data → UI), events flow up (UI → Data).

2. Component Responsibilities

View
  • Describes how to present data; keep logic minimal and UI-related only.
  • Passes events to the ViewModel in response to user interactions.
ViewModel
  • Converts app data into UI state and maintains the current state needed by the View.
  • Exposes callbacks (commands) to the View and retrieves/transforms data from Repositories.
dart
class BookingViewModel extends ChangeNotifier {
  final BookingRepository _repo;

  BookingViewModel(this._repo);

  List<Booking> _bookings = [];
  List<Booking> get bookings => List.unmodifiable(_bookings);

  bool _isLoading = false;
  bool get isLoading => _isLoading;

  Future<void> loadBookings() async {
    _isLoading = true;
    notifyListeners();

    _bookings = await _repo.getBookings();
    _isLoading = false;
    notifyListeners();
  }

  Future<void> cancelBooking(String id) async {
    await _repo.cancelBooking(id);
    _bookings = await _repo.getBookings();
    notifyListeners();
  }
}
Repository (Single Source of Truth)
  • The only class that may mutate its data; all other classes read from it.
  • Handles caching, error handling, and data refresh logic.
  • Transforms raw data from Services into domain models.
dart
class BookingRepository {
  final BookingApiService _apiService;
  final BookingLocalService _localService;

  BookingRepository(this._apiService, this._localService);

  Future<List<Booking>> getBookings() async {
    try {
      final remote = await _apiService.fetchBookings();
      await _localService.cacheBookings(remote);
      return remote;
    } catch (_) {
      return _localService.getCachedBookings();
    }
  }

  Future<void> cancelBooking(String id) async {
    await _apiService.cancelBooking(id);
    await _localService.removeCachedBooking(id);
  }
}
Service
  • Wraps API endpoints and exposes asynchronous response objects.
  • Isolates data-loading and holds no state.
dart
class BookingApiService {
  final http.Client _client;
  BookingApiService(this._client);

  Future<List<Booking>> fetchBookings() async {
    final response = await _client.get(Uri.parse('/api/bookings'));
    if (response.statusCode != 200) {
      throw HttpException('Failed to load bookings');
    }
    final data = jsonDecode(response.body) as List;
    return data.map((json) => Booking.fromJson(json)).toList();
  }
}

3. Dependency Injection

Supply dependencies via constructors. Define abstract interfaces so implementations can be swapped for testing.

dart
// Abstract interface for the repository
abstract class BookingRepository {
  Future<List<Booking>> getBookings();
  Future<void> cancelBooking(String id);
}

// Concrete implementation
class BookingRepositoryImpl implements BookingRepository {
  final BookingApiService _api;
  BookingRepositoryImpl(this._api);

  @override
  Future<List<Booking>> getBookings() => _api.fetchBookings();

  @override
  Future<void> cancelBooking(String id) => _api.cancelBooking(id);
}

4. Use Cases (Domain Layer)

Introduce use cases only when:

  • Logic is complex or does not fit cleanly in the UI or Data layers.
  • Logic is reused across multiple ViewModels or merges data from multiple Repositories.
dart
class GetUpcomingBookingsUseCase {
  final BookingRepository _bookingRepo;
  final UserRepository _userRepo;

  GetUpcomingBookingsUseCase(this._bookingRepo, this._userRepo);

  Future<List<Booking>> call() async {
    final user = await _userRepo.getCurrentUser();
    final bookings = await _bookingRepo.getBookings();
    return bookings
        .where((b) => b.userId == user.id && b.date.isAfter(DateTime.now()))
        .toList();
  }
}

Show full SKILL.md (186 more words)Show less

5. Workflow: Scaffold a New Feature

  1. Create the Service — implement the API wrapper with typed response parsing.
  2. Create the Repository — inject the Service, implement caching and error-handling logic.
  3. Create the ViewModel — inject the Repository, expose UI state and commands.
  4. Create the View — bind to the ViewModel, render state, dispatch events.
  5. Wire DI — register all components in the dependency injection container.
  6. Verify — confirm the View never accesses the Service directly and data flows unidirectionally.

6. Data Storage

  • Use key-value storage (e.g., shared_preferences) for configuration and preferences.
  • Use SQL storage (e.g., drift, sqflite) for complex relational data.
  • Implement optimistic updates to improve perceived responsiveness by updating UI before server confirms.
  • Support offline-first by combining local and remote data sources in Repositories.

7. Coding Conventions

  • Use StatelessWidget when possible; avoid unnecessary StatefulWidgets.
  • Keep build methods simple and focused on rendering.
  • Prefer final for fields and top-level variables. Prefer const constructors when the class supports it.
  • Prefer explicit typing on public APIs (e.g., Command0<void> over dynamic signatures).
  • Use descriptive constant names (e.g., _todoTableName over _kTableTodo).

References

© evanca, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/flutter-app-architecture of evanca/flutter-ai-rules.

Open the folder on GitHubat commit 7b9cce2

Compare with similar skills

Flutter App Architecture next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Flutter App Architecture compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Flutter App Architecture this skillevanca/flutter-ai-rules649—~1.7kAutomated safety check: PassMIT
Angular Clean Architecturefmflurry/settings-opencode171—~3.6kAutomated safety check: PassMIT
Flutter Appccplugins/awesome-claude-code-plugins968—~1.1kAutomated safety check: NotesApache-2.0
PonytailDavidObando/gsharp5658 repos~1.7kAutomated safety check: PassMIT
Swiftui View RefactorDimillian/Skills4k5 repos~2kAutomated safety check: PassMIT
RTK Rust Design Patternsrtk-ai/rtk83k—~1.9kAutomated safety check: PassApache-2.0

Similar skills

  • Angular Clean Architecture

    fmflurry/settings-opencode

    Scaffolds and extends Angular standalone feature MODULES under src/app/modules/{name} using Clean Architecture layering (presentation/application/core/infrastructure), a self-registering module…

    171 GitHub stars~3.6k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Flutter App

    ccplugins/awesome-claude-code-plugins

    Bootstrap a new Flutter mobile app with clean architecture, Riverpod, FVM-pinned SDK, current packages, and no deprecated APIs.

    968 GitHub stars~1.1k tokensUpdated 1 mo ago
    MobileAuto-check: notes
  • Ponytail

    DavidObando/gsharp

    Forces the laziest solution that actually works, simplest, shortest, most minimal.

    565 GitHub starsUsed in 8 repos~1.7k tokens
    DevelopmentAuto-check passed
  • Swiftui View Refactor

    Dimillian/Skills

    Refactor and review SwiftUI view files with strong defaults for small dedicated subviews, MV-over-MVVM data flow, stable view trees, explicit dependency injection, and correct Observation usage.

    4k GitHub starsUsed in 5 repos~2k tokens
    DevelopmentAuto-check passed
  • Describes seven Rust design patterns for the RTK CLI filter modules, with when to use each, RTK examples, and notes on when a pattern is overkill.

    83k GitHub stars~1.9k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Architecture Patterns

    KartikLabhshetwar/better-shot

    Deep dive into software architecture for macOS. An agent skill from KartikLabhshetwar/better-shot.

    2.4k GitHub starsUsed in 2 repos~1.4k tokens
    DevelopmentAuto-check passed

More from evanca/flutter-ai-rules

All 37 skills in this repo
  • Code Review

    evanca/flutter-ai-rules

    A skill your agent uses when asked to review a PR, MR, branch, or diff, audit changed files, or check code quality.

    649 GitHub stars~2.4k tokensUpdated 24 days ago
    Auto-check passed
  • Developing Genkit Dart

    evanca/flutter-ai-rules

    A skill your agent uses when building AI agents in Dart, implementing Genkit flows or tools, integrating LLMs into Dart or Flutter applications, or using Genkit Dart plugins.

    649 GitHub stars~961 tokensUpdated 24 days ago
    Auto-check passed
  • Generate Images With Firebase AI

    evanca/flutter-ai-rules

    A skill your agent uses when generating or editing images from Flutter/Dart with Firebase AI Logic and a Gemini image model (Nano Banana), making the first call work, choosing Gemini Developer API…

    649 GitHub stars~2.3k tokensUpdated 24 days ago
    Auto-check passed
  • Flutter Use Column Row First

    evanca/flutter-ai-rules

    A skill your agent uses when building any Flutter screen or component to choose responsive Row, Column, Expanded, Flexible, and Spacer layouts before fixed-size or coordinate-based alternatives.

    649 GitHub stars~1.3k tokensUpdated 24 days ago
    Auto-check passed
  • Architecture Feature First

    evanca/flutter-ai-rules

    A skill your agent uses when creating a feature, designing folder structure, adding repositories/services/view models, wiring dependency injection, or deciding which layer owns logic.

    649 GitHub stars~1.9k tokensUpdated 24 days ago
    Auto-check passed
  • Bloc

    evanca/flutter-ai-rules

    A skill your agent uses when creating a Cubit or Bloc, modeling state with sealed classes or status enums, wiring BlocBuilder/BlocListener/BlocProvider, writing bloc tests, or choosing between Cubit…

    649 GitHub stars~2.8k tokensUpdated 24 days ago
    Auto-check passed

Works with

Categories

Questions about Flutter App Architecture

What does Flutter App Architecture do?

A skill your agent uses when scaffolding a project, refactoring into layers, creating view models/repositories, configuring dependency injection, or implementing unidirectional data flow (MVVM). Flutter App Architecture is an agent skill from evanca/flutter-ai-rules. Use when scaffolding a project, refactoring into layers, creating view models/repositories, configuring dependency injection, or implementing unidirectional data flow (MVVM).

When should I use Flutter App Architecture?

Flutter App Architecture fits situations like: scaffolding a project; refactoring into layers; creating view models/repositories; configuring dependency injection.

How do I install Flutter App Architecture in Claude Code?

Run `npx skills add evanca/flutter-ai-rules --skill flutter-app-architecture -a claude-code`. Or copy the skill folder (skills/flutter-app-architecture in evanca/flutter-ai-rules) into .claude/skills/flutter-app-architecture in your project. Claude Code loads it when a task matches its description.

How do I install Flutter App Architecture in Codex?

Run `npx skills add evanca/flutter-ai-rules --skill flutter-app-architecture -a codex`. Or copy the skill folder (skills/flutter-app-architecture in evanca/flutter-ai-rules) into .agents/skills/flutter-app-architecture in your project. Codex loads it when a task matches its description.

Can I use Flutter App Architecture in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add evanca/flutter-ai-rules --skill flutter-app-architecture -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/flutter-app-architecture, .gemini/skills/flutter-app-architecture, .github/skills/flutter-app-architecture and .opencode/skills/flutter-app-architecture in your project.

What does Flutter App Architecture need to run?

SKILL.md names no scripts, command-line tools or credentials: Flutter App Architecture is instructions for the agent only.

Does Flutter App Architecture access the network?

SKILL.md names 2 domains. As links in the text: docs.flutter.dev and github.com. This is read from the text; nothing was executed.

Is Flutter App Architecture safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Flutter App Architecture use?

Flutter App Architecture is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Flutter App Architecture use?

About 1.7k tokens (SKILL.md is roughly 7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Flutter App Architecture?

Skills that share tags, products or a category with Flutter App Architecture: Angular Clean Architecture (fmflurry/settings-opencode, 171 stars), Flutter App (ccplugins/awesome-claude-code-plugins, 968 stars), Ponytail (DavidObando/gsharp, 565 stars) and Swiftui View Refactor (Dimillian/Skills, 4k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Flutter App Architecture?

evanca (a GitHub user) maintains it in evanca/flutter-ai-rules, which has 649 GitHub stars. The repository holds 37 skills in this directory. The repository was last updated on September 14, 2026.

Source: evanca/flutter-ai-rules on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.