Create performant CSS animations, transitions, and motion design
Creates performant, accessible CSS animations and transitions with proper timing functions. Use when users need hover effects, loading spinners, or page transitions. Automatically optimizes for 60fps and includes reduced-motion accessibility fallbacks.
/plugin marketplace add pluginagentmarketplace/custom-plugin-css/plugin install css-assistant@pluginagentmarketplace-cssThis skill inherits all available tools. When active, it can use any tool Claude has access to.
assets/config.yamlassets/schema.jsonreferences/GUIDE.mdreferences/PATTERNS.mdscripts/validate.pyCreate performant, accessible CSS animations and transitions with proper timing and motion design.
This skill provides atomic, focused guidance on CSS animations with performance optimization and accessibility considerations built-in.
| Property | Value |
|---|---|
| Category | Motion |
| Complexity | Intermediate to Expert |
| Dependencies | css-fundamentals |
| Bonded Agent | 03-css-animations |
Skill("css-animations")
parameters:
animation_type:
type: string
required: true
enum: [transition, keyframe, transform, timing]
description: Type of animation to create
effect:
type: string
required: false
enum: [fade, slide, scale, rotate, bounce, shake, pulse]
description: Predefined animation effect
performance_mode:
type: boolean
required: false
default: true
description: Optimize for 60fps performance
accessible:
type: boolean
required: false
default: true
description: Include reduced-motion alternatives
validation:
- rule: animation_type_required
message: "animation_type parameter is required"
- rule: valid_effect
message: "effect must be a recognized animation effect"
retry_config:
max_attempts: 3
backoff_type: exponential
initial_delay_ms: 1000
max_delay_ms: 10000
logging:
entry_point: skill_invoked
exit_point: skill_completed
metrics:
- invocation_count
- effect_usage
- performance_mode_ratio
.element {
transition: property duration timing-function delay;
transition: transform 0.3s ease-out;
transition: opacity 0.2s, transform 0.3s ease-out;
}
@keyframes animation-name {
0% { /* start state */ }
50% { /* midpoint state */ }
100% { /* end state */ }
}
.element {
animation: name duration timing-function delay iteration-count direction fill-mode;
animation: slide-in 0.5s ease-out forwards;
}
SAFE (Compositor-only):
├─ transform
└─ opacity
AVOID (Trigger repaint/reflow):
├─ width, height
├─ top, left, right, bottom
├─ margin, padding
└─ background-color
@keyframes fade-in {
from { opacity: 0; }
to { opacity: 1; }
}
.fade-in {
animation: fade-in 0.3s ease-out forwards;
}
@keyframes slide-up {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.slide-up {
animation: slide-up 0.4s ease-out forwards;
}
@keyframes pulse {
0%, 100% { transform: scale(1); }
50% { transform: scale(1.05); }
}
.pulse {
animation: pulse 2s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}
cubic-bezier(x1, y1, x2, y2)
ease: (0.25, 0.1, 0.25, 1.0)
ease-in: (0.42, 0, 1.0, 1.0)
ease-out: (0, 0, 0.58, 1.0)
ease-in-out: (0.42, 0, 0.58, 1.0)
Custom:
Bounce: (0.68, -0.55, 0.265, 1.55)
Snap: (0.5, 0, 0.75, 0)
Smooth: (0.4, 0, 0.2, 1)
describe('CSS Animations Skill', () => {
test('validates animation_type parameter', () => {
expect(() => skill({ animation_type: 'invalid' }))
.toThrow('animation_type must be one of: transition, keyframe...');
});
test('returns accessible version when flag is true', () => {
const result = skill({
animation_type: 'keyframe',
effect: 'fade',
accessible: true
});
expect(result).toContain('prefers-reduced-motion');
});
test('uses compositor-only properties in performance mode', () => {
const result = skill({
animation_type: 'transform',
performance_mode: true
});
expect(result).not.toContain('left:');
expect(result).not.toContain('top:');
});
});
| Error Code | Cause | Recovery |
|---|---|---|
| INVALID_ANIMATION_TYPE | Unknown animation type | Show valid options |
| PERFORMANCE_WARNING | Using layout-triggering properties | Suggest transform alternative |
| ACCESSIBILITY_MISSING | No reduced-motion fallback | Add default accessible version |
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.