본문으로 건너뛰기
cccskills
무료GitHub에 공개

flutter-riverpod-arch

Implement Feature-First architecture with Riverpod state management and Flutter Hooks in Flutter applications

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(9)

  • SKILL.md5.9 KB
  • references/architecture.md5.4 KB
  • references/presentation.md4.9 KB
  • references/providers.md5.4 KB
  • references/riverpod.md5.3 KB
  • references/testing.md5.8 KB
  • references/ui/button.md5.4 KB
  • references/ui/list.md6.3 KB
  • references/ui/responsive.md6.0 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Flutter Riverpod Architecture

Goal

Implements scalable Flutter applications using the Feature-First directory structure, Riverpod (with code generation) for state management, and flutter_hooks / HookConsumerWidget for UI composition. This architecture is a lightweight approach inspired by Domain-Driven Design and Clean Architecture. The design philosophy is three layers — Presentation, Domain, and Infrastructure — and the code-level notation in this skill is UI, UseCase, and Repository. Data source access is encapsulated inside repositories. Applies @Riverpod(keepAlive: true) for repository providers and @riverpod for screen-scoped state.

Layer Mapping (Source of Truth)

Design philosophyCode-level notation
PresentationUI
DomainUseCase
InfrastructureRepository

Decision Logic

Decide whether the task belongs in UI, UseCase, or Repository, whether it is feature-specific or shared, and which Riverpod scope is appropriate.

See architecture.md for structure and naming, providers.md for Repository/UseCase placement, and riverpod.md for provider scope rules.

Instructions

1. Plan the Feature Structure

Identify the feature, confirm whether the implementation is shared or feature-local, and place files in the correct layer before coding.

See architecture.md for directory structure and naming.

2. Implement the Repository Layer

Implement Repository code in the Repository layer and follow the Riverpod/provider rules for Repository providers.

See providers.md for Repository implementation details and riverpod.md for provider scope rules.

3. Implement the UseCase Layer

Implement UseCase code in the UseCase layer for validation, orchestration, and UI-facing state changes.

See providers.md for UseCase patterns and riverpod.md for provider scope rules.

4. Build the UI with HookConsumerWidget

Build UI in the Presentation layer using the patterns required by this skill.

See presentation.md for page and widget structure, riverpod.md for ref.watch / ref.read, and button.md for button and cursor rules.

5. Implement Responsive Layout

Apply the responsive layout rules defined for this skill.

See responsive.md for breakpoint policy and responsive layout patterns.

6. Write Tests

Test Repository, UseCase, controller, and widget behavior with the testing patterns used by this skill.

See testing.md for test structure, overrides, and fake/mock patterns.

Constraints

  • Prefer HookConsumerWidget: This skill uses HookConsumerWidget (with flutter_hooks) for all stateful pages and complex widgets. StatefulWidget may be used for isolated, purely local UI state with no Riverpod interaction.
  • No ref.read() in build: ref.read() must only appear inside event handlers or callbacks, never at the top of a build method to derive reactive UI state.
  • No ref.watch() in event handlers: ref.watch() must only appear inside build() or a provider's build() method.
  • No business logic in Views: Widget classes must contain only layout, conditional rendering, and navigation. All data transformation and validation must reside in Use Cases or Repositories.
  • List patterns: Follow the list and sliver rules defined in list.md.
  • Avoid button wrapper widgets for style only: Do not create a custom wrapper widget whose sole purpose is applying a fixed button style. If you need to encapsulate behavior such as loading state or submission flow, a wrapper is acceptable.
  • Use targeted MediaQuery static methods: Prefer MediaQuery.sizeOf, MediaQuery.paddingOf, MediaQuery.orientationOf etc. over MediaQuery.of(context) to avoid unnecessary rebuilds.
  • No LayoutBuilder for page-level breakpoints: Use ResponsiveLayout (which uses MediaQuery.sizeOf) so the layout decision is based on actual screen width, not parent constraints.
  • Mouse cursors required on macOS/Web: Every Button variant must include enabledMouseCursor: SystemMouseCursors.click. Every InkWell must include mouseCursor: SystemMouseCursors.click.
  • Code generation required: After adding or modifying a @riverpod annotation, always run dart run build_runner build.
  • Naming conventions: Files and directories use snake_case; classes use UpperCamelCase; page classes end in Page; repository classes end in Repository; use case classes use verb-noun format (e.g., FetchPosts, CreatePost).

Reference Files

  • architecture.md — Project structure, directory layout, naming conventions
  • providers.md — Repository and use case implementation patterns
  • riverpod.md — Provider types, ref.watch vs ref.read, caching, code generation
  • presentation.md — Page structure, navigation, hooks usage, error handling
  • testing.md — Test patterns, mocking strategy, ProviderContainer usage
  • button.md — Button patterns, styleFrom, hover cursor for macOS/Web
  • list.md — ListView.builder, Pull-to-Refresh, pagination with Slivers
  • responsive.md — Breakpoints, ResponsiveLayout, platform-specific layouts

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

AGENTS.md / CLAUDE.mdの作成・編集・整理を行うスキル。CLAUDE.mdを50行以下を推奨とし、詳細ルールはrules/やスキルにモジュール化して分割管理する。以下のリクエストで使用する: (1)「CLAUDE.mdを作って」「AGENTS.mdを整理して」などCLAUDE.mdの新規作成・編集、(2)「ルールを追加して」「rules/に分割して」などルールの追加・分離、(3)「ディレクトリ構成を更新して」など参照の更新、(4) 新しいディレクトリやルールファイルを作成した後のCLAUDE.md反映。

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

hukusuke1007/agent-skills82026년 9월 12일 업데이트

複雑なコードベースを体系的に分析し、アーキテクチャを可視化・ドキュメント化して新規開発者のオンボーディングを支援する汎用スキル。成果物は必ず `docs/` 配下に分割出力する。以下のリクエストで使用する:(1)「このコードベースを分析して」「全体像を教えて」など概要把握、(2)「アーキテクチャドキュメントを作って」「C4図を生成して」など設計ドキュメント生成、(3)「オンボーディング資料を作って」など新規開発者向け資料作成、(4)「技術的負債を洗い出して」など負債評価、(5)「機能一覧を出して」など機能インベントリ生成、(6)「この機能を操作したら何が起きるか追跡して」などユーザー操作フロー追跡、(7)「新機能の実装手順を出して」などフロント/バック横断の実装ガイド生成。特定の言語・フレームワーク・ディレクトリ構成に依存せず、どのリポジトリでも利用できる。

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

hukusuke1007/agent-skills82026년 9월 12일 업데이트

AIコーディングエージェント向けの共通コーディングルール。コードの実装・修正・リファクタリング・レビュー時に使用し、前提確認、最小限の変更、検証に加え、空行・処理の区切り・目的と理由のコメントによる人間が後で理解できる可読性を厳守する。

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

hukusuke1007/agent-skills82026년 9월 12일 업데이트

URL・画像・テキスト要件からAIコーディングエージェント向けのDESIGN.mdを生成するスキル。「example.comをDESIGN.md化して」「このサムネをDESIGN.md化して」「クールでポップなLP用のDESIGN.mdを作って」といったリクエストで使用する。Claude Code / Cursor / Stitch に渡せば一貫したUIを生成できる、getdesign.md / awesome-design-md 準拠の9セクション構成のデザイン仕様書を出力する。CSS解析・画像目視抽出・要件生成の3パターンに対応。

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

hukusuke1007/agent-skills82026년 9월 12일 업데이트

添付された複数の画像を一括で圧縮・リサイズするスキル。「画像を圧縮して」「このスクショを軽くして」「リサイズして」「画像を小さくして」などのリクエストで使用する。Pillowで長辺1920pxにリサイズし、JPEG/PNGで出力先ディレクトリに保存する。

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

hukusuke1007/agent-skills82026년 9월 12일 업데이트

アーキテクチャ知識グラフ(memory MCP / memory.jsonl)の初期作成。「知識グラフを初期化して」「memory グラフを作って」「アーキテクチャグラフを登録して」といった依頼、またはプロジェクト初期構築完了後の仕上げとして使用する。コードベースを調査し、モジュール構成と依存関係を entities / relations として登録する。

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

hukusuke1007/agent-skills82026년 9월 12일 업데이트

hukusuke1007의 스킬 모두 보기

이 스킬의 문제 신고