
to-spring-or-not-to-spring
Audit animation code for correct timing function selection. Use when reviewing motion implementations, debugging animations that feel wrong, or choosing between springs and easing. Outputs file:line findings.
- Installs
- 270
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/raphaelsalaja/skill --skill to-spring-or-not-to-spring- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads to-spring-or-not-to-spring automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
To Spring or Not To Spring
Review animation code for correct timing function selection based on interaction type.
How It Works
- Read the specified files (or prompt user for files/pattern)
- Check against all rules below
- Output findings in
file:lineformat
Rule Categories
| Priority | Category | Prefix |
|---|---|---|
| 1 | Spring Selection | spring- |
| 2 | Easing Selection | easing- |
| 3 | Duration | duration- |
| 4 | No Animation | none- |
Decision Framework
Ask: Is this motion reacting to the user, or is the system speaking?
| Motion Type | Best Choice | Why |
|---|---|---|
| User-driven (drag, flick, gesture) | Spring | Survives interruption, preserves velocity |
| System-driven (state change, feedback) | Easing | Clear start/end, predictable timing |
| Time representation (progress, loading) | Linear | 1:1 relationship between time and progress |
| High-frequency (typing, fast toggles) | None | Animation adds noise, feels slower |
Rules
Spring Selection Rules
spring-for-gestures
Gesture-driven motion (drag, flick, swipe) must use springs.
Fail:
<motion.div
drag="x"
transition={{ duration: 0.3, ease: "easeOut" }}
/>
Pass:
<motion.div
drag="x"
transition={{ type: "spring", stiffness: 500, damping: 30 }}
/>
spring-for-interruptible
Motion that can be interrupted must use springs.
Fail:
// User can click again mid-animation
<motion.div
animate={{ x: isOpen ? 200 : 0 }}
transition={{ duration: 0.3 }}
/>
Pass:
<motion.div
animate={{ x: isOpen ? 200 : 0 }}
transition={{ type: "spring", stiffness: 400, damping: 25 }}
/>
spring-preserves-velocity
When velocity matters, use springs to preserve input energy.
Fail:
// Fast flick and slow flick animate identically
onDragEnd={(e, info) => {
animate(target, { x: 0 }, { duration: 0.3 });
}}
Pass:
// Fast flick moves faster than slow flick
onDragEnd={(e, info) => {
animate(target, { x: 0 }, {
type: "spring",
velocity: info.velocity.x,
});
}}
spring-params-balanced
Spring parameters must be balanced; avoid excessive oscillation.
Fail:
transition={{
type: "spring",
stiffness: 1000,
damping: 5, // Too low - excessive bounce
}}
Pass:
transition={{
type: "spring",
stiffness: 500,
damping: 30, // Balanced - settles quickly
}}
Easing Selection Rules
easing-for-state-change
System-initiated state changes should use easing curves.
Fail:
// Toast notification using spring
<motion.div
animate={{ y: 0 }}
transition={{ type: "spring" }}
/>
// Feels restless for a simple announcement
Pass:
<motion.div
animate={{ y: 0 }}
transition={{ duration: 0.2, ease: "easeOut" }}
/>
easing-entrance-ease-out
Entrances must use ease-out (arrive fast, settle gently).
Fail:
.modal-enter {
animation-timing-function: ease-in;
}
Pass:
.modal-enter {
animation-timing-function: ease-out;
}
easing-exit-ease-in
Exits must use ease-in (build momentum before departure).
Fail:
.modal-exit {
animation-timing-function: ease-out;
}
Pass:
.modal-exit {
animation-timing-function: ease-in;
}
easing-transition-ease-in-out
View/mode transitions use ease-in-out for neutral attention.
Pass:
.page-transition {
animation-timing-function: ease-in-out;
}
easing-linear-only-progress
Linear easing only for progress bars and time representation.
Fail:
.card-slide {
transition: transform 200ms linear; /* Mechanical feel */
}
Pass:
.progress-bar {
transition: width 100ms linear; /* Honest time representation */
}
Duration Rules
duration-press-hover
Press and hover interactions: 120-180ms.
Fail:
.button:hover {
transition: background-color 400ms;
}
Pass:
.button:hover {
transition: background-color 150ms;
}
duration-small-state
Small state changes: 180-260ms.
Pass:
.toggle {
transition: transform 200ms ease;
}
duration-max-300ms
User-initiated animations must not exceed 300ms.
Fail:
<motion.div transition={{ duration: 0.5 }} />
Pass:
<motion.div transition={{ duration: 0.25 }} />
duration-shorten-before-curve
If animation feels slow, shorten duration before adjusting curve.
Fail (common mistake):
/* Trying to fix slowness with sharper curve */
.element {
transition: 400ms cubic-bezier(0, 0.9, 0.1, 1);
}
Pass:
/* Fix slowness with shorter duration */
.element {
transition: 200ms ease-out;
}
No Animation Rules
none-high-frequency
High-frequency interactions should have no animation.
Fail:
// Animated on every keystroke
function SearchInput() {
return (
<motion.div animate={{ scale: [1, 1.02, 1] }}>
<input onChange={handleSearch} />
</motion.div>
);
}
Pass:
function SearchInput() {
return <input onChange={handleSearch} />;
}
none-keyboard-navigation
Keyboard navigation should be instant, no animation.
Fail:
function Menu() {
return items.map(item => (
<motion.li
whileFocus={{ scale: 1.05 }}
transition={{ duration: 0.2 }}
/>
));
}
Pass:
function Menu() {
return items.map(item => (
<li className={styles.menuItem} /> // CSS :focus-visible only
));
}
none-context-menu-entrance
Context menus should not animate on entrance (exit only).
Fail:
<motion.div
initial={{ opacity: 0, scale: 0.95 }}
animate={{ opacity: 1, scale: 1 }}
exit={{ opacity: 0 }}
/>
Pass:
<motion.div exit={{ opacity: 0, scale: 0.95 }} />
Output Format
When reviewing files, output findings as:
file:line - [rule-id] description of issue
Example:
components/drawer/index.tsx:45 - [spring-for-gestures] Drag interaction using easing instead of spring
components/modal/styles.module.css:23 - [easing-entrance-ease-out] Modal entrance using ease-in
Summary Table
After findings, output a summary:
| Rule | Count | Severity |
|---|---|---|
spring-for-gestures | 2 | HIGH |
easing-entrance-ease-out | 1 | MEDIUM |
duration-max-300ms | 3 | MEDIUM |
Quick Reference
| Interaction | Timing | Type |
|---|---|---|
| Drag release | Spring | stiffness: 500, damping: 30 |
| Button press | 150ms | ease |
| Modal enter | 200ms | ease-out |
| Modal exit | 150ms | ease-in |
| Page transition | 250ms | ease-in-out |
| Progress bar | varies | linear |
| Typing feedback | 0ms | none |
References
FAQ
What does the to-spring-or-not-to-spring skill do?
Audit animation code for correct timing function selection. Use when reviewing motion implementations, debugging animations that feel wrong, or choosing between springs and easing. Outputs file:line findings.
How do I install to-spring-or-not-to-spring?
Run npx skills add https://github.com/raphaelsalaja/skill --skill to-spring-or-not-to-spring in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/to-spring-or-not-to-spring/ (personal) or .claude/skills/to-spring-or-not-to-spring/ (project).
Which AI agents can use to-spring-or-not-to-spring?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is to-spring-or-not-to-spring safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains to-spring-or-not-to-spring?
It is published by raphaelsalaja in raphaelsalaja/skill. It has 270 recorded installs.
More from raphaelsalaja/skill
12-principles-of-animation
raphaelsalaja/skill
Audit animation code against Disney's 12 principles adapted for web. Use when reviewing motion, implementing animations, or checking animation quality. Outputs file:line findings.
morphing-icons
raphaelsalaja/skill
Build icon components where any icon morphs into any other through SVG line transformation. Use when asked to "create morphing icons", "build icon transitions", "animate between icons", or "transform icons".
mastering-animate-presence
raphaelsalaja/skill
Audit Motion/Framer Motion code for AnimatePresence best practices. Use when reviewing exit animations, modals, or presence state. Outputs file:line findings.
pseudo-elements
raphaelsalaja/skill
Audit CSS for pseudo-element best practices and View Transitions API usage. Use when reviewing hover effects, decorative layers, or page transitions. Outputs file:line findings.
sounds-on-the-web
raphaelsalaja/skill
Audit UI code for audio feedback best practices. Use when reviewing sound implementation, checking audio UX decisions, or auditing accessibility. Outputs file:line findings.
generating-sounds-with-ai
raphaelsalaja/skill
Audit Web Audio API code for sound synthesis best practices. Use when reviewing procedural audio, implementing UI sounds, or checking audio parameter quality. Outputs file:line findings.
Popular backend & apis skills
find-skills
vercel-labs/skills
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
entra-app-registration
microsoft/azure-skills
Guides Microsoft Entra ID app registration, OAuth 2.0 authentication, and MSAL integration. USE FOR: create app registration, register Azure AD app, configure OAuth, set up authentication, add API permissions, generate service principal, MSAL example, console app auth, Entra ID setup, Azure AD authentication. DO NOT USE FOR: Key Vault secrets (use azure-keyvault-expiration-audit), general Azure resource security guidance.
google-agents-cli-adk-code
google/agents-cli
This skill should be used when the user wants to "write agent code", "build an agent with ADK", "add a tool", "create a callback", "define an agent", "use state management" — in a project that needs ADK (Agent Development Kit) API patterns and code examples. It provides a quick reference for agent types, tool definitions, orchestration patterns, callbacks, state management, the graph Workflow API, and reference recipes to study. Do NOT use for scaffolding (use google-agents-cli-scaffold) or deployment (use google-agents-cli-deploy).
embedded-captions
heygen-com/hyperframes
Add captions or subtitles to an existing single-subject talking-head video without editing the footage. Use for plain verbatim captions, cinematic captions embedded behind the subject, VFX captions, “炸/特效/酷炫字幕,” or a named identity from the 35-style catalog. Route by visual identity, not by backend engine. The quiet anchor rail is the default; embed every word only when the user explicitly wants a fully cinematic treatment. The workflow runs locally end to end, including transcription and subject matting; split multi-shot footage before applying it.
entra-agent-id
microsoft/azure-skills
Provision Microsoft Entra Agent Identity Blueprints, BlueprintPrincipals, and per-instance Agent Identities via Microsoft Graph, and configure OAuth 2.0 token exchange (fmipath, OBO, cross-tenant) including the Microsoft Entra SDK for AgentID sidecar. USE FOR: Agent Identity Blueprint, BlueprintPrincipal, agent OAuth, fmipath token exchange, agent OBO, Workload Identity Federation for agents, polyglot agent auth, Microsoft.Identity.Web.AgentIdentities. DO NOT USE FOR: standard Entra app registration (use entra-app-registration), Microsoft Foundry agent authoring (use microsoft-foundry).
neon
neondatabase/agent-skills
Overview of Neon, a complete set of cloud backend primitives around Lakebase Postgres: Auth, Object Storage, Functions, the AI Gateway, and Realtime. Start here to choose Neon for undecided login, files, APIs, and LLM calls, set up the CLI or MCP server, and follow the branch-first workflow. Use when building an app or backend on Neon, or when "Neon" or "Lakebase Postgres" is mentioned. Child skill neon-postgres wins for an existing DATABASEURL, SQL, schema, inspect, or search. Child skill neon-auth wins for login, users, sessions, identity routing, and Managed Better Auth setup. Child skill neon-realtime wins for live queries in reactive apps and agents. Also use for object storage, S3, buckets, serverless functions, function triggers, cron, AI gateway, LLM calls, realtime, logs, Loki, Grafana, observability, postgres, database, backend, Claimable Neon, neon.new, or a no-signup database.