Agent skill

Flutter Setup Declarative Routing

by abdulmominsakib in abdulmominsakib/localmind

Configure MaterialApp.router using a package like gorouter for advanced URL-based navigation.

MITAuto-check passedMobile

Install Flutter Setup Declarative Routing

skills CLI
$ npx skills add abdulmominsakib/localmind --skill flutter-setup-declarative-routing -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install abdulmominsakib/localmind flutter-setup-declarative-routing --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/abdulmominsakib/localmind.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/flutter-setup-declarative-routing .claude/skills/flutter-setup-declarative-routing && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
flutter-setup-declarative-routing
GitHub stars
268
Token cost
~2.1k tokens
SKILL.md length
414 words
Files
1
Skills in repo
13
Repo updated
First seen
Licence
MIT

At a glance

Configure MaterialApp.router using a package like gorouter for advanced URL-based navigation.

  • Works in 2 steps: Scaffold the Application → Configure the Router
  • Developing web applications
  • SKILL.md covers Contents, Core Concepts, Workflow: Initializing the… and Workflow: Configuring Platform…, plus 2 more sections
  • Calls flutter, adb and xcrun

What it does

Flutter Setup Declarative Routing is an agent skill from abdulmominsakib/localmind. Configure MaterialApp.router using a package like gorouter for advanced URL-based navigation. Use when developing web applications or mobile apps that require specific deep linking and browser history support.

Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Mobile, covering Cross-platform mobile apps. It works with Flutter, Android and iOS. The repository describes itself as: A mobile application designed to provide a beautiful, fast, and privacy-respecting interface for on device LLM and local LLM servers and cloud providers. The licence is MIT.

When your agent uses it

  • Developing web applications
  • Mobile apps that require specific deep linking and browser history support

Example prompts

  • “/flutter-setup-declarative-routing”

Workflow steps

2 steps, taken from the step headings in SKILL.md.

  1. Scaffold the Application
  2. Configure the Router

What it can do on your machine

Read from SKILL.md and the folder at commit 9ff3f94. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • flutter
    • adb
    • xcrun

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Flutter Setup Declarative Routing loads about 2.1k tokens when it runs. Until then it costs about 62 tokens; SKILL.md has 414 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~62
When it runs · the whole SKILL.md, loaded when a task matches
~2.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from abdulmominsakib/localmind at commit 9ff3f94, republished under its MIT licence (© abdulmominsakib). 414 words, ~2,051 tokens.

Download SKILL.mdSave it as .claude/skills/flutter-setup-declarative-routing/SKILL.md (or your agent's skills folder).
name
flutter-setup-declarative-routing
description
Configure `MaterialApp.router` using a package like `go_router` for advanced URL-based navigation. Use when developing web applications or mobile apps that require specific deep linking and browser history support.
metadata.model
models/gemini-3.1-pro-preview
metadata.last_modified
Tue, 21 Apr 2026 21:08:03 GMT

Implementing Routing and Deep Linking

Contents

Core Concepts

Use the go_router package for declarative routing in Flutter. It provides a robust API for complex routing scenarios, deep linking, and nested navigation.

  • GoRouter: The central configuration object defining the application's route tree.
  • GoRoute: A standard route mapping a URL path to a Flutter screen.
  • ShellRoute / StatefulShellRoute: Wraps child routes in a persistent UI shell (e.g., a BottomNavigationBar). StatefulShellRoute maintains the state of parallel navigation branches.
  • Path URL Strategy: Removes the default # fragment from web URLs, essential for clean deep linking across platforms.

Workflow: Initializing the Application and Router

Follow this workflow to bootstrap a new Flutter application with go_router and configure the root routing mechanism.

Task Progress
  • Create the Flutter application.
  • Add the go_router dependency.
  • Configure the URL strategy for web/deep linking.
  • Implement the GoRouter configuration.
  • Bind the router to MaterialApp.router.
1. Scaffold the Application

Run the following commands to create the app and add the required routing package:

bash
flutter create <app-name>
cd <app-name>
flutter pub add go_router
2. Configure the Router

Define a top-level GoRouter instance. Handle authentication or state-based routing using the redirect parameter.

dart
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:flutter_web_plugins/url_strategy.dart';

void main() {
  // Use path URL strategy to remove the '#' from web URLs
  usePathUrlStrategy();
  runApp(const MyApp());
}

final GoRouter _router = GoRouter(
  initialLocation: '/',
  routes: [
    GoRoute(
      path: '/',
      builder: (context, state) => const HomeScreen(),
      routes: [
        GoRoute(
          path: 'details/:id',
          builder: (context, state) => DetailsScreen(id: state.pathParameters['id']!),
        ),
      ],
    ),
  ],
  errorBuilder: (context, state) => ErrorScreen(error: state.error),
);

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp.router(
      routerConfig: _router,
      title: 'Routing App',
    );
  }
}

Workflow: Configuring Platform Deep Linking

Configure the native platforms to intercept specific URLs and route them into the Flutter application.

Task Progress
  • Determine target platforms (iOS, Android, or both).
  • Apply conditional configuration for Android (Manifest + Asset Links).
  • Apply conditional configuration for iOS (Plist + Entitlements + AASA).
  • Run validator -> review errors -> fix.
If configuring for Android:
  1. Modify AndroidManifest.xml: Add the intent filter inside the <activity> tag for .MainActivity.
xml
<intent-filter android:autoVerify="true">
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />
    <data android:scheme="http" android:host="yourdomain.com" />
    <data android:scheme="https" />
</intent-filter>
  1. Host assetlinks.json: Serve the following JSON at https://yourdomain.com/.well-known/assetlinks.json.
json
[{
  "relation": ["delegate_permission/common.handle_all_urls"],
  "target": {
    "namespace": "android_app",
    "package_name": "com.yourcompany.yourapp",
    "sha256_cert_fingerprints": ["YOUR_SHA256_FINGERPRINT"]
  }
}]
Show full SKILL.md (162 more words)Show less
If configuring for iOS:
  1. Modify Info.plist: Opt-in to Flutter's default deep link handler. Note: If using a third-party deep linking plugin (e.g., app_links), set this to NO to prevent conflicts.
xml
<key>FlutterDeepLinkingEnabled</key>
<true/>
  1. Modify Runner.entitlements: Add the associated domain.
xml
<key>com.apple.developer.associated-domains</key>
<array>
  <string>applinks:yourdomain.com</string>
</array>
  1. Host apple-app-site-association: Serve the following JSON (without a .json extension) at https://yourdomain.com/.well-known/apple-app-site-association.
json
{
  "applinks": {
    "apps": [],
    "details": [{
      "appIDs": ["TEAM_ID.com.yourcompany.yourapp"],
      "paths": ["*"],
      "components": [{"/": "/*"}]
    }]
  }
}
Validation Loop

Run validator -> review errors -> fix.

  • Android: Test using ADB.
    bash
    adb shell 'am start -a android.intent.action.VIEW -c android.intent.category.BROWSABLE -d "https://yourdomain.com/details/123"' com.yourcompany.yourapp
  • iOS: Test using xcrun on a booted simulator.
    bash
    xcrun simctl openurl booted https://yourdomain.com/details/123

Workflow: Implementing Nested Navigation

Use StatefulShellRoute to implement persistent UI shells (like a bottom navigation bar) that maintain the state of their child routes.

Task Progress
  • Define StatefulShellRoute.indexedStack in the GoRouter configuration.
  • Create StatefulShellBranch instances for each navigation tab.
  • Implement the shell widget using StatefulNavigationShell.
dart
final GoRouter _router = GoRouter(
  initialLocation: '/home',
  routes: [
    StatefulShellRoute.indexedStack(
      builder: (context, state, navigationShell) {
        return ScaffoldWithNavBar(navigationShell: navigationShell);
      },
      branches: [
        StatefulShellBranch(
          routes: [
            GoRoute(
              path: '/home',
              builder: (context, state) => const HomeScreen(),
            ),
          ],
        ),
        StatefulShellBranch(
          routes: [
            GoRoute(
              path: '/settings',
              builder: (context, state) => const SettingsScreen(),
            ),
          ],
        ),
      ],
    ),
  ],
);

Examples

High-Fidelity Shell Widget Implementation

Implement the UI shell that consumes the StatefulNavigationShell to handle branch switching.

dart
class ScaffoldWithNavBar extends StatelessWidget {
  const ScaffoldWithNavBar({
    required this.navigationShell,
    super.key,
  });

  final StatefulNavigationShell navigationShell;

  void _goBranch(int index) {
    navigationShell.goBranch(
      index,
      // Support navigating to the initial location when tapping the active tab.
      initialLocation: index == navigationShell.currentIndex,
    );
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: navigationShell,
      bottomNavigationBar: NavigationBar(
        selectedIndex: navigationShell.currentIndex,
        onDestinationSelected: _goBranch,
        destinations: const [
          NavigationDestination(icon: Icon(Icons.home), label: 'Home'),
          NavigationDestination(icon: Icon(Icons.settings), label: 'Settings'),
        ],
      ),
    );
  }
}
Programmatic Navigation

Use the context.go() and context.push() extension methods provided by go_router.

dart
// Replaces the current route stack with the target route (Declarative)
context.go('/details/123');

// Pushes the target route onto the existing stack (Imperative)
context.push('/details/123');

// Navigates using a named route and path parameters
context.goNamed('details', pathParameters: {'id': '123'});

// Pops the current route
context.pop();

© abdulmominsakib, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/flutter-setup-declarative-routing of abdulmominsakib/localmind.

Open the folder on GitHubat commit 9ff3f94

Compare with similar skills

Flutter Setup Declarative Routing next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Flutter Setup Declarative Routing compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Flutter Setup Declarative Routing this skillabdulmominsakib/localmind268—~2.1kAutomated safety check: PassMIT
Engine Whats Newflutter/flutter179k—~978Automated safety check: PassBSD-3-Clause
SimdeckNativeScript/SimDeck153—~3.6kAutomated safety check: PassMIT
Detour Onboardingsoftware-mansion-labs/skills291—~2.8kAutomated safety check: PassNone
flutter_soloud Setupalnitak/flutter_soloud425—~3.6kAutomated safety check: NotesMIT
AI App Bridge UsemobileAiDev/ai-app-bridge227—~1.4kAutomated safety check: PassApache-2.0

Similar skills

  • Engine Whats New

    flutter/flutter

    Generates the "what's new" release summary and diff file for changes in the Flutter engine (//engine/src/flutter) between two releases (e.g., 3.47 vs 3.44).

    179k GitHub stars~978 tokensUpdated today
    MobileAuto-check passed
  • Simdeck

    NativeScript/SimDeck

    A skill your agent uses for simulator lifecycle, app install/launch, live viewing, UI inspection, touch/keyboard automation, screenshots, recordings, logs, pasteboard, hardware controls, and…

    153 GitHub stars~3.6k tokensUpdated 28 days ago
    MobileAuto-check passed
  • Detour Onboarding

    software-mansion-labs/skills

    Complete onboarding guide for developers who are new to Detour, the open-source deferred deep linking SDK by Software Mansion.

    291 GitHub stars~2.8k tokensUpdated 12 days ago
    MobileAuto-check passed
  • flutter_soloud Setup

    alnitak/flutter_soloud

    Walks through adding the flutter_soloud audio engine to a Flutter app, with per-platform setup, initialization, binary-size and logging options, and output device switching.

    425 GitHub stars~3.6k tokensUpdated today
    MobileAuto-check: notes
  • AI App Bridge Use

    mobileAiDev/ai-app-bridge

    使用 AI App Bridge 观察、操作和验证 Android、iOS、Flutter、WebView 或 Web App;适用于真实交互、流程自动化和设备诊断。

    227 GitHub stars~1.4k tokensUpdated yesterday
    MobileAuto-check passed
  • Flutter App

    ccplugins/awesome-claude-code-plugins

    Bootstrap a new Flutter mobile app with clean architecture, Riverpod, FVM-pinned SDK, current packages, and no deprecated APIs.

    970 GitHub stars~1.1k tokensUpdated 1 mo ago
    MobileAuto-check: notes

More from abdulmominsakib/localmind

All 13 skills in this repo
  • Flutter Add Widget Preview

    abdulmominsakib/localmind

    Adds interactive widget previews to the project using the previews.dart system.

    268 GitHub starsUsed in 1 repo~1.6k tokens
    Auto-check passed
  • Flutter Feature Based Architecture

    abdulmominsakib/localmind

    Design, implement, refactor, and review Flutter apps that use feature-based vertical slices, handwritten Dart models/providers, componentized StatelessWidget UI, Riverpod state management, and a…

    268 GitHub stars~2.9k tokensUpdated yesterday
    Auto-check passed
  • Flutter Add Widget Test

    abdulmominsakib/localmind

    Implement a component-level test using WidgetTester to verify UI rendering and user interactions (tapping, scrolling, entering text).

    268 GitHub starsUsed in 1 repo~1.6k tokens
    Auto-check passed
  • Architects a Flutter application using the recommended layered approach (UI, Logic, Data).

    268 GitHub starsUsed in 1 repo~1.6k tokens
    Auto-check passed
  • Flutter Build Responsive Layout

    abdulmominsakib/localmind

    Use LayoutBuilder, MediaQuery, or Expanded/Flexible to create a layout that adapts to different screen sizes.

    268 GitHub starsUsed in 1 repo~1.7k tokens
    Auto-check passed
  • Flutter Fix Layout Issues

    abdulmominsakib/localmind

    Fixes Flutter layout errors (overflows, unbounded constraints) using Dart and Flutter MCP tools.

    268 GitHub starsUsed in 1 repo~1.3k tokens
    Auto-check passed

Categories

Questions about Flutter Setup Declarative Routing

What does Flutter Setup Declarative Routing do?

Configure MaterialApp.router using a package like gorouter for advanced URL-based navigation. Flutter Setup Declarative Routing is an agent skill from abdulmominsakib/localmind.router using a package like gorouter for advanced URL-based navigation.

When should I use Flutter Setup Declarative Routing?

Flutter Setup Declarative Routing fits situations like: developing web applications; mobile apps that require specific deep linking and browser history support.

How do I install Flutter Setup Declarative Routing in Claude Code?

Run `npx skills add abdulmominsakib/localmind --skill flutter-setup-declarative-routing -a claude-code`. Or copy the skill folder (.agents/skills/flutter-setup-declarative-routing in abdulmominsakib/localmind) into .claude/skills/flutter-setup-declarative-routing in your project. Claude Code loads it when a task matches its description.

How do I install Flutter Setup Declarative Routing in Codex?

Run `npx skills add abdulmominsakib/localmind --skill flutter-setup-declarative-routing -a codex`. Or copy the skill folder (.agents/skills/flutter-setup-declarative-routing in abdulmominsakib/localmind) into .agents/skills/flutter-setup-declarative-routing in your project. Codex loads it when a task matches its description.

Can I use Flutter Setup Declarative Routing in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add abdulmominsakib/localmind --skill flutter-setup-declarative-routing -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/flutter-setup-declarative-routing, .gemini/skills/flutter-setup-declarative-routing, .github/skills/flutter-setup-declarative-routing and .opencode/skills/flutter-setup-declarative-routing in your project.

What does Flutter Setup Declarative Routing need to run?

Going by SKILL.md and its folder, Flutter Setup Declarative Routing needs the command-line tools its instructions call (flutter, adb and xcrun).

Does Flutter Setup Declarative Routing access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Flutter Setup Declarative Routing safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Flutter Setup Declarative Routing use?

Flutter Setup Declarative Routing is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Flutter Setup Declarative Routing use?

About 2.1k tokens (SKILL.md is roughly 8.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Flutter Setup Declarative Routing?

Skills that share tags, products or a category with Flutter Setup Declarative Routing: Engine Whats New (flutter/flutter, 179k stars), Simdeck (NativeScript/SimDeck, 153 stars), Detour Onboarding (software-mansion-labs/skills, 291 stars) and flutter_soloud Setup (alnitak/flutter_soloud, 425 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Flutter Setup Declarative Routing?

abdulmominsakib (a GitHub user) maintains it in abdulmominsakib/localmind, which has 268 GitHub stars. The repository holds 13 skills in this directory. The repository was last updated on October 8, 2026.

Source: abdulmominsakib/localmind on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.