performance-optimization

performance-optimization is a skill for Claude Code, Codex from dylantarre/animation-principles. It costs 17 tokens per session (528 once invoked), scanned A, original, MIT.

A guide to diagnosing and improving slow or choppy web animations. It focuses on keeping movement smooth while reducing work for the browser and mobile devices.

In plain words
What is it for?
Use it to choose efficient CSS properties, stagger simultaneous animations, pause off-screen movement, and reduce effects on low-power devices.
Why use it?
It helps address frame drops, sluggish interfaces, layout recalculations, and battery drain caused by expensive or excessive animation.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to choose efficient CSS properties, stagger simultaneous animations, pause off-screen movement, and reduce effects on low-power devices.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dylantarre/animation-principles/performance-optimization
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add dylantarre/animation-principles --skill performance-optimization
Clone the repo
git clone --depth 1 https://github.com/dylantarre/animation-principles

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for performance-optimization

README.md
[![agentmods](https://agentmods.dev/badge/skills/dylantarre/animation-principles/performance-optimization/github.svg)](https://agentmods.dev/skills/dylantarre/animation-principles/performance-optimization)
Your own site
<a href="https://agentmods.dev/skills/dylantarre/animation-principles/performance-optimization"><img src="https://agentmods.dev/badge/skills/dylantarre/animation-principles/performance-optimization/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for performance-optimization

Your own site · 80×15
<a href="https://agentmods.dev/skills/dylantarre/animation-principles/performance-optimization"><img src="https://agentmods.dev/badge/skills/dylantarre/animation-principles/performance-optimization.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 17 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 528 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 18 Mar 2026
  • Snyk pass 15 Feb 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00017 $0.00528
Opus 5 $0.00009 $0.00264
Sonnet 5 $0.00003 $0.00106
Haiku 4.5 $0.00002 $0.00053

Measured 5d ago against content hash 3d7c3ec81497, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

performance-optimization scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/12-by-problem-type/performance-optimization/SKILL.md · 75 lines

How it starts

The opening of the file, as written. The whole thing — 75 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

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

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

Read the full file on GitHub · 75 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 75 lines · 17 tokens per session scan A 3d7c3ec81497

Subscribe to this mod's changes

performance-optimization is a skill published in the GitHub repository dylantarre/animation-principles (79 stars, last pushed 8mo ago), licensed MIT. It adds 17 tokens to every session and 528 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

fixing-motion-performance

Audit and fix animation performance issues including layout thrashing, compositor properties, scroll-linked motion, and blur effects. Use when animations stutter, transitions jank, or reviewing CSS/JS animation performance.

ibelick/ui-skills · 45 tokens

ui-debug-workflow

Debug UI changes with a repeatable evidence-first workflow. Use when validating visual regressions, reproducing frontend bugs, comparing baseline vs changed behavior, collecting screenshots/DOM/logs, or producing stakeholder-ready UI debug reports. Keywords: ui bug, visual regression, browser devtools, playwright…

pantheon-org/tekhne · 72 tokens

frontend-visual-verification

Confirm a CSS/HTML/template change actually rendered in a running browser — without being fooled by stale browser cache. Use whenever you edited frontend code (CSS, EJS/HTML, components) and must verify the visual result, especially when a vision screenshot seems to contradict the DOM or the served asset.

pedroiff0/awesome-skills · 66 tokens

inspecting-hermes-desktop-dom

When you are developing apps/desktop and the user is running that same app (hgui / npm run dev), you can read the live rendered DOM of the window they are looking at — computed styles, geometry, which CSS rule actually won, console output — instead of inferring it from .tsx and being wrong.

AtlasOmnia/hermes-custom-pack · 28 tokens

inspecting-hermes-desktop-dom

Read the live Hermes desktop DOM/CSS over CDP.

NousResearch/hermes-agent · 20 tokens

baseline-ui

Quickly deslop UI code by fixing spacing, hierarchy, typography, and small layout issues. Use when the interface needs a fast cleanup or polish pass.

ibelick/ui-skills · 34 tokens