Token导航 LogoToken导航TokenDH.com
前端设计需要联网github未标认证来源可访问许可证需确认审计通过

flutter-riverpod-archFlutter riverpod arch 命令行

Agent Skill

flutter-riverpod-arch 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

420

周安装

17

GitHub Stars

5

下载量

132
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:flutter-riverpod-arch(Flutter riverpod arch 命令行)
来源仓库:https://github.com/hukusuke1007/agent-skills
仓库路径:skills/flutter-riverpod-arch
安装命令:
npx skills add https://github.com/hukusuke1007/agent-skills --skill flutter-riverpod-arch
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/hukusuke1007/agent-skills --skill flutter-riverpod-arch

简介

flutter-riverpod-arch 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态、代码变更或协作事项进行整理。
  • 通过 npx skills add 命令从指定仓库安装,需结合原始 README 核验具体用法。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

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.mdListView.builder, Pull-to-Refresh, pagination with Slivers
  • responsive.md — Breakpoints, ResponsiveLayout, platform-specific layouts

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.78%
按下载量换算45

Claude

29.67%
按下载量换算39

Cursor

17.3%
按下载量换算23

Gemini CLI

9.53%
按下载量换算13

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills