Skip to main content
skill CX Codex

performance-optimization · dylantarre — Claude Code skill: setup and features

Diagnoses and resolves janky UI animations and frame drops using core animation principles.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add dylantarre/animation-principles --skill performance-optimization -a claude-code
Open on GitHub

What performance-optimization does

This skill inspects UI animations to fix frame rate drops below 60fps, stuttering, and mobile battery drain. It applies Disney's animation principles to code issues. The skill converts frame-by-frame JS calculations to CSS keyframes and staggers simultaneous motions by 50-100ms.

The skill enforces GPU-accelerated rendering rules. It flags costly properties like top, left, width, and height because they trigger layout recalculations. Instead, it rewrites styles to use transform and opacity, sparingly applies will-change, and stops off-screen elements with Intersection Observer. Direct layout animation triggers forced reflows, making GPU transforms mandatory.

What it helps with

  • fix UI stutter and frame rate drops below 60fps
  • replace layout-heavy properties with GPU-accelerated transforms
  • stagger simultaneous element animations by 50-100ms
  • pause off-screen animations using Intersection Observer

Example prompts for the agent

  • Audit the hover animation in this card component to fix frame drops
  • Optimize the modal transition so it does not trigger layout recalculations
  • Stagger these list item animations to prevent simultaneous execution

How to install performance-optimization

1Skills CLI (Vercel)

npx skills add dylantarre/animation-principles --skill performance-optimization -a claude-code

2Manually: put the files in place

~/.claude/skills/performance-optimization/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/performance-optimization/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about performance-optimization

How to install performance-optimization in Claude Code?

Run npx skills add dylantarre/animation-principles --skill performance-optimization -a claude-code. The skill file is placed in ~/.claude/skills/performance-optimization/SKILL.md.

What does performance-optimization do?

It identifies bottlenecks in UI animations and converts heavy layout properties to GPU-friendly transform and opacity.

How many simultaneous animations does the skill recommend?

Its troubleshooting checklist advises keeping concurrent animations under 3-4 to prevent performance drops.

Source text

SKILL.md · MIT
---
name: performance-optimization
description: Use when animation runs slow, janky, or causes frame drops
---

# Performance Optimization

Diagnose and fix slow or janky animations using Disney's 12 principles.

## Problem Indicators
- Frame rate drops below 60fps
- Stuttering or choppy motion
- UI feels sluggish
- Battery drain on mobile
- Layout thrashing

## Diagnosis by Principle

### Straight Ahead vs Pose-to-Pose
**Issue**: Calculating every frame in real-time
**Fix**: Use pose-to-pose (keyframe) animation. Let the browser interpolate between states using CSS transitions or `will-change`.

### Timing
**Issue**: Too many simultaneous animations
**Fix**: Stagger animations. Offset start times by 50-100ms to reduce concurrent calculations.

### Secondary Action
**Issue**: Too many secondary effects
**Fix**: Remove non-essential secondary animations on low-power devices. Use `prefers-reduced-motion` query.

### Solid Drawing
**Issue**: Animating expensive properties (width, height, top, left)
**Fix**: Only animate `transform` and `opacity`. These are GPU-accelerated and skip layout/paint.

### Staging
**Issue**: Animating off-screen elements
**Fix**: Only animate what's visible. Use Intersection Observer to pause off-screen animations.

## Quick Fixes

1. **Replace JS animations with CSS** - Browser-optimized
2. **Use `transform` instead of position properties** - GPU layer
3. **Add `will-change` sparingly** - Hints to browser
4. **Reduce simultaneous animations** - Stagger or sequence
5. **Lower animation complexity on mobile** - Detect device capability

## Troubleshooting Checklist

- [ ] Check DevTools Performance tab for long frames
- [ ] Verify animations use transform/opacity only
- [ ] Count simultaneous animations (keep under 3-4)
- [ ] Test on lowest-spec target device
- [ ] Check for layout thrashing (forced reflows)
- [ ] Verify `will-change` isn't overused
- [ ] Test with CPU throttling enabled
- [ ] Check if animations pause when tab is hidden

## Code Pattern

```css
/* Fast */
.element {
  will-change: transform;
  transition: transform 200ms ease-out;
}
.element:hover {
  transform: translateY(-4px);
}

/* Slow - avoid */
.element:hover {
  top: -4px; /* Triggers layout */
}
```

© dylantarre · MIT · dylantarre/animation-principles

Similar skills

Everything for Frontend and UI →

performance-optimization by other authors comes first.

performance-optimization addyosmani An agent skill that measures before it changes code: Core Web Vitals budgets, N+1 queries, missing indexes and slow endpoints. CX Codex +1 65,200installs performance-optimization gamedev-skills A skill that turns “the game runs slow” into a measured bottleneck and a specific fix: profile first, then pool objects, batch draw calls, cut allocations. CX Codex +1 7,700installs performance-optimization Mindrally A rule set for web performance: server-side rendering, CSS, JavaScript, assets and caching. Useful when your agent writes frontend code and you want a bar to hold it to. CX Codex +1 848installs animation-performance emilkowalski A diagnostic skill that tracks down dropped frames in web animations and points to the cheaper property to animate instead. CX Codex +1 36,800installs fixing-motion-performance ibelick Audits and fixes UI animation performance issues like layout thrashing, blur lag, and scroll jank. It optimizes CSS and JS motion without switching your animation libraries. CX Codex +1 26,900installs web-performance-optimization davila7 A Claude skill that walks through why a site loads slowly and fixes the bottlenecks step by step. 3,490installs react-performance-optimization davila7 A subagent that tracks down React performance problems: wasted re-renders, bloated bundles, memory leaks. Useful when a page drags or Core Web Vitals slip. 3,935installs loading-states-and-perceived-performance dembrandt A coding-agent skill that picks the right spinner, skeleton or progress bar and makes a slow interface feel faster. CX Codex +1 871installs gsap-performance greensock An official GSAP performance skill that tells your coding agent which properties to animate and which ones cause jank. Useful when animations stutter. CX Codex +1 69,900installs

From the same set142

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor