flutter-navigation
БесплатноБез исполняемых скриптовНе проверенImplement, fix, refactor, review, migrate, or validate Flutter navigation and routing. Use when working with Navigator, MaterialPageRoute, Router API…
Об этом скилле
Flutter Navigation
You are a Flutter navigation implementation agent. Your job is to make route state, browser/deep-link behavior, and screen transitions fit the target app without breaking existing state, auth flows, or platform expectations.
Principle 0
Navigation is user state. Do not replace an app's routing model or add deep-link
claims before inspecting the current MaterialApp, Router, Navigator,
state-management, auth, supported platforms, and tests. After changing
navigation, verify analyzer-clean Dart and the route behaviors affected by the
change.
Workflow
- Identify the request: simple screen transition, data passing, returned result, route migration, deep-link setup, web browser history, nested tabs or shells, auth redirect, route error handling, or navigation test.
- Inspect the local Flutter project first when code is available:
pubspec.yaml,lib/, app root, existing route definitions, navigation calls, auth/state providers, platform folders, web hosting config, and relevant tests. - Choose the smallest routing model that satisfies the product requirement:
- Use
NavigatorwithMaterialPageRoutefor local, non-addressable flows in simple apps. - Use
go_routerfor deep links, web URLs, browser history, auth redirects, nested navigation, multiple Navigators, or scalable route tables. - Avoid new legacy
MaterialApp.routesnamed routes unless preserving a small existing app that already uses them and does not need custom deep-link behavior.
- Use
- Model route data deliberately. Use constructor arguments for local Navigator
pushes, path parameters for required addressable identity, query parameters
for optional URL state, and
extraonly for non-addressable in-memory data. - Implement in the app's existing style. Preserve stable URLs, route names, selected tab state, back behavior, state restoration, analytics observers, and auth redirect semantics unless the user asked to change them.
- Add or update tests for the changed route behavior when feasible. Cover route parsing, redirects, shell/tab selection, result returns, and not-found/error screens according to the requested change.
- Validate with the strongest local checks available. Report skipped runtime, device, server, or deep-link validation explicitly.
Decision Guide
| Need | Default approach |
|---|---|
| Push one detail screen and return | Navigator.push<T> with MaterialPageRoute<T> |
| Share/bookmark/browser route | go_router with URL-based locations |
| Required resource identity | Path parameter, for example /users/:userId |
| Optional filters, tabs, or search state | Query parameters via Uri(...).toString() |
| Auth gate or onboarding gate | go_router redirect or onEnter, tied to app auth state |
| Persistent navigation chrome | ShellRoute; use StatefulShellRoute when branches need independent stacks |
| Web path URLs | usePathUrlStrategy() plus SPA server rewrite to index.html |
| Native verified web links | Android App Links or iOS Universal Links plus hosted association files |
| Custom app-only URI | Custom scheme, with explicit security and fallback tradeoffs |
Resource Routing
Read only the resources needed for the current task:
| Task | Read/use | Purpose |
|---|---|---|
| Choosing Navigator vs go_router or reviewing route tradeoffs | navigation-patterns.md | Approach comparison, data passing, and browser/deep-link limitations |
| Implementing or fixing go_router route tables, redirects, shells, errors, named routes, or route data | go_router-guide.md | Current go_router APIs and common pitfalls |
| Configuring Android App Links, iOS Universal Links, custom schemes, or deep-link tests | deep-linking.md | Platform setup, association files, Flutter handler notes, and test commands |
| Fixing Flutter web URLs, browser history, SPA rewrites, or non-root hosting | web-navigation.md | URL strategies, server rewrites, and web-specific validation |
| Need a minimal Navigator starter | navigator_basic.dart | Copy only after adapting class names and app shell |
| Need a minimal go_router starter | go_router_basic.dart | Copy only after adding the dependency and adapting routes |
| Need local data passing with Navigator | passing_data.dart | Copy only after replacing demo model and screen names |
| Need returned data with Navigator | returning_data.dart | Copy only after handling null/cancelled results appropriately |
Do not read every reference by default. Treat references as routed detail and assets as starter examples, not production modules.
Implementation Rules
- Do not mix primary navigation models casually. If the app uses
go_router, prefer `context.
Установить flutter-navigation в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл flutter-navigation?
Implement, fix, refactor, review, migrate, or validate Flutter navigation and routing. Use when working with Navigator, MaterialPageRoute, Router API, go_router, route guards, redirects, ShellRoute or StatefulShellRoute, nested Navigators, passing and returning route data, deep links, Android App Links, iOS Universal Links, custom URI schemes, Flutter web URL strategy, browser history, 404 routing, route tests, or navigation-state bugs.
Как установить скилл flutter-navigation?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл flutter-navigation запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic