agentleFS
ariaraminariaramin/flutter-skills/skills/flutter-confetti-engineering/SKILL.md

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.

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
  1. Distinctive:

    Treat confetti as a real-time Dart particle simulation and custom-paint workload.

    line 8
  2. Distinctive:

    Keep celebrations brief, purposeful, accessible, finite, simple, and measured.

    line 9
  3. Very specific:

    Never create a controller or call play() from build().

    line 39
  4. Very specific:

    Prefer finite event-driven effects.

    line 44
  5. Distinctive:

    Keep one purposeful emitter rather than overlapping full-screen systems.

    line 45
  6. Distinctive:

    Do not share one controller across independent emitters.

    line 46
  7. Very specific:

    Keep controller identity and core particle configuration stable while a ConfettiWidget is mounted.

    line 47
  8. Distinctive:

    Start performance tuning with active particle load, emission duration and frequency, simultaneous emitters, and residence time.

    line 49
  9. Very specific:

    Keep pauseEmissionOnLowFrameRate enabled unless measurement proves a product reason to disable it.

    line 51
  10. Distinctive:

    Prefer simple particle paths, no stroke for dense effects, modest particle size, and limited alpha-heavy coverage.

    line 53
  11. Very specific:

    Do not add a RepaintBoundary immediately around ConfettiWidget.

    line 55
  12. Very specific:

    Avoid placing expensive content in ConfettiWidget.child when an overlay sibling is simpler.

    line 57
  13. Distinctive:

    Keep decorative confetti non-interactive and avoid blocking pointer input.

    line 59
  14. Very specific:

    Stop or dispose route-owned effects when their route leaves.

    line 62
  15. Distinctive:

    Never make business success, navigation, rewards, or persistence depend on the animation completing.

    line 64
  16. Distinctive:

    Use this decision order:

    line 72
  17. Distinctive:

    Use no confetti when reduced motion is requested or the event does not merit a celebration.

    line 74
  18. Distinctive:

    Use a short localized burst for lightweight success feedback near its source.

    line 76
  19. Distinctive:

    Use one short standard emitter for a normal celebration.

    line 77
  20. Distinctive:

    Use one bounded full-screen overlay for rare, high-value events.

    line 78
  21. Distinctive:

    Add custom shapes only when branding value justifies path/raster cost.

    line 79
  22. Distinctive:

    Add a global host only when celebrations genuinely cross multiple routes or features.

    line 80
  23. Distinctive:

    Do not add global architecture for one button or maximize particles before the smallest useful preset is measured.

    line 83
  24. Very specific:

    Read only the relevant sections of references/production-guide.md.

    line 88
  25. Distinctive:

    Use these search headings:

    line 95
  26. Distinctive:

    Keep overlay scope local unless multiple routes/features truly need a global host.

    line 122
  27. Distinctive:

    Run the narrowest relevant Flutter analysis/widget checks, then profile a representative production scene.

    line 129
  28. Very specific:

    Avoid pixel-perfect golden tests for random particles and avoid pumpAndSettle() on looping effects.

    line 143

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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:

  1. Inspect pubspec.yaml, pubspec.lock, Flutter/Dart constraints, target platforms, and the locked confetti version.
  2. Find every ConfettiController, ConfettiWidget, play(), stop(), disposal path, event trigger, overlay host, and reduced-motion branch.
  3. Identify the exact business event and whether presentation is local, full-screen, or app-wide.
  4. Record controller duration, shouldLoop, particle count, emission frequency, trajectory, gravity/drag, size, path complexity, stroke, clipping, and number of simultaneous emitters.
  5. Inspect parent rebuild frequency, scene overdraw, blur/video/background cost, route/app lifecycle, and controller/config identity stability.
  6. Distinguish duplicate state rebuilds from legitimate repeated celebration events.
  7. 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 ConfettiController at a stable lifecycle boundary and dispose it.
  • Never create a controller or call play() from build().
  • 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 ConfettiWidget is mounted; replace deliberately when configuration changes.
  • Start performance tuning with active particle load, emission duration and frequency, simultaneous emitters, and residence time.
  • Keep pauseEmissionOnLowFrameRate enabled 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 RepaintBoundary immediately around ConfettiWidget; the package already contains one.
  • Avoid placing expensive content in ConfettiWidget.child when 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:

  1. Use no confetti when reduced motion is requested or the event does not merit a celebration.
  2. Use a short localized burst for lightweight success feedback near its source.
  3. Use one short standard emitter for a normal celebration.
  4. Use one bounded full-screen overlay for rare, high-value events.
  5. Add custom shapes only when branding value justifies path/raster cost.
  6. 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.md

Use these search headings:

TaskSearch headings
Understand rendering cost or current APIs`Package ArchitectureFrame PipelineCost CategoriesWidget rebuild costUI-thread simulation costRaster/GPU costMemory costBattery costCurrent APIConfettiControllerConfettiWidget`
Implement or fix controller lifecycle`Controller LifecycleBasic Production PatternNever Create the Controller in buildController Outside a WidgetStable Controller IdentityStable Particle ConfigurationController Duration MutationplayRepeated playstopImmediate StopDuration vs Visible DurationExplicitly Choose DurationshouldLoopLoop Ownership`
Understand particle pooling and validate parameters`Particle PoolParticle Reuse DetailsParticleStatsParameter GuideParameter Validation`
Tune particle count, emission, or high-refresh behavior`Particle Count and EmissionEmission Frequency SemanticsHigh-Refresh ConsequenceActive Particle Mental ModelFirst Performance Tuning OrderpauseEmissionOnLowFrameRateSparse Confetti Under Load`
Tune physics, layout, clipping, or responsive behavior`DirectionalityDirectionalExplosiveBlast ForceGravityParticle DragParticle LifetimeCurrent Offscreen BoundariesParticle SizeLarge ScreenscanvasClippingResponsive Layout Caveat`
Build custom shapes or tune paint cost`Custom Particle ShapesWhen Custom Paths Are BuiltDo Not Over-Cache Custom PathsPath ComplexityComplex Logo ParticlesPaint OperationsColorsTransparency`
Place local/full-screen effects or design overlays`Widget PlacementchildInternal RepaintBoundaryExpensive Background ContentPointer InteractionFull-Screen vs Localized EffectsContinuous ConfettiMultiple Confetti WidgetsController SharingGlobal Celebration Overlay`
Fix event semantics, duplicate triggers, or replays`Trigger ArchitectureState vs EventDuplicate Trigger GuardsRepeated Legitimate CelebrationsReplayClean RestartState Management IntegrationOne-Time Effects`
Implement accessibility and lifecycle behavior`Accessibility and Reduced MotionRecommended Reduced-Motion BehaviorMotion Preference Changes During PlaybackApp and Route LifecycleRoute DisposalLong-Lived Global LoopsTickerModeRebuild BehaviorNo Side Effects in build`
Diagnose CPU, raster, memory, battery, refresh-rate, or device performance`Performance RulesCPU CostAllocation ChurnRaster / GPU CostOverdrawMemoryBattery EfficiencyHigh Refresh RateHigh-Refresh Density CaveatLow-End Device StrategyConceptual Performance PresetsResponsive DesignWebDesktopdisplayTarget`
Test, profile, debug, review, or prepare production`TestingRandomness and Golden TestspumpAndSettleWidget Test StrategyTest Reduced MotionPerformance Profiling WorkflowDo Not Trust Debug PerformanceDebugging GuideAnti-PatternsImplementation ChecklistPerformance Audit ChecklistCode Review ChecklistProduction Readiness ChecklistVersion-Sensitive AreasDecision FrameworkProfiling 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.