with one click
create-module
Create a new Modugo module with routes, binds, and imports
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Create a new Modugo module with routes, binds, and imports
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Create and apply route guards in Modugo to protect routes with conditional logic
Create routes in Modugo using ChildRoute, ModuleRoute, ShellModuleRoute, StatefulShellModuleRoute, or AliasRoute
Register and access dependencies in Modugo modules using GetIt via the binds() method
Contexto completo do projeto Modugo — lib Flutter de roteamento modular e injeção de dependência sobre GoRouter + GetIt. Carregue esta skill sempre que for explorar, implementar, especificar ou revisar qualquer coisa no repositório.
Based on SOC occupation classification
| name | create-module |
| description | Create a new Modugo module with routes, binds, and imports |
A module in Modugo extends Module and implements three methods: imports(), binds(), and routes().
Modulebinds() using i.register*routes() using the declarative DSLimports() if neededfinal class ProfileModule extends Module {
@override
List<Type> imports() => []; // shared modules to import
@override
void binds() {
i.registerFactory<ProfileRepository>(() => ProfileRepositoryImpl());
i.registerFactory<ProfileViewModel>(() => ProfileViewModel(i.get()));
}
@override
List<IRoute> routes() => [
child('/', builder: (_, _) => const ProfilePage()),
child('/edit', builder: (_, _) => const EditProfilePage()),
];
}
final class ProfileModule extends Module {
@override
void binds() {
i.registerFactory<ProfileRepository>(() => ProfileRepositoryImpl());
}
@override
List<IRoute> routes() => [
child(
'/',
builder: (_, _) => const ProfilePage(),
guards: [AuthGuard()],
),
];
}
@override
List<IRoute> routes() => [
child('/', builder: (_, _) => const HomePage()),
module('/profile', ProfileModule()),
];
i.get<T>(), Modugo.i.get<T>(), or context.read<T>()module() route propagate automatically to all child routesimports() to share a module's binds with child modules without re-registering