원클릭으로
manage-routes
Use when asked to add, update, or group routes using GoRouter, or manage redirection guards.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Use when asked to add, update, or group routes using GoRouter, or manage redirection guards.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Process for creating mock data sources in the infrastructure layer.
Process for building, exporting, and registering reusable UI components in the packages/app_ui package. References design-to-code.md for design tokens (typography, colors, spacing).
Outlines the process for converting Figma designs into a structured, platform-aware Flutter implementation.
Use when completely removing the web platform from the project. Details how to delete directories/configurations, clean up app_ui web components, remove web-specific feature views (*_view_web.dart), prune conditional imports/logic, and run validation.
Step-by-step workflow for creating, configuring, and updating Flutter golden tests using the Alchemist package.
Use when asked to create a new feature or sub-feature following the DDD-lite architecture, or set up state, view, and page layers for a domain.
| name | manage-routes |
| description | Use when asked to add, update, or group routes using GoRouter, or manage redirection guards. |
This skill defines the process for adding, modifying,
and guarding routes using GoRouter with the _AppRoute
base class, Routes registry, and _RouteComposer.
lib/src/routes/
├── router.dart # GoRouter config & auth shells
├── router.g.dart # Auto-generated (Riverpod)
├── router_listenable.dart # Auth-state refresh listener
└── routes.dart # _AppRoute base + Routes registry
Every route extends the private _AppRoute class which
holds path, name, and a build method. It also
provides toGoRoute() for zero-boilerplate registration:
abstract class _AppRoute {
const _AppRoute({required this.path, required this.name});
final String path;
final String name;
Widget build(BuildContext context, GoRouterState state);
GoRoute toGoRoute() => GoRoute(
name: name,
path: path,
builder: build,
);
}
All routes are registered as static const fields in the
Routes class for autocomplete-friendly discovery:
abstract final class Routes {
static const home = _HomeRoute();
static const login = _LoginRoute();
// ...
}
Add a final class extending _AppRoute at the bottom of
routes.dart:
final class _SearchRoute extends _AppRoute {
const _SearchRoute()
: super(path: '/search', name: 'search');
@override
Widget build(_, _) => const SearchPage();
}
For routes with path parameters, extract them from
GoRouterState:
final class _DetailRoute extends _AppRoute {
const _DetailRoute()
: super(path: '/detail/:id', name: 'detail');
@override
Widget build(_, GoRouterState state) {
final id = state.pathParameters['id']!;
return DetailPage(id: id);
}
}
Add a static const entry in the Routes class inside
routes.dart:
abstract final class Routes {
// ... existing routes
static const search = _SearchRoute();
}
Add the route to the appropriate shell in
router.dart using
toGoRoute():
Routes.search.toGoRoute(),
| Shell | Access | Redirect |
|---|---|---|
openRoutes | Any user, platform-gated | None |
unauthenticatedRoutes | Logged-out only | → / if logged in |
authenticatedRoutes | Logged-in only | → /login if logged out |
The _RouteComposer class handles platform-specific
layouts. On mobile the landing page uses a
StatefulShellRoute.indexedStack with bottom nav
branches (home, explore, notifications, profile). On web
it returns a single Routes.home.toGoRoute().
To add a new bottom-nav tab, add the route to the
branches list inside _RouteComposer.landing.
The appRouter provider is annotated with @Riverpod.
After any change, regenerate the .g.dart file:
melos run generate
context.go(Routes.settings.path);
context.push(Routes.settings.path);
context.goNamed(Routes.settings.name);