flutter-confetti-engineering
Skill8 starsChanged 48 days agoMITView on GitHub
Design, implement, review, debug, test, profile, and optimize production celebration effects in Flutter with the confetti package. Use when a task involves ConfettiController, ConfettiWidget, celebration bursts, local or app-wide confetti overlays, particle count/emissionFrequency/blast force/gravity/drag/lifetime tuning, shouldLoop, pauseEmissionOnLowFrameRate, custom createParticlePath shapes, controller leaks, repeated or duplicate triggers, reduced-motion behavior, high CPU/raster cost, memory growth, low-end or 90/120 Hz performance, or confetti widget tests. Do not use for general Flutter animations, transitions, Lottie/Rive effects, native particle systems, or non-confetti CustomPainter work.
In this repository70 other files it gives its agents.
- camerawesome-flutterSkill
- dart-args-production-cliSkill
- dart-flutter-equatable-engineeringSkill
- dart-flutter-ffi-systems-engineeringSkill
- dart-metaSkill
- document-camera-frameSkill
- document-scan-flutterSkill
- figma-to-flutter-expertSkill
- flutter-animations-production-engineeringSkill
- flutter-app-hardening-reverse-engineeringSkill
- flutter-app-icon-engineeringSkill
- flutter-application-security-engineeringSkill
- flutter-app-links-deep-link-engineeringSkill
- flutter-cachingSkill
- flutter-concurrency-memory-performanceSkill
- flutter-dart-package-engineeringSkill
- flutter-design-system-from-design-mdSkill
- flutter-dio-cache-interceptor-engineeringSkill
- flutter-dio-engineeringSkill
- flutter-doc-scannerSkill
- flutter-drift-persistence-engineeringSkill
- flutter-expert-tipsSkill
- flutter-firebase-analyticsSkill
- flutter-firebase-core-engineeringSkill
- flutter-firebase-messagingSkill
- flutter-get-it-injectable-dependency-injectionSkill
- flutter-go-router-engineeringSkill
- flutter-hive-persistence-engineeringSkill
- flutter-image-performanceSkill
- flutter-image-picker-production-engineeringSkill
- flutter-lints-static-analysis-engineeringSkill
- flutter-local-notifications-production-engineeringSkill
- flutter-memory-leak-engineeringSkill
- flutter-mobile-developmentSkill
- flutter-motion-engineeringSkill
- flutter-multi-environmentSkill
- flutter-native-splash-engineeringSkill
- flutter-package-plugin-selectionSkill
- flutter-path-provider-production-storageSkill
- flutter-performance-jank-optimizationSkill
- flutter-permission-handler-engineeringSkill
- flutter-pinputSkill
- flutter-production-build-releaseSkill
- flutter-production-engineeringSkill
- flutter-production-loggingSkill
- flutter-pro-image-editor-engineeringSkill
- flutter-secure-storage-security-engineeringSkill
- flutter-sentry-engineeringSkill
- flutter-share-plus-engineeringSkill
- flutter-skeletonizer-engineeringSkill
- flutter-squadron-concurrency-engineeringSkill
- flutter-supabase-engineeringSkill
- flutter-svg-engineeringSkill
- flutter-ui-performance-engineeringSkill
- flutter-url-launcher-engineeringSkill
- flutter-video-player-production-engineeringSkill
- flutter-webview-production-engineeringSkill
- freezed-production-engineeringSkill
- html-to-flutterSkill
- hydrated-blocSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
28 rules. About 0 are common, 19 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈19
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Treat confetti as a real-time Dart particle simulation and custom-paint workload.
- Distinctive: line 9
Keep celebrations brief, purposeful, accessible, finite, simple, and measured.
- Very specific: line 39
Never create a controller or call play() from build().
- Very specific: line 44
Prefer finite event-driven effects.
- Distinctive: line 45
Keep one purposeful emitter rather than overlapping full-screen systems.
- Distinctive: line 46
Do not share one controller across independent emitters.
- Very specific: line 47
Keep controller identity and core particle configuration stable while a ConfettiWidget is mounted.
- Distinctive: line 49
Start performance tuning with active particle load, emission duration and frequency, simultaneous emitters, and residence time.
- Very specific: line 51
Keep pauseEmissionOnLowFrameRate enabled unless measurement proves a product reason to disable it.
- Distinctive: line 53
Prefer simple particle paths, no stroke for dense effects, modest particle size, and limited alpha-heavy coverage.
- Very specific: line 55
Do not add a RepaintBoundary immediately around ConfettiWidget.
- Very specific: line 57
Avoid placing expensive content in ConfettiWidget.child when an overlay sibling is simpler.
- Distinctive: line 59
Keep decorative confetti non-interactive and avoid blocking pointer input.
- Very specific: line 62
Stop or dispose route-owned effects when their route leaves.
- Distinctive: line 64
Never make business success, navigation, rewards, or persistence depend on the animation completing.
- Distinctive: line 72
Use this decision order:
- Distinctive: line 74
Use no confetti when reduced motion is requested or the event does not merit a celebration.
- Distinctive: line 76
Use a short localized burst for lightweight success feedback near its source.
- Distinctive: line 77
Use one short standard emitter for a normal celebration.
- Distinctive: line 78
Use one bounded full-screen overlay for rare, high-value events.
- Distinctive: line 79
Add custom shapes only when branding value justifies path/raster cost.
- Distinctive: line 80
Add a global host only when celebrations genuinely cross multiple routes or features.
- Distinctive: line 83
Do not add global architecture for one button or maximize particles before the smallest useful preset is measured.
- Very specific: line 88
Read only the relevant sections of references/production-guide.md.
- Distinctive: line 95
Use these search headings:
- Distinctive: line 122
Keep overlay scope local unless multiple routes/features truly need a global host.
- Distinctive: line 129
Run the narrowest relevant Flutter analysis/widget checks, then profile a representative production scene.
- Very specific: line 143
Avoid pixel-perfect golden tests for random particles and avoid pumpAndSettle() on looping effects.
≈ “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.
Files
Flutter Confetti Engineering
Treat confetti as a real-time Dart particle simulation and custom-paint workload. Keep celebrations brief, purposeful, accessible, finite, simple, and measured.
Start with evidence
Before changing code:
- Inspect
pubspec.yaml,pubspec.lock, Flutter/Dart constraints, target platforms, and the lockedconfettiversion. - Find every
ConfettiController,ConfettiWidget,play(),stop(), disposal path, event trigger, overlay host, and reduced-motion branch. - Identify the exact business event and whether presentation is local, full-screen, or app-wide.
- Record controller duration,
shouldLoop, particle count, emission frequency, trajectory, gravity/drag, size, path complexity, stroke, clipping, and number of simultaneous emitters. - Inspect parent rebuild frequency, scene overdraw, blur/video/background cost, route/app lifecycle, and controller/config identity stability.
- Distinguish duplicate state rebuilds from legitimate repeated celebration events.
- Profile representative effects in profile mode on realistic hardware before making advanced rendering changes.
The bundled guide was validated against confetti 0.8.0 on 2026-08-11. Use the
installed package source/API as the truth when versions differ, especially for
defaults, emission semantics, delta time, particle pooling, path callbacks,
offscreen retirement, and low-frame suppression.
Preserve these invariants
- Own every
ConfettiControllerat a stable lifecycle boundary and dispose it. - Never create a controller or call
play()frombuild(). - Trigger confetti from a meaningful one-time application event, not persistent success state or rendering side effects.
- Explicitly choose a short controller duration; do not inherit a long default accidentally.
- Prefer finite event-driven effects; avoid indefinite
shouldLoop: true. - Keep one purposeful emitter rather than overlapping full-screen systems.
- Do not share one controller across independent emitters.
- Keep controller identity and core particle configuration stable while a
ConfettiWidgetis mounted; replace deliberately when configuration changes. - Start performance tuning with active particle load, emission duration and frequency, simultaneous emitters, and residence time.
- Keep
pauseEmissionOnLowFrameRateenabled unless measurement proves a product reason to disable it. - Prefer simple particle paths, no stroke for dense effects, modest particle size, and limited alpha-heavy coverage.
- Do not add a
RepaintBoundaryimmediately aroundConfettiWidget; the package already contains one. - Avoid placing expensive content in
ConfettiWidget.childwhen an overlay sibling is simpler. - Keep decorative confetti non-interactive and avoid blocking pointer input.
- Respect reduced-motion preferences by suppressing decorative full-screen effects or substituting low/no-motion feedback.
- Stop or dispose route-owned effects when their route leaves; bound global
loops and respect
TickerMode/app lifecycle. - Never make business success, navigation, rewards, or persistence depend on the animation completing.
- Measure UI and raster frame time separately; debug-mode jank is not production evidence.
- Validate lower-end and high-refresh devices when those targets matter.
Choose the smallest effect
Use this decision order:
- Use no confetti when reduced motion is requested or the event does not merit a celebration.
- Use a short localized burst for lightweight success feedback near its source.
- Use one short standard emitter for a normal celebration.
- Use one bounded full-screen overlay for rare, high-value events.
- Add custom shapes only when branding value justifies path/raster cost.
- Add a global host only when celebrations genuinely cross multiple routes or features.
Do not add global architecture for one button or maximize particles before the smallest useful preset is measured.
Route to the production guide
Read only the relevant sections of references/production-guide.md. Locate
sections before reading them with:
rg -n '^#{1,3} (SECTION|RELATED SECTION)$' references/production-guide.mdUse these search headings:
| Task | Search headings | |||||||||||||||
| Understand rendering cost or current APIs | `Package Architecture | Frame Pipeline | Cost Categories | Widget rebuild cost | UI-thread simulation cost | Raster/GPU cost | Memory cost | Battery cost | Current API | ConfettiController | ConfettiWidget` | |||||
| Implement or fix controller lifecycle | `Controller Lifecycle | Basic Production Pattern | Never Create the Controller in build | Controller Outside a Widget | Stable Controller Identity | Stable Particle Configuration | Controller Duration Mutation | play | Repeated play | stop | Immediate Stop | Duration vs Visible Duration | Explicitly Choose Duration | shouldLoop | Loop Ownership` | |
| Understand particle pooling and validate parameters | `Particle Pool | Particle Reuse Details | ParticleStats | Parameter Guide | Parameter Validation` | |||||||||||
| Tune particle count, emission, or high-refresh behavior | `Particle Count and Emission | Emission Frequency Semantics | High-Refresh Consequence | Active Particle Mental Model | First Performance Tuning Order | pauseEmissionOnLowFrameRate | Sparse Confetti Under Load` | |||||||||
| Tune physics, layout, clipping, or responsive behavior | `Directionality | Directional | Explosive | Blast Force | Gravity | Particle Drag | Particle Lifetime | Current Offscreen Boundaries | Particle Size | Large Screens | canvas | Clipping | Responsive Layout Caveat` | |||
| Build custom shapes or tune paint cost | `Custom Particle Shapes | When Custom Paths Are Built | Do Not Over-Cache Custom Paths | Path Complexity | Complex Logo Particles | Paint Operations | Colors | Transparency` | ||||||||
| Place local/full-screen effects or design overlays | `Widget Placement | child | Internal RepaintBoundary | Expensive Background Content | Pointer Interaction | Full-Screen vs Localized Effects | Continuous Confetti | Multiple Confetti Widgets | Controller Sharing | Global Celebration Overlay` | ||||||
| Fix event semantics, duplicate triggers, or replays | `Trigger Architecture | State vs Event | Duplicate Trigger Guards | Repeated Legitimate Celebrations | Replay | Clean Restart | State Management Integration | One-Time Effects` | ||||||||
| Implement accessibility and lifecycle behavior | `Accessibility and Reduced Motion | Recommended Reduced-Motion Behavior | Motion Preference Changes During Playback | App and Route Lifecycle | Route Disposal | Long-Lived Global Loops | TickerMode | Rebuild Behavior | No Side Effects in build` | |||||||
| Diagnose CPU, raster, memory, battery, refresh-rate, or device performance | `Performance Rules | CPU Cost | Allocation Churn | Raster / GPU Cost | Overdraw | Memory | Battery Efficiency | High Refresh Rate | High-Refresh Density Caveat | Low-End Device Strategy | Conceptual Performance Presets | Responsive Design | Web | Desktop | displayTarget` | |
| Test, profile, debug, review, or prepare production | `Testing | Randomness and Golden Tests | pumpAndSettle | Widget Test Strategy | Test Reduced Motion | Performance Profiling Workflow | Do Not Trust Debug Performance | Debugging Guide | Anti-Patterns | Implementation Checklist | Performance Audit Checklist | Code Review Checklist | Production Readiness Checklist | Version-Sensitive Areas | Decision Framework | Profiling Interpretation` |
For a full performance or production-readiness audit, read the entire guide after completing the repository inventory.
Implement at the event and lifecycle boundaries
- Fix controller leaks and repeated play calls in the shared lifecycle/event owner rather than adding guards to every rebuild.
- Reuse a controller for legitimate repeated events during one mounted lifetime; do not allocate a controller per celebration.
- Convert persistent state into a consumable presentation event where the existing state-management architecture supports it.
- Keep overlay scope local unless multiple routes/features truly need a global host.
- Fix measured frame cost by reducing emitted work before adding rendering abstractions or isolates.
Validate the result
Run the narrowest relevant Flutter analysis/widget checks, then profile a representative production scene. Cover changed paths from this matrix:
- controller creation, stable identity, play/stop/replay, and disposal;
- duplicate rebuild/event handling and legitimate repeated celebrations;
- finite duration and loop shutdown;
- reduced motion at startup and when preference changes during playback;
- route/app lifecycle and global overlay behavior;
- UI and raster frame times with and without confetti;
- particle high-watermark/memory after repeated bursts;
- low-end and 60/90/120 Hz devices when relevant;
- localized/full-screen layout, pointer behavior, and responsive geometry;
- custom paths and random behavior with deterministic structural tests.
Avoid pixel-perfect golden tests for random particles and avoid
pumpAndSettle() on looping effects. Report untested device and performance
paths explicitly.
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
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.

