home / skills / harborgrid-justin / lexiflow-premium / concurrent-safe-animation
/frontend/.github-skills/concurrent-safe-animation
This skill helps implement concurrency-safe animations that resist re-entrancy and interrupted updates, ensuring glitch-free rendering and stable layouts.
npx playbooks add skill harborgrid-justin/lexiflow-premium --skill concurrent-safe-animationReview the files below or copy the command above to add this skill to your agents.
---
name: concurrent-safe-animation
description: Implement animation systems resilient to concurrent rendering and interrupted updates.
---
# Concurrent-Safe Animation (React 18)
## Summary
Implement animation systems resilient to concurrent rendering and interrupted updates.
## Key Capabilities
- Prevent animation glitches caused by re-entrancy.
- Coordinate animation timelines with render commits.
- Maintain stable layout measurements under transitions.
## PhD-Level Challenges
- Prove animation continuity under interrupted renders.
- Model animation schedules as concurrent state machines.
- Evaluate trade-offs between animation fidelity and throughput.
## Acceptance Criteria
- Demonstrate glitch-free animations under rapid updates.
- Provide tests for interrupted animation scenarios.
- Document synchronization strategy with rendering.
This skill implements animation systems that remain correct and smooth when rendering is concurrent or updates are interrupted. It focuses on preventing re-entrancy glitches, keeping timeline coordination with render commits, and stabilizing layout measurements during transitions. The result is predictable, testable animations in environments like React 18 or any concurrent renderer.
The skill instruments animation timelines to observe render commit boundaries and to defer or resume animation steps when renders are interrupted. It uses stable measurement snapshots and idempotent update scheduling to avoid layout thrash and re-entrancy bugs. It also provides test harnesses to simulate rapid state changes and verify continuity across interrupted renders.
How does this handle interrupted renders?
Animations use commit-aware scheduling and idempotent state so a partially-applied step is rolled forward or back safely on the next commit.
Will this harm animation smoothness?
It prioritizes visual stability; in some cases you may reduce per-frame fidelity to guarantee no visual glitches under preemption.