Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add skills/flutter/agent-plugins/flutter-setup-declarative-routingnpx skills add flutter/agent-plugins --skill flutter-setup-declarative-routinggit clone --depth 1 https://github.com/flutter/agent-pluginsWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00046 | $0.01900 |
| Opus 5 | $0.00023 | $0.00950 |
| Sonnet 5 | $0.00009 | $0.00380 |
| Haiku 4.5 | $0.00005 | $0.00190 |
Grade A, and why
flutter-setup-declarative-routing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
Copies of this mod
1 near-identical copy found in the catalogue:
- flutter-setup-declarative-routing — 86% identical, 9 lines differ
How it starts
The opening of the file, as written. The whole thing — 256 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Implementing Routing and Deep Linking
Contents
- Core Concepts
- Workflow: Initializing the Application and Router
- Workflow: Configuring Platform Deep Linking
- Workflow: Implementing Nested Navigation
- Examples
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).StatefulShellRoutemaintains 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_routerdependency. - Configure the URL strategy for web/deep linking.
- Implement the
GoRouterconfiguration. - Bind the router to
MaterialApp.router.
1. Scaffold the Application
Run the following commands to create the app and add the required routing package:
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.
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',
);
}
}
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 256 lines · 46 tokens per session scan A 3a52fc5663cf
flutter-setup-declarative-routing is a skill published in the GitHub repository flutter/agent-plugins (2,895 stars, last pushed 3d ago), licensed BSD-3-Clause. It adds 46 tokens to every session and 1,900 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
upgrade-browser
Upgrade browser versions (Chrome or Firefox) in the Flutter Web Engine and/or Framework tests. Use when asked to roll or upgrade Chrome or Firefox to a newer version.
generate-token-map
Maps all Figma design tokens from figma-variables.md to their equivalent C++ (Views) identifiers, CSS (WebUI) variables, and Clank (Android) resource attributes/macros/methods in Chromium, and saves the formatted mapping table to the assets directory of the Chrome Design System project. Use this skill when asked to…
android-test-batching
Guide for auditing and applying batching annotations (@Batch) and AutoReset rules (AutoResetCtaTransitTestRule) to Android javatests in Chromium. Use this skill when optimizing Java instrumentation test runtimes, resolving test state leaks, or migrating tests to batched execution.
loadline
Running and analyzing LoadLine 1 and 2 benchmarks on Android using Crossbench. Use when you need to measure page loading performance, evaluate performance-related changes in Chrome, or collect Perfetto traces with realistic Chrome workload.
flow
Use when you need to run Flow type checking, or when seeing Flow type errors in React code.
keep-sorted
Automatically detects misordered lists in code (like Android XMLs), injects go/keep-sorted tags, sorts them, and creates CLs.