← Back to Skills Marketplace
symboy

flutter-schema

by symboy · GitHub ↗ · v2.0.0 · MIT-0
cross-platform ✓ Security Clean
235
Downloads
0
Stars
0
Active Installs
2
Versions
Install in OpenClaw
/install flutter-schema
Description
Flutter GetX 三层架构规范。core + shared + modules 纵向分层,业务模块 GetX 化。适用于新模块创建、目录设计、代码评审。支持 scaffold 搭建目录结构。
README (SKILL.md)

Flutter GetX 三层架构规范

架构概览

纵向分层(自上而下单向依赖,modules 依赖 core 和 shared):

shared(底)← core ← modules(顶)

模块内 GetX 结构

Binding(注入) + View ← Logic → State

层级速查

层级 职责
core 配置、路由、服务、工具、通用 UI 组件
shared 业务基类、存储、网络、可复用能力
modules 业务功能实现,按功能拆模块,模块间走路由

模块目录模板

{module}/
├── {feature}/                 # 子功能(可选)
│   ├── xxx_binding.dart
│   ├── xxx_logic.dart
│   ├── xxx_state.dart
│   ├── xxx_view.dart
│   ├── model/
│   └── view/
├── binding/
├── model/
├── view/
├── db/                        # 本地数据(可选)
└── upload/                    # 上传(可选)

命名约定

  • binding / logic / state / view:xxx_binding.dartXxxBinding
  • logic 继承项目内 BaseController 基类
  • 视图文件以 _view 结尾,类名以 PageView 结尾
  • 避免使用 widget 作为文件或类名后缀

依赖约束

  • 仅允许上层依赖下层
  • 同级模块不互相 import,通过路由(Get.toNamed)通信
  • Logic 不持有 BuildContext、不直接操作 UI

Scaffold 能力

用户要求创建目录搭建架构新建模块时:

全量:创建 core/config、constants、navigation、utils、services、widgets;shared/data、domain;modules/{name}

增量:在 modules 下新建 {module_name}/,可用 validate.py 生成页面骨架

模块名使用小写下划线(如 order_list、user_profile)。

页面生成

  • 普通页:python ~/flutter-schema/scripts/validate.py \x3Cname> [dir]

完整说明见 schema.md

Usage Guidance
This skill is a local scaffolding helper: it generates Flutter GetX page files under your project's lib directory and reads pubspec.yaml to fill package imports. Before using it: (1) run it from your project (or copy scripts/validate.py into your project) so the script can locate pubspec.yaml; (2) back up or review changes before committing, since it will create files; (3) ensure the target directory you pass is inside your project's lib folder (the script enforces this but be careful with symlinks/paths); (4) you need Python available locally to run the script. There is no network activity or credential use in this skill.
Capability Analysis
Type: OpenClaw Skill Name: flutter-schema Version: 2.0.0 The skill bundle provides a legitimate Flutter GetX architecture scaffolding tool. The core logic in scripts/validate.py includes proactive security measures, such as regex validation for page names and path traversal checks to ensure file generation is restricted to the project's 'lib' directory. No evidence of data exfiltration, malicious execution, or harmful prompt injection was found.
Capability Assessment
Purpose & Capability
Name/description (Flutter GetX scaffold & architecture guidance) match the included artifacts: documentation and a small Python script that generates GetX page files. The requested capabilities (file generation under lib/modules) are appropriate for the stated purpose.
Instruction Scope
SKILL.md instructs running the included Python script to create page scaffolding. The script only reads pubspec.yaml (to get the package name) and writes four Dart files under lib (with checks to prevent path traversal). Minor ambiguity: SKILL.md suggests running the script from '~/flutter-schema/scripts/validate.py' while the repository provides scripts/validate.py; the user will need to ensure the script is placed/run in their project environment. No instructions reference external network endpoints or unrelated system files.
Install Mechanism
No install spec is provided (instruction-only plus a small helper script). Nothing is downloaded or executed from remote URLs; there are no package installs declared.
Credentials
The skill requests no environment variables or credentials. The script reads only local project files (pubspec.yaml) which is reasonable for generating Dart package imports.
Persistence & Privilege
always is false and the skill does not request persistent or cross-skill privileges. It only writes files within the project's lib directory and does not modify other skills or system-wide settings.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install flutter-schema
  3. After installation, invoke the skill by name or use /flutter-schema
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v2.0.0
Initial release. - Provides a three-layer vertical architecture guideline for Flutter using GetX: shared, core, modules. - Defines recommended directory structure, naming conventions, and dependency rules. - Supports scaffold-based directory and module creation. - Includes guidance for module and page generation using helper scripts. - Suitable for new module creation, directory planning, and code review.
v1.0.0
- Initial release of flutter-schema skill. - Provides a Flutter GetX three-layer vertical architecture: shared (base) ← core ← modules (top). - Enforces layered code structure, module scaffolding, and naming conventions. - Includes scaffold features for rapid directory and module creation. - Details constraints for dependencies, layers, and module communication via GetX routing. - Offers a Python script for fast page module generation.
Metadata
Slug flutter-schema
Version 2.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 2
Frequently Asked Questions

What is flutter-schema?

Flutter GetX 三层架构规范。core + shared + modules 纵向分层,业务模块 GetX 化。适用于新模块创建、目录设计、代码评审。支持 scaffold 搭建目录结构。 It is an AI Agent Skill for Claude Code / OpenClaw, with 235 downloads so far.

How do I install flutter-schema?

Run "/install flutter-schema" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is flutter-schema free?

Yes, flutter-schema is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does flutter-schema support?

flutter-schema is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created flutter-schema?

It is built and maintained by symboy (@symboy); the current version is v2.0.0.

💬 Comments