css-animation-crafter
Skill1 starsChanged 5 months agoApache-2.0View on GitHub
Creates CSS keyframe animations, transitions, and micro-interactions. Use when adding motion to web UIs without JavaScript animation libraries.
In this repository58 other files it gives its agents.
- agent-chain-designerSkill
- api-wrapper-builderSkill
- embeddings-builderSkill
- evaluation-harnessSkill
- fine-tuning-preparerSkill
- llm-router-builderSkill
- ml-model-trainerSkill
- model-benchmarkerSkill
- prompt-engineerSkill
- rag-pipeline-builderSkill
- synthetic-data-generatorSkill
- vector-db-integratorSkill
- csv-processorSkill
- database-schema-designerSkill
- data-pipeline-builderSkill
- etl-workflow-designerSkill
- json-transformerSkill
- pandas-data-cleanerSkill
- report-generatorSkill
- sql-query-optimizerSkill
- time-series-analyzerSkill
- visualization-generatorSkill
- backup-strategySkill
- ci-cd-optimizerSkill
- docker-compose-generatorSkill
- github-actions-pipelineSkill
- kubernetes-deploymentSkill
- load-balancer-configSkill
- log-aggregator-setupSkill
- monitoring-dashboardSkill
- nginx-config-generatorSkill
- security-hardeningSkill
- ssl-certificate-managerSkill
- terraform-module-builderSkill
- api-security-auditorSkill
- compliance-checkerSkill
- dependency-checkerSkill
- incident-responderSkill
- jwt-security-auditorSkill
- owasp-checkerSkill
- penetration-test-plannerSkill
- secret-detectorSkill
- threat-model-designerSkill
- vulnerability-scannerSkill
- accessibility-auditorSkill
- api-route-builderSkill
- auth-flow-builderSkill
- form-validatorSkill
- graphql-schema-designerSkill
- html-component-builderSkill
- nextjs-app-scaffoldSkill
- performance-auditorSkill
- pwa-setupSkill
- react-component-generatorSkill
- responsive-layout-systemSkill
- seo-optimizerSkill
- tailwind-design-systemSkill
- websocket-integrationSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
18 rules. About 0 are common, 9 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 30
No JavaScript required unless the skill explicitly adds a tiny progressive enhancement script.
- Very specific: line 40
Always wrap animations in @media (prefers-reduced-motion: no-preference) { ...
- Distinctive: line 42
Never animate on load for users with reduced motion unless it is essential.
- Very specific: line 45
Use cubic-bezier() for custom easings (e.g., cubic-bezier(0.4, 0, 0.2, 1) for material design).
- Very specific: line 47
Use animation-fill-mode: both or forwards/backwards as needed.
- Very specific: line 48
Prefer transition for simple state changes.
- Very specific: line 52
Use percentage-based or from/to.
- Distinctive: line 53
Keep keyframe lists short (3-5 stops maximum for most UI work).
- Very specific: line 56
Use animation-delay with incremental values (e.g., calc(var(--i) * 80ms)).
- Very specific: line 60
Use animation-timeline: view() or scroll() when supported.
- Distinctive: line 64
Always deliver the animation in a self-contained code block.
- Distinctive: line 71
Document how the animation respects reduced motion.
- Distinctive: line 75
Add comments explaining key decisions.
- Very specific: line 200
User has
prefers-reduced-motion: reduce: Always provide a no-animation path. - Very specific: line 201
Animation causes layout thrashing: Only animate transform and opacity.
- Distinctive: line 204
Accessibility: Never use animation to convey critical information without a static alternative.
- Distinctive: line 212
Performance check: Use Chrome DevTools Performance tab while triggering the animation.
- Distinctive: line 213
Accessibility: Use keyboard to trigger hover/focus states.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Overview
Produces high-quality, performant CSS animations and transitions using modern best practices. The skill generates keyframe definitions, timing functions, accessibility-respecting motion (prefers-reduced-motion), GPU-accelerated properties, stagger patterns, scroll-driven animations, and ready-to-use recipes for common UI motions such as fades, slides, bounces, loading states, and hover effects.
When to Use This Skill
- Adding subtle motion to buttons, cards, modals, loaders, or page transitions.
- The user explicitly requests "CSS animation", "keyframe", "transition", "micro-interaction", or "motion".
- Avoiding JavaScript animation libraries (Framer Motion, GSAP, anime.js) for performance or bundle size reasons.
- Implementing loading states, success/error feedback, or attention-guiding animations.
- Creating scroll-triggered or entrance animations.
Prerequisites
- A web project using CSS (plain CSS, Tailwind, SCSS, etc.).
- Target browsers that support modern CSS (Chrome 90+, Firefox 90+, Safari 15+ recommended for advanced features like
@propertyor scroll timelines). - For scroll-driven animations, the page must have scrollable content.
- No JavaScript required unless the skill explicitly adds a tiny progressive enhancement script.
Steps
- Analyze the motion requirement:
- Identify the trigger (hover, focus, load, click, scroll, state change).
- Determine the animation type: entrance, exit, attention, feedback, loading, or continuous.
- Choose properties that are GPU-composited:
transform(translate, scale, rotate),opacity,filter. Avoid animatingwidth,height,left,top,margin,paddingwhen possible.
- Respect user motion preferences (mandatory):
- Always wrap animations in
@media (prefers-reduced-motion: no-preference) { ... }. - Provide a reduced or static fallback for users who prefer reduced motion.
- Never animate on load for users with reduced motion unless it is essential.
- Always wrap animations in
- Select timing and easing:
- Use
cubic-bezier()for custom easings (e.g.,cubic-bezier(0.4, 0, 0.2, 1)for material design). - Common durations: 150ms (micro), 250-300ms (standard), 400-600ms (emphasis), 800ms+ (page-level).
- Use
animation-fill-mode: bothorforwards/backwardsas needed. - Prefer
transitionfor simple state changes; use@keyframes+animationfor complex or repeating sequences.
- Use
- Write the keyframes:
- Name them descriptively (e.g.,
fadeInUp,pulse,modalEnter). - Use percentage-based or
from/to. - Keep keyframe lists short (3-5 stops maximum for most UI work).
- Name them descriptively (e.g.,
- Implement stagger for lists:
- Use
animation-delaywith incremental values (e.g.,calc(var(--i) * 80ms)). - Set
--ivia inline style or CSS counters on list items.
- Use
- Add scroll-driven animations (modern):
- Use
animation-timeline: view()orscroll()when supported. - Provide a JavaScript fallback using IntersectionObserver for older browsers.
- Use
- Provide multiple recipe variants:
- Always deliver the animation in a self-contained code block.
- Show how to apply it to real HTML elements.
- Include Tailwind arbitrary value versions when relevant.
- Include performance and accessibility notes:
- List which properties are safe.
- Warn about
will-changeusage (use sparingly). - Document how the animation respects reduced motion.
- Output complete, copy-pasteable code:
- Include the CSS (and minimal HTML demo if helpful).
- Add comments explaining key decisions.
Examples
Example 1: Fade + Slide Up Entrance Animation (with stagger)
/* Fade In Up Animation */
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@media (prefers-reduced-motion: no-preference) {
.fade-in-up {
animation: fadeInUp 400ms cubic-bezier(0.4, 0, 0.2, 1) both;
}
/* Staggered list items */
.stagger-list > * {
--stagger-delay: 80ms;
animation-delay: calc(var(--i, 0) * var(--stagger-delay));
}
}
/* Usage */
<div class="stagger-list">
<div class="fade-in-up" style="--i: 0">Item 1</div>
<div class="fade-in-up" style="--i: 1">Item 2</div>
<div class="fade-in-up" style="--i: 2">Item 3</div>
</div>Example 2: Subtle Button Micro-interaction (Scale + Shadow)
@media (prefers-reduced-motion: no-preference) {
.btn-primary {
transition: transform 150ms cubic-bezier(0.4, 0, 0.2, 1),
box-shadow 150ms cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-primary:hover {
transform: translateY(-1px) scale(1.02);
box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}
.btn-primary:active {
transform: translateY(0) scale(0.985);
transition-duration: 75ms;
}
}Example 3: Loading Spinner (Infinite, GPU only)
@keyframes spin {
to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: no-preference) {
.spinner {
width: 24px;
height: 24px;
border: 3px solid #e5e7eb;
border-top-color: #3b82f6;
border-radius: 9999px;
animation: spin 800ms linear infinite;
}
}Example 4: Scroll-Driven Fade (with fallback)
/* Modern scroll-driven */
@media (prefers-reduced-motion: no-preference) and (prefers-reduced-motion: no-preference) {
@supports (animation-timeline: view()) {
.scroll-fade {
animation: fadeIn linear both;
animation-timeline: view();
animation-range: entry 0% entry 50%;
}
}
}
/* JS fallback for older browsers */
.scroll-fade {
opacity: 0;
transform: translateY(20px);
transition: opacity 400ms ease, transform 400ms ease;
}
.scroll-fade.is-visible {
opacity: 1;
transform: none;
}(Include a small IntersectionObserver script in the output when using the fallback.)
Example 5: Attention Pulse (for notifications)
@keyframes pulse {
0%, 100% { transform: scale(1); }
50% { transform: scale(1.08); }
}
@media (prefers-reduced-motion: no-preference) {
.attention-pulse {
animation: pulse 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
}Edge Cases & Error Handling
- User has
prefers-reduced-motion: reduce: Always provide a no-animation path. For loading spinners that are essential, use a static indicator + ARIA live region instead of infinite animation. - Animation causes layout thrashing: Only animate
transformandopacity. If the user requests width/height animation, provide atransform: scalealternative and explain the performance difference. - Too many staggered items: Cap stagger at ~10-12 items or use a CSS variable that the agent can adjust. Suggest IntersectionObserver + class toggle for very long lists.
- Browser support: For advanced features (scroll timelines,
@property), always provide a progressive enhancement comment and a basic fallback. - Accessibility: Never use animation to convey critical information without a static alternative. For attention animations, also use color or icon changes.
- Performance on low-end devices: Recommend testing with DevTools throttling. Suggest
will-change: transformonly on the animating element and remove it after the animation ends. - Conflict with Tailwind: Show how to use arbitrary values (
animate-[spin_800ms_linear_infinite]) and how to extend Tailwind config with custom keyframes.
Verification
- Paste the generated CSS + HTML into a test file and open in Chrome, Firefox, and Safari.
- Reduced motion test: Set
prefers-reduced-motion: reducein DevTools (Rendering panel) — confirm animations are disabled or greatly simplified. - Performance check: Use Chrome DevTools Performance tab while triggering the animation. Confirm no layout thrashing (purple bars minimal) and GPU compositing (green bars for the layer).
- Accessibility: Use keyboard to trigger hover/focus states. Verify focus is never lost due to animation. Run axe or Lighthouse — motion-related issues should be absent.
- Stagger verification: Inspect computed
animation-delayvalues on list items; they should increment correctly. - Success: Animations are smooth (60fps), respect user preferences, use only safe properties, and enhance (not distract from) the UI.
References
- MDN CSS Animations
- MDN CSS Transitions
- prefers-reduced-motion on MDN
- Scroll-driven Animations Spec
- CSS Triggers — which properties cause layout/paint
- Cubic-bezier.com for custom easing visualization
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

