Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

flutter-navigation

БесплатноБез исполняемых скриптовНе проверен

Implement, fix, refactor, review, migrate, or validate Flutter navigation and routing. Use when working with Navigator, MaterialPageRoute, Router API…

MADTeacherот MADTeacher★ 114 звёзд на GitHub11 установок в других каталогах

Об этом скилле

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

  1. 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.
  2. 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.
  3. Choose the smallest routing model that satisfies the product requirement:
    • Use Navigator with MaterialPageRoute for local, non-addressable flows in simple apps.
    • Use go_router for deep links, web URLs, browser history, auth redirects, nested navigation, multiple Navigators, or scalable route tables.
    • Avoid new legacy MaterialApp.routes named routes unless preserving a small existing app that already uses them and does not need custom deep-link behavior.
  4. Model route data deliberately. Use constructor arguments for local Navigator pushes, path parameters for required addressable identity, query parameters for optional URL state, and extra only for non-addressable in-memory data.
  5. 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.
  6. 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.
  7. 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.
Полный SKILL.md на GitHub

Установить flutter-navigation в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

assets/go_router_basic.dartassets/navigator_basic.dartassets/passing_data.dartassets/returning_data.dartreferences/deep-linking.mdreferences/go_router-guide.mdreferences/navigation-patterns.mdreferences/web-navigation.md

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), без исполняемых скриптов.

Похожие скиллы

Сравнить flutter-navigation с