← ClaudeAtlas

generate-modulelisted

Generate a feature module (domain/data/presentation) for modular Flutter projects following GM clean architecture.
ghozimahdi/gm-aiagent-plugins · ★ 0 · AI & Automation · score 70
Install: claude install-skill ghozimahdi/gm-aiagent-plugins
Use the current user request as this skill's input. In Claude Code invoke it as `/ufil:generate-module`; in Codex invoke it as `$ufil:generate-module`. Resolve `UFIL_ROOT` to the plugin root containing this skill; Claude Code may provide `CLAUDE_PLUGIN_ROOT`, while Codex can resolve it from the installed skill path. Generate a feature module for a Flutter project. **Script available at `${UFIL_ROOT}/scripts/generate-module.sh`:** - `generate-module.sh <name> [--modular|--single] [--layer domain|data|presentation|all]` Run the script first, then follow up with manual wiring below. Arguments: <requested arguments> (module name like "tenant" or "payment", optionally with --layer flag) ## Steps ### 1. Parse arguments - Extract module name (e.g., "tenant") - Extract layer flag: `--layer domain`, `--layer data`, `--layer presentation`, or `--layer all` (default: all) - Detect if project is modular (check for `packages/` directory) or non-modular ### 2. For MODULAR projects — generate packages **If --layer domain or all:** Create `packages/domain/domain_<name>/` with: - `pubspec.yaml` — depends on `domain_common` - `lib/domain_<name>.dart` — barrel export - `lib/src/models/<name>_model.dart` — freezed model with `@Default`, no nullable - `lib/src/models/get_<name>_list_result.dart` — `@freezed` Result containing `Failure` + data - `lib/src/repositories/<name>_repository.dart` — abstract class, query → `Future<Result>`, action → `Future<Failure>` - `lib/src/use_cases/get_<nam