@booklib/skills 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +105 -0
  3. package/animation-at-work/SKILL.md +246 -0
  4. package/animation-at-work/assets/example_asset.txt +1 -0
  5. package/animation-at-work/references/api_reference.md +369 -0
  6. package/animation-at-work/references/review-checklist.md +79 -0
  7. package/animation-at-work/scripts/example.py +1 -0
  8. package/bin/skills.js +85 -0
  9. package/clean-code-reviewer/SKILL.md +292 -0
  10. package/clean-code-reviewer/evals/evals.json +67 -0
  11. package/data-intensive-patterns/SKILL.md +204 -0
  12. package/data-intensive-patterns/assets/example_asset.txt +1 -0
  13. package/data-intensive-patterns/references/api_reference.md +34 -0
  14. package/data-intensive-patterns/references/patterns-catalog.md +551 -0
  15. package/data-intensive-patterns/references/review-checklist.md +193 -0
  16. package/data-intensive-patterns/scripts/example.py +1 -0
  17. package/data-pipelines/SKILL.md +252 -0
  18. package/data-pipelines/assets/example_asset.txt +1 -0
  19. package/data-pipelines/references/api_reference.md +301 -0
  20. package/data-pipelines/references/review-checklist.md +181 -0
  21. package/data-pipelines/scripts/example.py +1 -0
  22. package/design-patterns/SKILL.md +245 -0
  23. package/design-patterns/assets/example_asset.txt +1 -0
  24. package/design-patterns/references/api_reference.md +1 -0
  25. package/design-patterns/references/patterns-catalog.md +726 -0
  26. package/design-patterns/references/review-checklist.md +173 -0
  27. package/design-patterns/scripts/example.py +1 -0
  28. package/domain-driven-design/SKILL.md +221 -0
  29. package/domain-driven-design/assets/example_asset.txt +1 -0
  30. package/domain-driven-design/references/api_reference.md +1 -0
  31. package/domain-driven-design/references/patterns-catalog.md +545 -0
  32. package/domain-driven-design/references/review-checklist.md +158 -0
  33. package/domain-driven-design/scripts/example.py +1 -0
  34. package/effective-java/SKILL.md +195 -0
  35. package/effective-java/assets/example_asset.txt +1 -0
  36. package/effective-java/references/api_reference.md +1 -0
  37. package/effective-java/references/items-catalog.md +955 -0
  38. package/effective-java/references/review-checklist.md +216 -0
  39. package/effective-java/scripts/example.py +1 -0
  40. package/effective-kotlin/SKILL.md +225 -0
  41. package/effective-kotlin/assets/example_asset.txt +1 -0
  42. package/effective-kotlin/references/api_reference.md +1 -0
  43. package/effective-kotlin/references/practices-catalog.md +1228 -0
  44. package/effective-kotlin/references/review-checklist.md +126 -0
  45. package/effective-kotlin/scripts/example.py +1 -0
  46. package/kotlin-in-action/SKILL.md +251 -0
  47. package/kotlin-in-action/assets/example_asset.txt +1 -0
  48. package/kotlin-in-action/references/api_reference.md +1 -0
  49. package/kotlin-in-action/references/practices-catalog.md +436 -0
  50. package/kotlin-in-action/references/review-checklist.md +204 -0
  51. package/kotlin-in-action/scripts/example.py +1 -0
  52. package/lean-startup/SKILL.md +250 -0
  53. package/lean-startup/assets/example_asset.txt +1 -0
  54. package/lean-startup/references/api_reference.md +319 -0
  55. package/lean-startup/references/review-checklist.md +137 -0
  56. package/lean-startup/scripts/example.py +1 -0
  57. package/microservices-patterns/SKILL.md +179 -0
  58. package/microservices-patterns/references/patterns-catalog.md +391 -0
  59. package/microservices-patterns/references/review-checklist.md +169 -0
  60. package/package.json +17 -0
  61. package/refactoring-ui/SKILL.md +236 -0
  62. package/refactoring-ui/assets/example_asset.txt +1 -0
  63. package/refactoring-ui/references/api_reference.md +355 -0
  64. package/refactoring-ui/references/review-checklist.md +114 -0
  65. package/refactoring-ui/scripts/example.py +1 -0
  66. package/storytelling-with-data/SKILL.md +238 -0
  67. package/storytelling-with-data/assets/example_asset.txt +1 -0
  68. package/storytelling-with-data/references/api_reference.md +379 -0
  69. package/storytelling-with-data/references/review-checklist.md +111 -0
  70. package/storytelling-with-data/scripts/example.py +1 -0
  71. package/system-design-interview/SKILL.md +213 -0
  72. package/system-design-interview/assets/example_asset.txt +1 -0
  73. package/system-design-interview/references/api_reference.md +582 -0
  74. package/system-design-interview/references/review-checklist.md +201 -0
  75. package/system-design-interview/scripts/example.py +1 -0
  76. package/using-asyncio-python/SKILL.md +242 -0
  77. package/using-asyncio-python/assets/example_asset.txt +1 -0
  78. package/using-asyncio-python/references/api_reference.md +267 -0
  79. package/using-asyncio-python/references/review-checklist.md +149 -0
  80. package/using-asyncio-python/scripts/example.py +1 -0
  81. package/web-scraping-python/SKILL.md +259 -0
  82. package/web-scraping-python/assets/example_asset.txt +1 -0
  83. package/web-scraping-python/references/api_reference.md +393 -0
  84. package/web-scraping-python/references/review-checklist.md +163 -0
  85. package/web-scraping-python/scripts/example.py +1 -0
@@ -0,0 +1,369 @@
1
+ # Animation at Work — Chapter-by-Chapter Reference
2
+
3
+ Complete catalog of web animation concepts, techniques, and best practices
4
+ from all 5 chapters.
5
+
6
+ ---
7
+
8
+ ## Ch 1: Human Perception and Animation
9
+
10
+ ### How Humans Perceive Motion
11
+ - The brain fills in gaps between static images to perceive fluid motion (persistence of vision)
12
+ - Animations create an illusion of life and spatial relationships in 2D interfaces
13
+ - Users perceive animated interfaces as faster and more responsive than static ones
14
+ - Motion draws attention — use this deliberately, not accidentally
15
+
16
+ ### The 12 Principles of Animation (Disney)
17
+ Originally from *The Illusion of Life* by Frank Thomas and Ollie Johnston, adapted for UI:
18
+
19
+ 1. **Squash and stretch** — Deformation to show weight/flexibility (limited use in UI — icon bounces, rubbery buttons)
20
+ 2. **Anticipation** — Preparatory motion before main action (button shrink before expand, drawer slight pull before open)
21
+ 3. **Staging** — Present ideas clearly; direct attention to the important element (dim background, spotlight focus)
22
+ 4. **Straight ahead vs. pose to pose** — Drawing technique; in UI, "pose to pose" maps to keyframe animation
23
+ 5. **Follow-through and overlapping action** — Not everything stops at once; stagger child elements (list items appearing in sequence)
24
+ 6. **Slow in and slow out (ease in/out)** — Objects accelerate and decelerate; never use linear for UI motion
25
+ 7. **Arcs** — Natural motion follows curved paths (use CSS motion paths or transform combinations)
26
+ 8. **Secondary action** — Supporting motion that reinforces primary (badge bounce while drawer opens)
27
+ 9. **Timing** — Number of frames/duration controls perceived weight and mood
28
+ 10. **Exaggeration** — Amplify for clarity (overshoot on panel open, extra bounce on landing)
29
+ 11. **Solid drawing** — 3D awareness; in UI, use shadows and transforms to create depth
30
+ 12. **Appeal** — Pleasing, engaging quality; animations should feel appropriate for the brand
31
+
32
+ ### Timing and Spacing
33
+ - **Timing** = total duration of animation
34
+ - **Spacing** = distribution of motion within that duration (controlled by easing)
35
+ - Fast timing + uniform spacing = snappy, lightweight
36
+ - Slow timing + varied spacing = heavy, dramatic
37
+ - Same duration with different easing = completely different feel
38
+
39
+ ### Easing Functions
40
+ - **Linear**: Constant speed — robotic, only for continuous motion (progress bars, spinners)
41
+ - **Ease-in (slow in)**: Starts slow, ends fast — best for elements **leaving** the screen
42
+ - **Ease-out (slow out)**: Starts fast, ends slow — best for elements **entering** the screen
43
+ - **Ease-in-out**: Slow start and end — best for elements **repositioning** on screen
44
+ - **Cubic-bezier**: Custom curves for brand-specific personality
45
+ - **Steps()**: Discrete jumps — for sprite animations or typewriter effects
46
+
47
+ ### Duration Guidelines
48
+ - **Micro-interactions**: 100–200ms (button feedback, toggle, hover)
49
+ - **State transitions**: 200–500ms (panel open, tab switch, modal)
50
+ - **Page transitions**: 300–500ms (route changes, full view swaps)
51
+ - **Demonstrations**: 500ms–1s (onboarding, tutorials)
52
+ - **Rule of thumb**: If a user initiates the action, keep it under 300ms; if the system initiates, up to 500ms is OK
53
+ - **Never**: Exceed 1s for functional animation; users perceive it as broken/slow
54
+
55
+ ### Perception Thresholds
56
+ - **100ms**: Perceived as instantaneous; ideal for direct feedback
57
+ - **1 second**: Limit of feeling continuous; user starts to lose focus
58
+ - **10 seconds**: Maximum before attention wanders; must show progress indicator
59
+
60
+ ---
61
+
62
+ ## Ch 2: Patterns and Purpose
63
+
64
+ ### The Five Animation Patterns
65
+
66
+ **1. Transitions**
67
+ - Change between two states or views in the system
68
+ - Examples: page navigation, modal open/close, tab switching, accordion expand/collapse
69
+ - Both states exist; animation shows the journey between them
70
+ - Should convey spatial relationship (where the new view "came from")
71
+ - Maintain context: user should understand they're in the same app
72
+
73
+ **2. Supplements**
74
+ - Add or remove elements from the current view without changing the view itself
75
+ - Examples: toast notification appearing, list item added, dropdown menu opening, tooltip showing
76
+ - The view remains; new elements join or leave it
77
+ - Often use enter/exit patterns: slide + fade in, slide + fade out
78
+ - Key difference from transitions: the "stage" stays the same
79
+
80
+ **3. Feedback**
81
+ - Acknowledge that the system received a user's action
82
+ - Examples: button press animation, form validation shake, successful submit checkmark, pull-to-refresh
83
+ - Must be immediate (under 200ms) — user needs instant confirmation
84
+ - Can be subtle (color flash) or prominent (success animation) depending on action importance
85
+ - Missing feedback makes interfaces feel broken or unresponsive
86
+
87
+ **4. Demonstrations**
88
+ - Show how something works or draw attention to a feature
89
+ - Examples: onboarding walkthroughs, feature discovery pulses, interactive tutorials, gesture hints
90
+ - Can be longer duration (up to several seconds) since they're instructional
91
+ - Should be skippable — not everyone needs the tutorial
92
+ - Diminishing returns: show once or twice, then stop
93
+ - Often used on first use, then hidden
94
+
95
+ **5. Decorations**
96
+ - Purely aesthetic, no functional purpose
97
+ - Examples: parallax backgrounds, floating particles, idle character animations, gradient shifts
98
+ - **Use sparingly**: They add visual interest but no information
99
+ - Can become annoying with repeated exposure
100
+ - Increase page weight and battery drain
101
+ - Should be the first thing removed for performance or accessibility
102
+
103
+ ### Choosing the Right Pattern
104
+ - Ask: "What is this animation communicating?"
105
+ - If it communicates a state change → Transition
106
+ - If it communicates an element entering/leaving → Supplement
107
+ - If it communicates acknowledgment → Feedback
108
+ - If it communicates how-to → Demonstration
109
+ - If it communicates nothing functional → Decoration (consider removing)
110
+
111
+ ### Stateful Animations
112
+ - Animations tied to application state (e.g., loading → loaded → error)
113
+ - Define motion for each state transition
114
+ - Consider all paths: forward, backward, error, timeout
115
+ - Loading states: provide progress animation to reduce perceived wait time
116
+
117
+ ---
118
+
119
+ ## Ch 3: Anatomy of a Web Animation
120
+
121
+ ### CSS Transitions
122
+ ```css
123
+ .element {
124
+ transition: property duration easing delay;
125
+ }
126
+ ```
127
+ - Animate between two states (A → B) triggered by state change (hover, class toggle, media query)
128
+ - **Properties**: Can animate most CSS properties, but only `transform` and `opacity` are performant
129
+ - **Shorthand**: `transition: all 300ms ease-out` or specify per property
130
+ - **Multiple properties**: `transition: transform 300ms ease-out, opacity 200ms ease-in`
131
+ - **Delay**: Useful for staggering (each list item delayed by N * 50ms)
132
+ - **Limitation**: Only two states; no looping; no mid-animation keyframes
133
+
134
+ ### CSS Animations
135
+ ```css
136
+ @keyframes slidein {
137
+ from { transform: translateX(-100%); opacity: 0; }
138
+ to { transform: translateX(0); opacity: 1; }
139
+ }
140
+ .element {
141
+ animation: slidein 300ms ease-out forwards;
142
+ }
143
+ ```
144
+ - Define keyframes at arbitrary points (0%, 25%, 50%, 100%)
145
+ - **animation-iteration-count**: `infinite` for looping, number for finite
146
+ - **animation-direction**: `normal`, `reverse`, `alternate` (ping-pong)
147
+ - **animation-fill-mode**: `forwards` (stay at end), `backwards` (start at first keyframe), `both`
148
+ - **animation-play-state**: `running` or `paused` (toggle via JS)
149
+ - **Use for**: Loading spinners, attention pulses, multi-step sequences, any animation that starts automatically
150
+
151
+ ### Web Animations API (WAAPI)
152
+ ```js
153
+ const animation = element.animate(keyframes, options);
154
+ ```
155
+ - Combines CSS animation performance with JavaScript control
156
+ - **Keyframes**: Array of keyframe objects or object with array properties
157
+ - **Options**: `duration`, `easing`, `iterations`, `direction`, `fill`, `delay`
158
+ - **Playback control**: `animation.play()`, `.pause()`, `.reverse()`, `.cancel()`, `.finish()`
159
+ - **Timeline scrubbing**: `animation.currentTime = value` — scrub to specific point
160
+ - **Promises**: `animation.finished` returns a Promise — chain sequential animations
161
+ - **Playback rate**: `animation.playbackRate` — speed up, slow down, or reverse
162
+
163
+ **WAAPI vs CSS Animations**:
164
+ | Feature | CSS Animations | WAAPI |
165
+ |---------|---------------|-------|
166
+ | Declarative | Yes | No (imperative) |
167
+ | Play/pause | Via play-state | Via .play()/.pause() |
168
+ | Reverse | Via direction | Via .reverse() |
169
+ | Scrub/seek | No | Via .currentTime |
170
+ | Chain sequences | No | Via .finished promise |
171
+ | Dynamic values | No (static keyframes) | Yes (JS-generated) |
172
+ | Performance | Compositor thread | Compositor thread |
173
+
174
+ ### SVG Animation
175
+ - **SMIL** (deprecated but still supported): `<animate>`, `<animateTransform>`, `<animateMotion>`
176
+ - **CSS on SVG**: Apply CSS transitions/animations to SVG elements (limited to presentation attributes)
177
+ - **WAAPI on SVG**: Full animation control on SVG DOM elements
178
+ - **Use for**: Icon animations, character animation, path-based motion, morphing shapes
179
+
180
+ ### Canvas Animation
181
+ - **2D Canvas**: `requestAnimationFrame` loop, manual drawing each frame
182
+ - Pros: Total control, handles thousands of objects efficiently
183
+ - Cons: No DOM, no accessibility, no CSS styling, must handle everything manually
184
+ - **Use for**: Particle systems, data visualizations with many points, game-like animations
185
+
186
+ ### WebGL
187
+ - GPU-accelerated 3D and 2D rendering
188
+ - Libraries: Three.js, PixiJS, Babylon.js
189
+ - **Use for**: 3D effects, complex particle systems, immersive experiences
190
+ - Cons: Heavy, steep learning curve, accessibility challenges
191
+
192
+ ### Performance Architecture
193
+ **The Rendering Pipeline**:
194
+ 1. **JavaScript** — Run scripts, modify DOM/styles
195
+ 2. **Style** — Calculate computed styles
196
+ 3. **Layout** — Calculate positions and sizes (expensive!)
197
+ 4. **Paint** — Fill in pixels for each layer
198
+ 5. **Composite** — Combine layers on GPU
199
+
200
+ **Composite-only animations** skip Layout and Paint:
201
+ - `transform: translate()`, `scale()`, `rotate()`, `skew()`
202
+ - `opacity`
203
+ - Everything else triggers Layout or Paint
204
+
205
+ **`will-change` property**:
206
+ ```css
207
+ .element { will-change: transform, opacity; }
208
+ ```
209
+ - Promotes element to its own compositor layer
210
+ - Browser can optimize ahead of time
211
+ - **Warning**: Overuse wastes GPU memory; only apply right before animation starts, remove after
212
+
213
+ **RAIL Performance Model**:
214
+ - **Response**: Handle input within 100ms
215
+ - **Animation**: Produce frame within 16ms (60fps) — only 10ms budget after browser overhead
216
+ - **Idle**: Use idle time for deferred work in 50ms chunks
217
+ - **Load**: Deliver content within 1000ms
218
+
219
+ ---
220
+
221
+ ## Ch 4: Communicating Animation
222
+
223
+ ### Why Communication Matters
224
+ - Animations are easy to miscommunicate — "make it slide in" means different things to different people
225
+ - Without shared language, developers implement something different from what designers intended
226
+ - Animation specs are often omitted from design handoff, leading to guesswork
227
+
228
+ ### Storyboards
229
+ - Series of static frames showing key poses in an animation sequence
230
+ - Borrowed from film/animation industry
231
+ - **Use for**: Complex multi-step animations, page transitions, onboarding flows
232
+ - **Include**: Key frames, notes about timing/easing, interaction triggers
233
+ - Simple pencil sketches are fine — fidelity doesn't matter, communication does
234
+ - Number each frame, add annotations for timing and easing
235
+
236
+ ### Motion Comps (Motion Compositions)
237
+ - Actual animated prototypes showing the real motion
238
+ - Created in tools like After Effects, Principle, Framer, or CSS/JS prototypes
239
+ - **Use for**: Precise timing communication, client presentations, developer handoff
240
+ - More accurate than storyboards but more time-consuming to create
241
+ - Can export as video/GIF for sharing, or as code for implementation
242
+
243
+ ### Animation Spec Documentation
244
+ What to include in handoff:
245
+ - **Trigger**: What initiates the animation (click, hover, page load, scroll position)
246
+ - **Properties**: Which CSS properties change (transform, opacity, etc.)
247
+ - **Duration**: Exact timing in milliseconds
248
+ - **Easing**: Named function or cubic-bezier values
249
+ - **Delay**: If staggered or delayed
250
+ - **States**: Start state, end state, and any intermediate keyframes
251
+ - **Accessibility**: Reduced-motion alternative behavior
252
+
253
+ ### Shared Vocabulary
254
+ Establish team-wide terminology:
255
+ - Use the 5 animation patterns (transition, supplement, feedback, demonstration, decoration) as shared language
256
+ - Name recurring animations in your system (e.g., "drawer-open", "toast-enter", "card-flip")
257
+ - Document in a motion design system alongside your component library
258
+
259
+ ### Motion Design Systems
260
+ - Extension of your design system specifically for animation
261
+ - Define: standard durations, standard easings, standard patterns per component
262
+ - Token-based: `--duration-fast: 150ms`, `--duration-medium: 300ms`, `--ease-enter: ease-out`
263
+ - Component-level: "Modal opens with 300ms ease-out, closes with 200ms ease-in"
264
+ - Reduces inconsistency and speeds up development
265
+
266
+ ---
267
+
268
+ ## Ch 5: Best Practices
269
+
270
+ ### Accessibility
271
+
272
+ **Vestibular Disorders**
273
+ - Affect ~35% of adults over 40 to some degree
274
+ - Triggered by: parallax scrolling, zooming animations, large-scale motion, spinning
275
+ - Symptoms: dizziness, nausea, disorientation
276
+ - Severity ranges from mild discomfort to debilitating
277
+
278
+ **`prefers-reduced-motion` Media Query**
279
+ ```css
280
+ @media (prefers-reduced-motion: reduce) {
281
+ * {
282
+ animation-duration: 0.01ms !important;
283
+ animation-iteration-count: 1 !important;
284
+ transition-duration: 0.01ms !important;
285
+ scroll-behavior: auto !important;
286
+ }
287
+ }
288
+ ```
289
+ - Respects OS-level accessibility setting (macOS: Reduce Motion; Windows: Show animations)
290
+ - **Approach 1**: Remove all animations (nuclear option above)
291
+ - **Approach 2**: Replace problematic animations with safe alternatives (preferred)
292
+ - **Safe motions**: Opacity fades, color changes, small-scale transforms
293
+ - **Problematic motions**: Parallax, zooming, spinning, large-distance slides, auto-playing
294
+
295
+ **WCAG Guidelines**
296
+ - Flashing content must not flash more than 3 times per second (seizure risk)
297
+ - Auto-playing animations must have pause/stop mechanism
298
+ - Motion that starts automatically and lasts >5 seconds must be pausable
299
+ - Content must not cause seizures or physical reactions
300
+
301
+ **Implementing Accessible Animation**:
302
+ 1. Start with `prefers-reduced-motion` media query on all animations
303
+ 2. Provide alternative non-motion presentation for key content
304
+ 3. Never rely on animation alone to convey information
305
+ 4. Auto-playing content must be pausable
306
+ 5. Test with motion settings turned off — your UI should still be fully usable
307
+
308
+ ### Performance Best Practices
309
+
310
+ **Property Tiers**:
311
+ - **Tier 1 (Composite)**: `transform`, `opacity` — GPU-accelerated, skip layout/paint
312
+ - **Tier 2 (Paint)**: `color`, `background-color`, `box-shadow` — skip layout but trigger paint
313
+ - **Tier 3 (Layout)**: `width`, `height`, `margin`, `padding`, `top/left` — trigger full pipeline
314
+
315
+ **Optimization Strategies**:
316
+ - Animate only Tier 1 properties whenever possible
317
+ - Use `transform: translateX()` instead of `left`
318
+ - Use `transform: scale()` instead of `width/height`
319
+ - Use `opacity` instead of `visibility` or `display`
320
+ - Batch DOM reads and writes (avoid layout thrashing)
321
+ - Use `will-change` sparingly and remove after animation completes
322
+ - Avoid animating during page load — defer to idle time
323
+ - Use `requestAnimationFrame` for JavaScript-driven animations
324
+
325
+ **Testing Performance**:
326
+ - Chrome DevTools Performance panel — look for long frames (>16ms)
327
+ - Paint flashing overlay — identify unexpected repaints
328
+ - Layer borders — check compositor layer count (too many = memory waste)
329
+ - Test on real mobile devices — dev machines hide performance problems
330
+ - Throttle CPU in DevTools to simulate slower hardware
331
+
332
+ ### Team Workflow
333
+
334
+ **Integrating Animation into Design Process**:
335
+ 1. **Discovery**: Identify where animation adds value (don't animate everything)
336
+ 2. **Design**: Create storyboards or motion comps for complex animations
337
+ 3. **Spec**: Document trigger, properties, duration, easing, accessibility
338
+ 4. **Implement**: Build using appropriate technology (CSS, WAAPI, library)
339
+ 5. **Review**: Test performance, accessibility, and purpose alignment
340
+ 6. **Maintain**: Document in motion design system for consistency
341
+
342
+ **Motion Design System Components**:
343
+ - **Tokens**: Duration scale, easing functions, delay increments
344
+ - **Patterns**: Standard enter/exit/transition behaviors per component type
345
+ - **Guidelines**: When to animate, when not to, accessibility requirements
346
+ - **Tools**: Approved libraries, prototyping tools, testing procedures
347
+
348
+ **Common Team Pitfalls**:
349
+ - Designer creates beautiful animation that tanks performance
350
+ - Developer implements animation without knowing intended timing/easing
351
+ - No one tests with reduced-motion setting enabled
352
+ - Animation added at the end of sprint as "polish" without proper design
353
+ - No shared motion language — everyone describes motion differently
354
+
355
+ ### When NOT to Animate
356
+ - When the animation adds no information or functional value
357
+ - When the user has indicated they prefer reduced motion
358
+ - When the animation would delay the user from completing their task
359
+ - When it would trigger accessibility issues (seizures, vestibular)
360
+ - When performance would suffer on target devices
361
+ - When it would be distracting during focused work (data entry forms, reading)
362
+ - When the same content would be shown with or without the animation (meaningless decoration)
363
+
364
+ ### Resources and Tools
365
+ - **Cubic-bezier playground**: cubic-bezier.com for custom easing curves
366
+ - **Chrome DevTools**: Performance panel, Animations panel, rendering tab
367
+ - **Can I Use**: Check browser support for animation features
368
+ - **WAAPI Polyfill**: web-animations-js for older browser support
369
+ - **Libraries**: GreenSock (GSAP), Anime.js, Lottie (After Effects to web), Framer Motion (React)
@@ -0,0 +1,79 @@
1
+ # Animation at Work — Design Review Checklist
2
+
3
+ Systematic checklist for reviewing web animations against the 5 chapters
4
+ from *Animation at Work* by Rachel Nabors.
5
+
6
+ ---
7
+
8
+ ## 1. Purpose & Patterns (Chapter 2)
9
+
10
+ - [ ] **Ch 2 — Purpose defined** — Does every animation have a clear purpose?
11
+ - [ ] **Ch 2 — Pattern classified** — Is each animation one of: transition, supplement, feedback, demonstration, decoration?
12
+ - [ ] **Ch 2 — Decorations justified** — Are decorative animations used sparingly and not distracting?
13
+ - [ ] **Ch 2 — Feedback present** — Do interactive elements provide animation feedback on user actions?
14
+ - [ ] **Ch 2 — Transitions contextual** — Do transitions convey spatial relationships between views?
15
+ - [ ] **Ch 2 — Demonstrations skippable** — Can instructional animations be dismissed or skipped?
16
+
17
+ ---
18
+
19
+ ## 2. Timing & Easing (Chapter 1)
20
+
21
+ - [ ] **Ch 1 — Duration appropriate** — Feedback <200ms, transitions 200–500ms, demos <1s?
22
+ - [ ] **Ch 1 — No excessive duration** — Are all functional animations under 1 second?
23
+ - [ ] **Ch 1 — Easing matches direction** — ease-out for enter, ease-in for exit, ease-in-out for reposition?
24
+ - [ ] **Ch 1 — No linear on UI** — Is linear easing only used for continuous motion (progress bars, spinners)?
25
+ - [ ] **Ch 1 — Stagger used** — Are grouped elements staggered for natural feel (overlapping action)?
26
+ - [ ] **Ch 1 — Anticipation present** — Do major animations have subtle preparatory motion?
27
+
28
+ ---
29
+
30
+ ## 3. Technology & Implementation (Chapter 3)
31
+
32
+ - [ ] **Ch 3 — Right tool chosen** — CSS transitions for simple, CSS animations for loops, WAAPI for control?
33
+ - [ ] **Ch 3 — Composite-only properties** — Are only `transform` and `opacity` animated?
34
+ - [ ] **Ch 3 — No layout thrashing** — Are `width`, `height`, `top`, `left`, `margin` NOT animated?
35
+ - [ ] **Ch 3 — will-change used correctly** — Applied before animation, removed after; not overused?
36
+ - [ ] **Ch 3 — RAIL compliance** — Animation frames under 16ms? Response under 100ms?
37
+ - [ ] **Ch 3 — requestAnimationFrame** — Are JS-driven animations using rAF, not setInterval/setTimeout?
38
+
39
+ ---
40
+
41
+ ## 4. Communication & Consistency (Chapter 4)
42
+
43
+ - [ ] **Ch 4 — Animation documented** — Are trigger, duration, easing, properties documented in specs?
44
+ - [ ] **Ch 4 — Motion tokens defined** — Are standard durations and easings defined as design tokens?
45
+ - [ ] **Ch 4 — Naming consistent** — Are animations named consistently across design and code?
46
+ - [ ] **Ch 4 — Storyboards for complex** — Do complex animations have storyboards or motion comps?
47
+ - [ ] **Ch 4 — Design system updated** — Are animation patterns documented in the motion design system?
48
+
49
+ ---
50
+
51
+ ## 5. Accessibility (Chapter 5)
52
+
53
+ - [ ] **Ch 5 — prefers-reduced-motion** — Is the media query implemented for all animations?
54
+ - [ ] **Ch 5 — Safe alternatives** — Are problematic animations replaced (not just removed) when motion reduced?
55
+ - [ ] **Ch 5 — No vestibular triggers** — No uncontrolled parallax, zooming, spinning, large slides?
56
+ - [ ] **Ch 5 — Flash rate safe** — No content flashing more than 3 times per second?
57
+ - [ ] **Ch 5 — Auto-play pausable** — Can all auto-playing animations be paused/stopped?
58
+ - [ ] **Ch 5 — Motion not required** — Is all information available without animation?
59
+ - [ ] **Ch 5 — Mobile tested** — Tested on real low-powered devices, not just dev machine?
60
+
61
+ ---
62
+
63
+ ## Quick Review Workflow
64
+
65
+ 1. **Purpose pass** — Does every animation serve a classified purpose?
66
+ 2. **Timing pass** — Are durations and easings appropriate for each pattern?
67
+ 3. **Performance pass** — Only composite properties animated? No layout triggers?
68
+ 4. **Accessibility pass** — prefers-reduced-motion implemented? No vestibular triggers?
69
+ 5. **Consistency pass** — Are motion tokens and patterns documented and consistent?
70
+ 6. **Prioritize findings** — Missing accessibility > performance issues > wrong timing > documentation gaps
71
+
72
+ ## Severity Levels
73
+
74
+ | Severity | Description | Example |
75
+ |----------|-------------|---------|
76
+ | **Critical** | Accessibility or safety violation | No prefers-reduced-motion, flash rate >3/sec, seizure-triggering content |
77
+ | **High** | Performance or usability issue | Animating layout properties, >1s functional animation, missing feedback |
78
+ | **Medium** | Design quality gap | Wrong easing direction, no stagger, excessive decorations |
79
+ | **Low** | Polish or documentation | Missing motion tokens, undocumented animations, no storyboards |
package/bin/skills.js ADDED
@@ -0,0 +1,85 @@
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require('fs');
4
+ const path = require('path');
5
+ const os = require('os');
6
+
7
+ const args = process.argv.slice(2);
8
+ const command = args[0];
9
+ const skillsRoot = path.join(__dirname, '..');
10
+
11
+ function getAvailableSkills() {
12
+ return fs.readdirSync(skillsRoot).filter(name => {
13
+ const skillPath = path.join(skillsRoot, name);
14
+ return (
15
+ fs.statSync(skillPath).isDirectory() &&
16
+ fs.existsSync(path.join(skillPath, 'SKILL.md'))
17
+ );
18
+ });
19
+ }
20
+
21
+ function copyDir(src, dest) {
22
+ fs.mkdirSync(dest, { recursive: true });
23
+ for (const entry of fs.readdirSync(src)) {
24
+ const srcPath = path.join(src, entry);
25
+ const destPath = path.join(dest, entry);
26
+ if (fs.statSync(srcPath).isDirectory()) {
27
+ copyDir(srcPath, destPath);
28
+ } else {
29
+ fs.copyFileSync(srcPath, destPath);
30
+ }
31
+ }
32
+ }
33
+
34
+ function copySkill(skillName, targetDir) {
35
+ const src = path.join(skillsRoot, skillName);
36
+ if (!fs.existsSync(src)) {
37
+ console.error(`Skill "${skillName}" not found. Run "skills list" to see available skills.`);
38
+ process.exit(1);
39
+ }
40
+ const dest = path.join(targetDir, skillName);
41
+ copyDir(src, dest);
42
+ console.log(`✓ ${skillName} → ${dest}`);
43
+ }
44
+
45
+ const isGlobal = args.includes('--global');
46
+ const targetDir = isGlobal
47
+ ? path.join(os.homedir(), '.claude', 'skills')
48
+ : path.join(process.cwd(), '.claude', 'skills');
49
+
50
+ switch (command) {
51
+ case 'list': {
52
+ const skills = getAvailableSkills();
53
+ console.log('Available skills:\n');
54
+ skills.forEach(s => console.log(` ${s}`));
55
+ break;
56
+ }
57
+
58
+ case 'add': {
59
+ const addAll = args.includes('--all');
60
+ const skillName = args.find(a => !a.startsWith('--') && a !== 'add');
61
+
62
+ if (addAll) {
63
+ const skills = getAvailableSkills();
64
+ skills.forEach(s => copySkill(s, targetDir));
65
+ console.log(`\nInstalled ${skills.length} skills to ${targetDir}`);
66
+ } else if (skillName) {
67
+ copySkill(skillName, targetDir);
68
+ console.log(`\nInstalled to ${targetDir}`);
69
+ } else {
70
+ console.error('Usage: skills add <skill-name> | skills add --all');
71
+ process.exit(1);
72
+ }
73
+ break;
74
+ }
75
+
76
+ default:
77
+ console.log(`
78
+ Usage:
79
+ skills list List all available skills
80
+ skills add <name> Add a skill to .claude/skills/ in current project
81
+ skills add --all Add all skills to current project
82
+ skills add <name> --global Add a skill to ~/.claude/skills/ (global)
83
+ skills add --all --global Add all skills globally
84
+ `);
85
+ }