agentleFS
mikezamayiasmikezamayias/agent-skills/skills/flutter-router-decision/SKILL.md

flutter-router-decision

Skill1 starsChanged 27 days agoBSD-3-ClauseView on GitHub

Chooses Flutter routing, defaulting to go_router, with guidance on auth redirects, deep links and nested tabs. Use when starting routing on a new Flutter app or when someone claims go_router is in maintenance mode. Use before adding zenrouter, navigation_utils or auto_route to an app that already uses go_router.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Check pub.dev, not Twitter.

    line 11
  2. Distinctive:

    Leave go_router only with a concrete need:

    line 19

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Flutter router decision

Check pub.dev, not Twitter. As of 2026-09-28: go_router 18.0.1, publisher flutter.dev, feature-complete = bugfix-stable, not abandoned. Changelog tracks Flutter 3.44.

Default

Stay on (or start with) go_router. Use Flutter's official declarative routing skill for bootstrap, deep links, and StatefulShellRoute.

Leave go_router only with a concrete need:

NeedChoose
URL + deep links + nested tabs, standard appgo_router
Type-safe RouteTarget + mixins, no codegen, Coordinator URI parsezenrouter
Codegen typed routes on top of go_routergo_router + go_router_builder
"go_router is dead" rumordo not migrate
navigation_utilsdo not pick as default (nested nav still BETA)

go_router 18 requires Flutter 3.44 / Dart 3.12. Don't bump the package without bumping the SDK.

Auth redirect

redirect: (context, state) {
  final loggedIn = auth.currentUser != null;
  final loggingIn = state.matchedLocation == '/login';
  if (!loggedIn && !loggingIn) return '/login';
  if (loggedIn && loggingIn) return '/';
  return null;
},
redirectLimit: 5,

Deep links and extra

extra is not in the URL. Don't put objects that must survive a web refresh or a cold-start deep link in extra. Put an id in the path and rehydrate from a repository.

Nested tabs

StatefulShellRoute.indexedStack + navigationShell.goBranch(index, initialLocation: index == current). Child paths omit the leading /.

Creating Futures inside route builders causes the Future to be recreated and refetched on every rebuild. Load in a ViewModel instead.

If (and only if) zenrouter Coordinator

Implement parseRouteFromUri, give every route RouteUnique.toUri(), use RouteGuard/RouteRedirect mixins, wire MaterialApp.router(routerConfig: coordinator). Imperative NavigationPath is enough when you do not need URLs.

Sources

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.