flutter-presentation-layer

flutter-presentation-layer is a skill for Claude Code, Codex from pedromneto97/custom-skills. It costs 33 tokens per session (1,360 once invoked), scanned A, original, MIT.

A set of conventions for building the user-interface layer of Flutter apps that use Clean Architecture, a way of separating screens, application logic, and data access.

In plain words
What is it for?
Organizing feature folders, creating pages and widgets, splitting Cubits by action, handling CRUD screens, and connecting strings to localization files.
Why use it?
It reduces inconsistency by defining where screens and widgets belong, how state actions are separated, and how user-visible text is translated.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/pedromneto97/custom-skills/flutter-presentation-layer
Any agent
npx skills add pedromneto97/custom-skills --skill flutter-presentation-layer
Clone the repo
git clone --depth 1 https://github.com/pedromneto97/custom-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for flutter-presentation-layer

README.md
[![agentmods](https://agentmods.dev/badge/skills/pedromneto97/custom-skills/flutter-presentation-layer.svg)](https://agentmods.dev/skills/pedromneto97/custom-skills/flutter-presentation-layer)
Your own site
<a href="https://agentmods.dev/skills/pedromneto97/custom-skills/flutter-presentation-layer"><img src="https://agentmods.dev/badge/skills/pedromneto97/custom-skills/flutter-presentation-layer.svg" alt="Measured on agentmods" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,360 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00033 $0.01360
Opus 5 $0.00016 $0.00680
Sonnet 5 $0.00007 $0.00272
Haiku 4.5 $0.00003 $0.00136

Measured 6d ago against content hash bece826a13f7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

flutter-presentation-layer scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/flutter-presentation-layer/SKILL.md · 126 lines

How it starts

The opening of the file, as written. The whole thing — 126 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Flutter Presentation Layer (Clean Architecture)

Purpose: Provide a concise, opinionated set of conventions and quick prompts for implementing the presentation layer (UI + state) in a Flutter Clean Architecture project.

Principles

  • Each UI page lives in its own folder so all page-specific artifacts are colocated.
  • Each Cubit has a single responsibility: one cubit per action/intent (fetch, post, delete, etc.).
  • Widgets live as close as possible to where they're used. Only genuinely shared components go into a global widgets folder.
  • Keep build() methods clean: extract widget-building functions into private class methods or small private widgets.
  • All user-facing strings must come from the localization system (ARB, S, AppLocalizations, etc.).
  • For CRUD-like flows, split by intent explicitly: one cubit to list items, one to add/create item, one to delete item, and one to remove item from a local collection/state (if this action differs from backend delete).

Folder layout (recommended)

Use a feature-first layout. Example for a user feature with a list page:

  • lib/features/user/presentation/user_list/
    • user_list_page.dart # page entry (Widget)
    • cubit/
      • user_list/
        • user_list_cubit.dart # cubit with single responsibility (e.g., fetch list)
        • user_list_state.dart # states for the cubit
    • widgets/ # page-scoped widgets used only by this page
      • user_row.dart
      • user_loading.dart

Shared UI components (only for true reuse)

  • lib/shared/widgets/ # cross-feature shared widgets (buttons, inputs, avatars)
  • lib/core/localization/ # localization ARB files and generated accessors

Cubit conventions

  • Name: <feature>_<page>_<action>_cubit.dart OR for simpler cases <page>_cubit.dart with clearly separated methods. The important rule is one cubit per action/intent.
  • Each cubit should:
    • Represent a single asynchronous intent (fetch, create, delete, update).
    • Expose a minimal API: one method to trigger the action and one public state stream.
    • Map domain errors to UI-friendly states. Do not embed domain logic—call usecases.

Examples:

  • user_list_cubit — only responsible for fetching the list of users.
  • user_create_cubit — only responsible for sending a create-user request and reporting success/failure.
  • item_list_cubit — only responsible for listing items.
  • item_add_cubit — only responsible for adding a new item.
  • item_delete_cubit — only responsible for deleting an item in the backend/source of truth.
  • item_remove_cubit — only responsible for removing an item from current UI state/local cache when modeled as a distinct action.

Practical SRP split for Cubits

When the page supports multiple intents, avoid a “god cubit”. Prefer one cubit per intent:

  • ListItemsCubit: loads and refreshes item collections.
  • AddItemCubit: handles create/add submission flow.
  • DeleteItemCubit: executes delete use case against remote/local source of truth.
  • RemoveItemCubit: removes an element from an in-memory list/UI state when this is a separate intent from delete.

This separation keeps each cubit focused, easier to test, and aligned with the Single Responsibility Principle (SRP).

Widget placement and composition

  • Keep small, page-private widgets under the page's widgets/ folder.
  • Only move a widget to lib/shared/widgets/ when at least two pages use it and its contract is stable.
  • Prefer small focused widgets instead of large build methods with many nested conditionals.

Clean build() pattern

Bad:

class UserListPage extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold(body: ButtonPrimary(onPressed: () { // handle click }, ...)) } }

Good:

class UserListPage extends StatefulWidget { ... }

class _UserListPageState extends State { void _onClick() { // handle click }

@override Widget build(BuildContext context) => Scaffold(body: ButtonPrimary(onPressed: _onClick, ...)); }

Read the full file on GitHub · 126 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 126 lines · 33 tokens per session scan A bece826a13f7

Subscribe to this mod's changes

flutter-presentation-layer is a skill published in the GitHub repository pedromneto97/custom-skills (2 stars, last pushed 2mo ago), licensed MIT. It adds 33 tokens to every session and 1,360 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

leanback-to-compose-tv-migration

Provides instructions and architectural patterns for migrating Android TV applications from legacy Leanback UI Toolkit, Android Views, or Support Fragments to Jetpack Compose for TV (androidx.tv). Use this skill for Leanback to Compose migrations, including browse screen, settings screen, authentication screen, login…

android/skills · 151 tokens

edge-to-edge

Use this skill to migrate your Jetpack Compose app to add adaptive edge-to-edge support and troubleshoot common issues. Use this skill to fix UI components (like buttons or lists) that are obscured by or overlapping with the navigation bar or status bar, fix IME insets, and fix system bar legibility.

android/skills · 67 tokens

migrate-xml-views-to-jetpack-compose

Provides a structured workflow for migrating an Android XML View to Jetpack Compose. This skill details the step-by-step process, from planning and dependency setup, to theming and layout migration, validation and XML cleanup. Use this skill when you need to migrate an XML View to Jetpack Compose in an Android…

android/skills · 98 tokens

react-native-patterns

Navigation, state management, native modules, performance, animations, and cross-platform strategies.

cosmicstack-labs/mercury-agent-skills · 21 tokens

animations

Best practices for Flutter animations using the built-in animation framework. Use when creating, modifying, or reviewing animations, transitions, motion, or animated widgets. Covers implicit animations, explicit animations, page transitions, and Material 3 motion tokens.

VeryGoodOpenSource/vgv-ai-flutter-plugin · 49 tokens

android-compose-migration

Migrate an Android XML View to Jetpack Compose following a structured 10-step workflow. Use when converting XML layouts to Compose, setting up Compose in an existing View-based project, or incrementally adopting Compose.

HoangNguyen0403/agent-skills-standard · 47 tokens