Skip to main content
skill CX Codex

flutter-animations — Claude Code skill for Flutter motion

A skill that adds, fixes, refactors or explains Flutter animations, from implicit widgets to springs and Hero transitions.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add MADTeacher/mad-agents-skills --skill flutter-animations -a claude-code
Open on GitHub

What flutter-animations does

This skill makes the agent treat Flutter motion as real code, not demo snippets. It starts by reading your project: widget tree, state management, navigation, theming, tests and any animation abstractions already in place. Then it picks the smallest model that fits. State-driven property changes go to implicit widgets; lifecycle control, repeat and gesture values go to AnimationController; shared elements across routes go to Hero; sequenced reveals go to Interval; velocity, springs and flings go to simulations and ScrollPhysics.

The knowledge sits in reference files — implicit.md, explicit.md, hero.md, staggered.md, physics.md, curves.md — plus templates such as assets/templates/implicit_animation.dart. Those templates are complete demo files. Dropping one into an app means renaming classes, stripping main() and MaterialApp, adapting assets and routes, then running the analyzer again.

Controllers stay owned by the state object that owns the animation, and they get disposed. Animation state inside build is off the table. For motion users actually see, the skill checks MediaQuery.disableAnimations; if reduced-motion support cannot be added, the agent reports that as a limitation rather than skipping it. The source text is truncated, so the remaining validation steps are left out here.

What it helps with

  • add a fade-in for a card without hand-rolling a controller
  • fix jank while a list scrolls
  • move a screen transition onto Hero
  • sequence menu item reveals with Interval
  • explain when to reach for AnimatedBuilder over AnimatedWidget

Example prompts for the agent

  • add a smooth fade-in to this card with AnimatedOpacity
  • the animation stutters during scroll — check my widget
  • rewrite this screen transition as a Hero with a shared tag

How to install flutter-animations

1Skills CLI (Vercel)

npx skills add MADTeacher/mad-agents-skills --skill flutter-animations -a claude-code

2Manually: put the files in place

~/.claude/skills/flutter-animations/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/flutter-animations/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about flutter-animations

How do I install flutter-animations in Claude?

Run npx skills add MADTeacher/mad-agents-skills --skill flutter-animations -a claude-code. The skill lands at ~/.claude/skills/flutter-animations/SKILL.md.

What does flutter-animations do?

It guides the agent through adding, fixing, refactoring, debugging and explaining Flutter animations: implicit widgets, explicit controllers, Hero transitions, staggered timing, physics and curves.

What checks does the skill run after edits?

It formats the edited Dart files and runs flutter analyze on the project or the touched file. When navigation, gestures or stateful lifecycle are involved, focused tests are added too.

Source text

SKILL.md · MIT
---
name: flutter-animations
description: >-
  Add, fix, refactor, debug, test, or explain Flutter animations and motion
  effects. Use when working with implicit animations such as AnimatedContainer,
  AnimatedOpacity, AnimatedSwitcher, and TweenAnimationBuilder; explicit
  animations using AnimationController, Tween, CurvedAnimation, AnimatedWidget,
  AnimatedBuilder, and built-in transitions; Hero/shared-element route
  transitions; staggered or sequenced animations; physics-based motion,
  gestures, springs, flings, scroll physics, curves, performance, accessibility,
  reduced motion, and animation lifecycle bugs.
metadata:
  author: Stanislav [MADTeacher] Chernyshev
  version: "2.0"
---

# Flutter Animations

You are a Flutter motion implementation specialist. Build animation changes that
fit the app's existing widget structure, state model, navigation, theme, and
performance constraints.

## Principle 0

Motion must not become hidden state or unverified demo code. Before adding or
changing animation logic, inspect the target widget, lifecycle, route structure,
and existing patterns. After the change, verify analyzer-clean Dart and call out
any animation behavior that could not be run or visually checked.

## Workflow

1. Identify the user's actual request: add a new animation, fix a broken one,
   refactor animation code, debug jank/lifecycle behavior, explain a pattern, or
   provide a standalone example.
2. Inspect the local Flutter context first when code is available: widget tree,
   state management, navigation approach, assets, tests, theming, accessibility
   helpers, and existing animation abstractions.
3. Choose the smallest animation model that satisfies the behavior:
   - Use implicit animations for simple state-driven property changes.
   - Use explicit animations for lifecycle control, repeated/reversible motion,
     gestures, multiple coordinated properties, or custom transitions.
   - Use Hero for shared elements across route transitions.
   - Use staggered animation when multiple elements need sequenced or
     overlapping timing.
   - Use physics when motion depends on velocity, springs, dragging, flings, or
     scroll-like behavior.
4. Implement in the app's style. Preserve existing public APIs unless the user
   asked for a refactor. Keep controllers owned by the state object that owns the
   animation lifecycle, dispose them, and avoid creating animation state inside
   build methods.
5. Prefer production animation patterns: `AnimatedBuilder`, `AnimatedWidget`,
   built-in transitions, child caching, stable keys, and small rebuild regions.
   Use `setState()` in animation listeners only for minimal examples or when no
   narrower rebuild path is practical.
6. Respect accessibility and user settings. Check `MediaQuery.disableAnimations`
   or existing reduced-motion policy for non-essential motion, and provide a
   fast/static path when motion can distract or harm usability.
7. Validate with the strongest available local checks. At minimum, run analyzer
   on touched Dart files or the relevant Flutter project. Run widget/golden or
   integration tests when animation behavior, navigation, or gestures are part
   of the requested change.

## Decision Guide

| Need | Default approach |
|---|---|
| One property or a small set of state-driven visual changes | `AnimatedContainer`, `AnimatedOpacity`, `AnimatedAlign`, `AnimatedPadding`, `AnimatedSwitcher`, or `TweenAnimationBuilder` |
| Full lifecycle control, repeat/reverse/status, or gesture-driven values | `AnimationController` with `Tween`, `CurvedAnimation`, `AnimatedBuilder`, or `AnimatedWidget` |
| Shared visual element between routes | `Hero` with stable unique tags and compatible source/destination widget trees |
| List/menu/card reveal with offset timings | One controller with `Interval`s, or per-item animation only when lifecycle truly differs |
| Spring/fling/drag or platform scroll feel | `fling`, `animateWith`, `SpringSimulation`, gesture velocity, or platform-specific `ScrollPhysics` |
| Motion feels wrong but code works | Tune duration, curve, interval, easing, or reduced-motion behavior before adding complexity |

## Resource Routing

Read only the resources needed for the current task:

| Task | Read/use | Purpose |
|---|---|---|
| Simple state-driven animation or AnimatedSwitcher/TweenAnimationBuilder choice | `references/implicit.md`; optionally `assets/templates/implicit_animation.dart` for a standalone example | Widget options, parameters, and simple examples |
| Controller lifecycle, built-in transitions, status listeners, or reusable animated widgets | `references/explicit.md`; optionally `assets/templates/explicit_animation.dart` for a standalone example | Correct controller ownership, disposal, and rebuild patterns |
| Shared-element route transition, custom flight path, placeholder, or HeroMode | `references/hero.md`; optionally `assets/templates/hero_transition.dart` for a standalone example | Hero tags, route behavior, shuttle builders, and common pitfalls |
| Sequenced list/menu/reveal/ripple timing | `references/staggered.md`; optionally `assets/templates/staggered_animation.dart` for a standalone example | Interval timing, duration calculation, and stagger patterns |
| Spring, fling, drag, custom Simulation, or scroll physics | `references/physics.md` | Simulation setup, gesture velocity, platform physics, and tuning |
| Curve choice, custom curve, easing mismatch, or reduced-motion tuning | `references/curves.md` | Curve selection, custom curves, and accessibility notes |

Templates are complete demo files, not drop-in production modules. When using a
template inside an app, rename demo classes, remove `main()` and `MaterialApp`
wrappers, adapt assets/routes/state, and re-run analyzer.

## Constraints

- Do not invent missing routes, asset paths, theme tokens, gesture behavior, or
  state-management APIs. Inspect them or ask the user if they are absent.
- Do not add an `AnimationController` when an implicit widget gives the same
  behavior with less lifecycle risk.
- Do not leave controllers, listeners, timers, or status callbacks undisposed.
- Do not use global debug settings such as `timeDilation` in production code.
  Mention them only as a local debugging aid.
- Do not copy reference snippets blindly; adapt them to the project's Flutter
  version, lint rules, null-safety, and deprecation state.
- Do not make accessibility optional for user-facing motion. If reduced-motion
  support cannot be implemented, report the limitation.

## Validation

- Run `dart format` or the project's formatter on edited Dart files when edits
  are made.
- Run `flutter analyze` for the project, package, or specific touched Dart file.
- Run focused tests when animation changes affect navigation, gestures,
  stateful lifecycle, or user-visible regressions.
- For visual changes, inspect the running app or screenshots when feasible. If
  that is not possible, state what was validated statically and what remains
  visually unverified.
- When updating templates, verify each template as `lib/main.dart` in a minimal
  Flutter project with `flutter analyze lib/main.dart`.

© Stanislav [MADTeacher] Chernyshev · MIT · MADTeacher/mad-agents-skills

Similar skills

Everything for Mobile →

From the same set10

flutter-adaptive-ui This skill guides agents through building adaptive Flutter interfaces for mobile and desktop screens. It bases layout changes on width constraints rather than OS checks. CX Codex +1 2,000installs flutter-architecture A skill that designs and reviews Flutter app architecture: layers, MVVM, feature-first layout, DI, and patterns like Result and Command. CX Codex +1 1,700installs flutter-testing A skill for writing, fixing and debugging Flutter tests: unit, widget and integration layers, mocks, golden checks. CX Codex +1 1,500installs flutter-networking A skill for Flutter network code: HTTP/REST, WebSocket, auth and token refresh, timeouts, retries, JSON parsing, caching. Useful when adding requests or chasing network errors. CX Codex +1 722installs flutter-drift Walks the agent through Drift persistence in Flutter: tables, queries, reactive streams, schema migrations and tests. Useful whether the app already has a local database or you are adding one. CX Codex +1 671installs flutter-navigation A skill that makes your coding agent handle Flutter navigation: Navigator, go_router, deep links, redirects and browser history. CX Codex +1 589installs flutter-internationalization Automates Flutter internationalization using gen-l10n and ARB files. Solves UI string extraction, RTL layout adjustments, and generated import errors. CX Codex +1 536installs dart-drift A skill for Drift persistence in Dart CLI, server-side and non-Flutter desktop apps: tables, queries, migrations, PostgreSQL. CX Codex +1 466installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor