iamantoniodinuzzo/claude-flutter/page-transitions-init
Claude Code and agent skill by iamantoniodinuzzo/claude-flutter
- community
Checking that the SKILL.md file is still in the repository.
Generate an adaptive `PageTransitionsTheme` for a Flutter app (native transitions on installed Android/iOS, instant on web/desktop) — writes the theme file with a `kIsWeb` gate and a zero-duration builder, wires `pageTransitionsTheme:` into every light and dark theme construction (`ThemeData`, `FlexThemeData`, `copyWith` builders), and optionally migrates a blanket `NoTransitionPage` router helper to plain `builder:` routes with balanced-paren rewriting, keeping `CustomTransitionPage` one-offs.…
Install
npx vskill@latest install iamantoniodinuzzo/claude-flutter/page-transitions-initSKILL.md
The same SKILL.md was published earlier as iamantoniodinuzzo/claude-flutter/page-transitions-init.
page-transitions-init
Runtime and resources
Use the current agent's native file, search, shell, and question tools; plain-text questions and direct sequential scans are valid fallbacks. Subagents are optional and require host permission. Bundled paths below are relative to this installed skill directory; application paths are relative to the target Flutter project. Resolve sibling skills through the installed skill registry (or sibling directories), never by assuming a skills/ folder in the application. If a required dependency is absent, name it and report the affected step as unavailable; never invent its rules or claim complete coverage.
Generates the adaptive PageTransitionsTheme, wires it into the app theme(s) and, opt-in, removes the blanket NoTransitionPage helper from the router. Fix companion of ROUTER-03 (audit-presentation-layer). Run phases in order.
Before coding, load the references in parallel:
references/platform-matrix.mdreferences/router-migration.md
Usage: /page-transitions-init [app-path]
Phase 0 — Classify
- Melos: if
melos.yamlexists at the root, resolve the app perflutter-melos-workspaceconventions. If
app-path is missing and several apps exist, ask which one (one question). Paths below are relative to the app.
- Platforms: read
flutter.platformsinpubspec.yaml(fallback: platform folders present). If the target is
web only, abort: transitions should be instant there, nothing to generate.
- INIT vs AUDIT:
- no
pageTransitionsTheme:anywhere inlib/and noNoTransitionPagehelper → INIT - a theme exists and/or a helper exists → AUDIT: report the mismatch (theme set but bypassed by the helper,
light/dark mismatch, no strategy defined) instead of overwriting. Never overwrite an existing `pageTransitionsTheme` without showing the diff and asking.
Phase 1 — Discover
- Router: find
GoRouter(; count routes built withpageBuilder:(split: helper /NoTransitionPage/
CustomTransitionPage / MaterialPage) vs builder:. Include StatefulShellRoute branches.
- Themes: find every
ThemeData(,ThemeData.light/dark(,FlexThemeData.light/dark(and.copyWith(theme
builder. Light and dark are often built in separate places (separate providers/files): both must get the theme. List each site with its file and line.
- Language level: Dart SDK constraint
>= 3.10→.android:dot-shorthands allowed; otherwise emit
TargetPlatform.android.
- Conventions: where theme constants live (
core/theme/domain/,theme/, …), file naming, package vs relative
imports, existing kIsWeb usage.
Phase 2 — Decisions
One the agent's question tool, or a plain-text question round (recommendation first, max 1–2 blocking questions):
- Platform matrix: Android Zoom + iOS Cupertino, web/desktop instant (recommended) / Android Predictive Back
(Android 14+) / fade-through / native on every platform.
- Routes that must stay instant on mobile (kiosk/cockpit-style full-screen): keep an explicit
NoTransitionPage
(recommended when any exist) / follow the theme.
- Router migration now (opt-in) or theme only. Skip the question when no helper exists.
Phase 3 — Generate
- Theme file
app_page_transition_theme.dart(name/folder from discovered convention) from
platform-matrix.md: const PageTransitionsTheme, private zero-duration builder, kIsWeb gate on android/iOS (required: mobile browsers report android/iOS).
- Wire into every discovered theme:
pageTransitionsTheme: appPageTransitionsThemeas a constructor argument;
for FlexThemeData use its own pageTransitionsTheme parameter; otherwise copyWith. Add the import in each file.
- Router migration (opt-in) per
router-migration.md: remove the helper, rewritepageBuilder: ... => helper(X)
to builder: ... => X with balanced-paren rewriting (not regex-only), strip orphan trailing commas, run dart format on the router file and warn that the diff will include reformatting.
- Preserve every
CustomTransitionPageand deliberately keptNoTransitionPageuntouched; list them.
Phase 4 — Verify
dart analyzeon touched files (flutter-analyze-targeted); run router/redirect tests.- Print a manual checklist: push animates on Android/iOS device or emulator; instant on Chrome; **dark theme behaves
like light** (most common miss).
- Flag: widget tests use the default test platform (android), so navigation may now animate.
pumpAndSettleis fine;
tests with a single pump() after navigation may need adjusting.
Phase 5 — Summary
List files created/modified, decisions, theme sites wired (light + dark), routes migrated, one-offs kept, and the checklist. If the repo keeps a hand-curated CHANGELOG, remind the user to add an entry; do not edit it blindly.
Pitfalls
NoTransitionPagenever asks the theme: setting a theme alone changes nothing while the helper exists.- The
kIsWebgate is mandatory, not optional. - Dark theme built elsewhere is silently left without the theme.
- Naive paren matching leaves orphan
,lines forhelper(\n X,\n ). dart formatreflows unrelated lines in the router file.StatefulShellRoute.indexedStack: branch switches never animate; only pushes inside a branch do.- Predictive Back needs
android:enableOnBackInvokedCallback="true"in the manifest to take effect.
AUDIT branch
When a theme and/or helper already exists, do not edit. Report against ROUTER-03 (../audit-presentation-layer/rules/CATALOG.md): theme set but bypassed by the helper; no transition strategy defined; theme present on fewer constructions than ThemeData(/FlexThemeData.*( calls. Show the diff of any proposed change and edit only what the user approves.
Notes
- Related skills:
audit-presentation-layer(ROUTER-03),flutter-go-router(§ Page Transitions),
flutter-melos-workspace, flutter-analyze-targeted.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/page-transitions-init/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/iamantoniodinuzzo/claude-flutter/page-transitions-init)