capture-animate-restore-pattern

Capture start state, track progress, and restore exact values for temporary animations.

1|Updated Feb 15, 2026
One-click install
npx skills add https://github.com/mlinnen/mr-pumpkin --skill capture-animate-restore-pattern
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: capture-animate-restore-pattern
Source: https://github.com/mlinnen/mr-pumpkin/tree/main/.squad/skills/capture-animate-restore-pattern
Command: npx skills add https://github.com/mlinnen/mr-pumpkin --skill capture-animate-restore-pattern

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The pattern provides a robust approach to run temporary animations that overlay persistent state while ensuring the original state is restored exactly after the animation completes, preventing visual jumps.

Core Features & Use Cases

  • Three-state tracking: introduces is_{animation}, {animation}_progress, and {animation}_start_state to isolate temporary effects.
  • Controlled restoration: returns to the exact captured starting state after completion, not a generic default.
  • Real-world examples: blink, rolling eyes, and any transient overlay.

Quick Start

Implement the capture-animate-restore pattern by capturing the current state at animation start and restoring it exactly after the animation completes.

Frequently Asked Questions about capture-animate-restore-pattern

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I restore exact state after a temporary animation completes?

To restore exact state after a temporary animation, capture the starting state when the animation begins, track progress, and revert to the exact captured values upon completion to prevent visual jumps.

Why do my transient visual effects cause visual jumps when reverting to persistent state?

Transient visual effects cause visual jumps when they revert to a generic default instead of the exact captured starting state. Proper state management isolates temporary overlays from persistent state.

What is the best way to manage temporary animations that overlay persistent state?

The best way to manage temporary animations is using a three-state tracking pattern with is_animation, animation_progress, and animation_start_state variables to isolate temporary effects and ensure controlled restoration.

How do I implement a blinking eye or rolling angle animation without losing the original visual state?

Implement blinking eye or rolling angle animations by capturing the current start state, applying the temporary visual effect, and restoring the exact original values after the animation completes.

When should I not use a capture-animate-restore pattern for state management?

You should not use the capture-animate-restore pattern for permanent state changes. It is strictly designed for temporary animations that must revert exactly to their original starting state.