Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Profile, audit, and optimize frontend page performance with emphasis on animation work, memory-leak risks, long-session slowdowns, CSS animations, canvas/WebGL requestAnimationFrame loops, marquees, skeletons, GSAP/Three/Matter effects, timers, listeners, and observers. Use when the user asks to make animations performant, pause offscreen animations, look for memory leaks, profile pages that slow the computer over time, fix janky scrolling, reduce CPU/GPU use, or repeat the "only play in view" o
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-09 | ✗→✓ | ▲ Improved | 92% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 31% | 0% |
| case-15 | ✗→✓ | ▲ Improved | 30% | 0% |
| case-18 | ✗→✓ | ▲ Improved | 39% | 0% |
| case-21 | ✗→✓ | ▲ Improved | 117% | 0% |
Measure the real page before editing. The goal is not to remove motion; it is to make offscreen work stop, visible motion resume correctly, and route/unmount cleanup release long-lived resources.
Use Codex Browser when available, especially for localhost pages. Do not use Chrome unless the user explicitly asks for it.
AGENTS.md or local instructions.git status --short early.requestAnimationFrame, setInterval, setTimeout, canvas/WebGL/physics components, media elements, GSAP timelines/tweens, and existing visibility utilities.animationName, animationPlayState, and visibility. Include ::before and ::after.null or the Browser sandbox blocks monkey-patching, say so and rely on stable observable counts plus source audit.references/browser-profiling.md for a reusable Codex Browser evaluator.IntersectionObserver that toggles a stable class such as is-offscreen on sections and animated child elements.cssmain > section.is-offscreen .expensive-animation, .expensive-animation.is-offscreen { animation-play-state: paused !important; }
::before and ::after pause selectors where needed.requestAnimationFrame when offscreen.data-animation-active when it helps browser verification.prefers-reduced-motion if the component already does, and avoid introducing React render loops for scroll/animation state.IntersectionObserver, ResizeObserver, MutationObserver, and custom subscriptions.isDisposed flag and dispose loaded resources if they resolve after unmount.ref.current values inside the effect before returning cleanup if lint warns the ref may change.offscreenRunningCount: 0 for the page sections under test.bashgit diff --check npm run lint npm run build
bashrm -f /tmp/<task>-index GIT_INDEX_FILE=/tmp/<task>-index git read-tree HEAD # Apply only the intended hunks to the temporary index. GIT_INDEX_FILE=/tmp/<task>-index git diff --cached --check GIT_INDEX_FILE=/tmp/<task>-index git commit -m "Pause offscreen <page> animations" git restore --staged <files> 2>/dev/null || true
is-offscreen plus element-level is-offscreen for long sections where below-the-fold child animations can still run.COURSES_PAGE_ANIMATION_VISIBILITY_SELECTOR.IntersectionObserver thresholds around 0.01 for animation gating.animation-play-state cannot pause JavaScript render loops.isDisposed guards for image/video/texture/data loaders that may resolve after unmount.animation-play-state covers pseudo-elements or JavaScript RAF loops.Other measured skills in the registry, with their headline benchmark lift.