@punks/cli 3.2.2 → 3.3.1

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 (105) hide show
  1. package/AGENTS.md +4 -2
  2. package/README.md +1 -1
  3. package/dist/BASELINE_CHANGELOG.md +56 -0
  4. package/dist/CHANGELOG.md +32 -0
  5. package/dist/baseline/scaffold-baseline/baseline.json +5 -5
  6. package/dist/baseline/scaffold-baseline/data/catalog/lint-assets.json +4 -1
  7. package/dist/baseline/scaffold-baseline/data/catalog/packs.json +6 -2
  8. package/dist/baseline/scaffold-baseline/data/catalog/skills.json +32 -0
  9. package/dist/baseline/scaffold-baseline/data/subagents/manifest.mjs +1 -0
  10. package/dist/baseline/scaffold-baseline/skills/agnostic/cli/hi-cli/references/post-command-flow.md +6 -1
  11. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/animate/LICENSE +21 -0
  12. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/animate/RECIPES.md +333 -0
  13. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/animate/SKILL.md +203 -0
  14. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/animate/UPSTREAM.md +9 -0
  15. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/improve-mobile-frontend/SKILL.md +109 -0
  16. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/improve-mobile-frontend/UPSTREAM.md +5 -0
  17. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/review-animations/LICENSE +21 -0
  18. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/review-animations/SKILL.md +112 -0
  19. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/review-animations/STANDARDS.md +229 -0
  20. package/dist/baseline/scaffold-baseline/skills/agnostic/frontend/review-animations/UPSTREAM.md +9 -0
  21. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/REFERENCE.md +5 -1
  22. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/SKILL.md +8 -6
  23. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/references/planner-task-graph.md +12 -7
  24. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/requirements-grill/SKILL.md +6 -4
  25. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/requirements-grill/references/artifact-output.md +36 -3
  26. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/requirements-grill/references/grilling-flow.md +18 -1
  27. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/EXAMPLES.md +1 -1
  28. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/REFERENCE.md +4 -3
  29. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/SKILL.md +2 -2
  30. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/concepts/backlog-model.md +6 -6
  31. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/azure-devops-create-payload.md +7 -7
  32. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/github-projects-create-payload.md +12 -12
  33. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/linear-create-payload.md +9 -9
  34. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/monday-create-payload.md +10 -10
  35. package/dist/baseline/scaffold-baseline/skills/frameworks/expo/animate-expo/LICENSE +21 -0
  36. package/dist/baseline/scaffold-baseline/skills/frameworks/expo/animate-expo/RECIPES.md +435 -0
  37. package/dist/baseline/scaffold-baseline/skills/frameworks/expo/animate-expo/SKILL.md +255 -0
  38. package/dist/baseline/scaffold-baseline/skills/frameworks/expo/animate-expo/UPSTREAM.md +9 -0
  39. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/review.md +34 -9
  40. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/router.md +18 -11
  41. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/references/phase-handoff.md +19 -1
  42. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/AUTHORING-HANDOFF.md +14 -11
  43. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/retain-report.md +9 -2
  44. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/return-route.md +6 -8
  45. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/phases/run-review.md +8 -5
  46. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/durable-report.md +29 -14
  47. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/state-graph.md +45 -32
  48. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/references/targets.md +2 -1
  49. package/dist/baseline/scaffold-baseline/skills/phases/review-phase/scripts/review-contract.mjs +86 -12
  50. package/dist/baseline/scaffold-baseline.json +5 -5
  51. package/dist/baseline/scaffold-baseline.tgz +0 -0
  52. package/dist/data/AGENTS.md +1 -1
  53. package/dist/data/subagents/manifest.mjs +1 -0
  54. package/dist/index.js +27 -27
  55. package/dist/skills/agnostic/cli/hi-cli/references/post-command-flow.md +6 -1
  56. package/dist/skills/agnostic/frontend/animate/LICENSE +21 -0
  57. package/dist/skills/agnostic/frontend/animate/RECIPES.md +324 -0
  58. package/dist/skills/agnostic/frontend/animate/SKILL.md +199 -0
  59. package/dist/skills/agnostic/frontend/animate/UPSTREAM.md +9 -0
  60. package/dist/skills/agnostic/frontend/improve-mobile-frontend/SKILL.md +109 -0
  61. package/dist/skills/agnostic/frontend/improve-mobile-frontend/UPSTREAM.md +5 -0
  62. package/dist/skills/agnostic/frontend/review-animations/LICENSE +21 -0
  63. package/dist/skills/agnostic/frontend/review-animations/SKILL.md +112 -0
  64. package/dist/skills/agnostic/frontend/review-animations/STANDARDS.md +187 -0
  65. package/dist/skills/agnostic/frontend/review-animations/UPSTREAM.md +9 -0
  66. package/dist/skills/agnostic/planning/create-plan/REFERENCE.md +5 -1
  67. package/dist/skills/agnostic/planning/create-plan/SKILL.md +8 -6
  68. package/dist/skills/agnostic/planning/create-plan/references/planner-task-graph.md +12 -7
  69. package/dist/skills/agnostic/requirements/requirements-grill/SKILL.md +6 -4
  70. package/dist/skills/agnostic/requirements/requirements-grill/references/artifact-output.md +33 -3
  71. package/dist/skills/agnostic/requirements/requirements-grill/references/grilling-flow.md +18 -1
  72. package/dist/skills/agnostic/requirements/write-backlog/EXAMPLES.md +1 -1
  73. package/dist/skills/agnostic/requirements/write-backlog/REFERENCE.md +4 -3
  74. package/dist/skills/agnostic/requirements/write-backlog/SKILL.md +2 -2
  75. package/dist/skills/agnostic/requirements/write-backlog/assets/concepts/backlog-model.md +6 -6
  76. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/azure-devops-create-payload.md +7 -7
  77. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/github-projects-create-payload.md +12 -12
  78. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/linear-create-payload.md +9 -9
  79. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/monday-create-payload.md +10 -10
  80. package/dist/skills/frameworks/expo/animate-expo/LICENSE +21 -0
  81. package/dist/skills/frameworks/expo/animate-expo/RECIPES.md +385 -0
  82. package/dist/skills/frameworks/expo/animate-expo/SKILL.md +255 -0
  83. package/dist/skills/frameworks/expo/animate-expo/UPSTREAM.md +9 -0
  84. package/dist/skills/phases/delivery-phase/phases/review.md +34 -9
  85. package/dist/skills/phases/delivery-phase/phases/router.md +16 -9
  86. package/dist/skills/phases/delivery-phase/references/phase-handoff.md +19 -1
  87. package/dist/skills/phases/review-phase/AUTHORING-HANDOFF.md +14 -11
  88. package/dist/skills/phases/review-phase/phases/retain-report.md +9 -2
  89. package/dist/skills/phases/review-phase/phases/return-route.md +6 -8
  90. package/dist/skills/phases/review-phase/phases/run-review.md +8 -5
  91. package/dist/skills/phases/review-phase/references/durable-report.md +29 -14
  92. package/dist/skills/phases/review-phase/references/state-graph.md +18 -5
  93. package/dist/skills/phases/review-phase/references/targets.md +2 -1
  94. package/dist/skills/phases/review-phase/scripts/review-contract.mjs +91 -11
  95. package/package.json +52 -9
  96. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/claude.test.ts +0 -130
  97. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/codex.test.ts +0 -135
  98. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/cursor.test.ts +0 -138
  99. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/opencode.test.ts +0 -135
  100. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/contract.test.ts +0 -875
  101. package/dist/baseline/scaffold-baseline/data/scripts/sync-subagents.lifecycle.test.ts +0 -205
  102. package/dist/baseline/scaffold-baseline/data/scripts/sync-subagents.native.test.ts +0 -2765
  103. package/dist/baseline/scaffold-baseline/data/scripts/sync-subagents.test.ts +0 -2108
  104. package/dist/baseline/scaffold-baseline/data/subagents/manifest.test.ts +0 -116
  105. package/dist/skills/frameworks/nestjs/nestjs-best-practices/.gitignore +0 -29
@@ -37,7 +37,12 @@ Then:
37
37
  - treat `.devpunks/specs/prompts/**` as the complete prompt-authoring contract; apply every scoped-prompt criterion it contains
38
38
  - ground scoped prompts in current code evidence: structure, placement, dependencies, and boundaries first; applied coding conventions second; enforced constraints outrank the nearest stable module-family pattern
39
39
  - keep each scoped prompt lean with exact-trigger pointers to co-authored reference content; references disclose content and never create deeper prompt scopes
40
- - render every selected non-phase skill in a `Skill | What / when` table derived from its complete `SKILL.md`
40
+ - render every selected non-phase skill in one final `## Skills` table with
41
+ `Skill | Exact trigger`; each row names the exact invocation condition
42
+ - open every selected installed skill's `SKILL.md`; that installed file remains
43
+ workflow authority
44
+ - keep root `AGENTS.md` table-free; phase wrappers remain global orchestration
45
+ entrypoints and are excluded from scoped tables
41
46
  - always link `opensrc/README.md` from scoped prompts and read it when work depends on third-party library behavior
42
47
  - reconcile only the generated skills, prompts, lint, hooks, scripts, subagents, tools, and wiki assets in scope
43
48
  - preserve repo-owned edits and ask before changing project policy
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Emil Kowalski
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,324 @@
1
+ # Animation Recipes
2
+
3
+ Ready-to-build implementations for the cases that come up most. Start from the recipe, then adapt — don't rebuild from scratch.
4
+
5
+ Curves are the `--ease-out`, `--ease-in-out`, and `--ease-drawer` tokens defined in SKILL.md.
6
+
7
+ ---
8
+
9
+ ## Button press
10
+
11
+ Any pressable element. Instant feedback that the interface heard the user.
12
+
13
+ ```css
14
+ .button {
15
+ transition: transform 160ms var(--ease-out);
16
+ }
17
+
18
+ .button:active {
19
+ transform: scale(0.97);
20
+ }
21
+ ```
22
+
23
+ `scale()` scales children too — the label and icons come along, which is what makes it read as a physical press.
24
+
25
+ No hover gating needed here: `:active` is a real press on touch. Gate any `:hover` styling separately.
26
+
27
+ ---
28
+
29
+ ## Dropdown, popover, menu, select
30
+
31
+ Scales out of its trigger, not out of thin air.
32
+
33
+ ```css
34
+ .popover {
35
+ transform-origin: var(--transform-origin); /* Base UI supplies this */
36
+ transition:
37
+ opacity 200ms var(--ease-out),
38
+ transform 200ms var(--ease-out);
39
+ }
40
+
41
+ .popover[data-starting-style],
42
+ .popover[data-ending-style] {
43
+ opacity: 0;
44
+ transform: scale(0.95);
45
+ }
46
+ ```
47
+
48
+ The `transform-origin` is the whole point — the panel should look like it came out of the thing you clicked.
49
+
50
+ ---
51
+
52
+ ## Tooltip
53
+
54
+ Same shape as a popover, faster, plus the detail most implementations miss.
55
+
56
+ ```css
57
+ .tooltip {
58
+ transform-origin: var(--transform-origin);
59
+ transition:
60
+ transform 125ms var(--ease-out),
61
+ opacity 125ms var(--ease-out);
62
+ }
63
+
64
+ .tooltip[data-starting-style],
65
+ .tooltip[data-ending-style] {
66
+ opacity: 0;
67
+ transform: scale(0.97);
68
+ }
69
+
70
+ /* Once one tooltip is open, neighbours open instantly */
71
+ .tooltip[data-instant] {
72
+ transition-duration: 0ms;
73
+ }
74
+ ```
75
+
76
+ The initial delay prevents accidental activation. After that, skipping both the delay and the animation makes the whole toolbar feel faster.
77
+
78
+ ---
79
+
80
+ ## Modal
81
+
82
+ The one popover that stays centered.
83
+
84
+ ```css
85
+ .modal {
86
+ transform-origin: center; /* exempt — not anchored to a trigger */
87
+ transition:
88
+ opacity 250ms var(--ease-out),
89
+ transform 250ms var(--ease-out);
90
+ }
91
+
92
+ .modal[data-starting-style],
93
+ .modal[data-ending-style] {
94
+ opacity: 0;
95
+ transform: scale(0.96);
96
+ }
97
+
98
+ .backdrop {
99
+ transition: opacity 250ms var(--ease-out);
100
+ }
101
+ ```
102
+
103
+ Animate the backdrop's opacity alongside it so they read as one surface.
104
+
105
+ ---
106
+
107
+ ## Drawer / sheet
108
+
109
+ ```css
110
+ .drawer {
111
+ transform: translateY(0);
112
+ transition: transform 500ms var(--ease-drawer);
113
+ }
114
+
115
+ .drawer[data-closed] {
116
+ transform: translateY(100%);
117
+ }
118
+ ```
119
+
120
+ This is how Vaul hides a drawer before animating it in.
121
+
122
+ Add drag and it becomes a gesture problem — see **Drag to dismiss** below.
123
+
124
+ ---
125
+
126
+ ## Toast
127
+
128
+ ```css
129
+ .toast {
130
+ opacity: 1;
131
+ transform: translateY(0);
132
+ transition:
133
+ opacity 400ms ease,
134
+ transform 400ms ease;
135
+
136
+ @starting-style {
137
+ opacity: 0;
138
+ transform: translateY(100%);
139
+ }
140
+ }
141
+ ```
142
+
143
+ - `ease` rather than `ease-out`, slightly slower than typical UI: Sonner reads as elegant partly because its motion is tuned to the component's personality rather than to the generic UI budget.
144
+ - If `@starting-style` isn't available, fall back to the mount flag:
145
+
146
+ ```jsx
147
+ useEffect(() => { setMounted(true); }, []);
148
+ // <div data-mounted={mounted}>
149
+ ```
150
+
151
+ When toasts stack and the list reflows, the opacity change has to work against the height change. There's no formula for that pair — adjust until it feels right, then check it again the next day.
152
+
153
+ ---
154
+
155
+ ## Accordion / collapse
156
+
157
+ ```css
158
+ .content {
159
+ overflow: hidden;
160
+ transition:
161
+ height 200ms var(--ease-out),
162
+ opacity 200ms var(--ease-out);
163
+ }
164
+ ```
165
+
166
+ Keep it short — this is one of the few animations that costs layout on every frame, so a long duration is expensive as well as sluggish. Measure the content height in JS (or use a headless primitive that supplies it) rather than animating to `auto`.
167
+
168
+ ---
169
+
170
+ ## Stagger a group entrance
171
+
172
+ For a list or grid the user sees occasionally — not for a list they scroll past all day.
173
+
174
+ ```css
175
+ .item {
176
+ opacity: 0;
177
+ transform: translateY(8px);
178
+ animation: fadeIn 300ms var(--ease-out) forwards;
179
+ }
180
+
181
+ .item:nth-child(2) { animation-delay: 50ms; }
182
+ .item:nth-child(3) { animation-delay: 100ms; }
183
+ .item:nth-child(4) { animation-delay: 150ms; }
184
+
185
+ @keyframes fadeIn {
186
+ to {
187
+ opacity: 1;
188
+ transform: translateY(0);
189
+ }
190
+ }
191
+ ```
192
+
193
+ Stagger is decorative — it must never block interaction while it plays.
194
+
195
+ ---
196
+
197
+ ## Hold to confirm
198
+
199
+ For destructive actions where a plain click is too easy to fire by accident.
200
+
201
+ ```css
202
+ .overlay {
203
+ clip-path: inset(0 100% 0 0);
204
+ transition: clip-path 200ms var(--ease-out); /* release: snappy */
205
+ }
206
+
207
+ .button:active .overlay {
208
+ clip-path: inset(0 0 0 0);
209
+ transition: clip-path 2s linear; /* press: slow and deliberate */
210
+ }
211
+
212
+ .button:active {
213
+ transform: scale(0.97);
214
+ }
215
+ ```
216
+
217
+ `linear` is correct here — the fill is a progress indicator, and progress shouldn't ease.
218
+
219
+ ---
220
+
221
+ ## Tab indicator with a color transition
222
+
223
+ Timing individual color transitions across a tab list never quite lands. Clip instead.
224
+
225
+ Duplicate the tab list. Style the copy as the active state — different background, different text color. Clip the copy so only the active tab shows, and animate the clip on change:
226
+
227
+ ```css
228
+ .tabs-active-copy {
229
+ clip-path: inset(0 60% 0 20%); /* driven by the active tab's position */
230
+ transition: clip-path 250ms var(--ease-in-out);
231
+ }
232
+ ```
233
+
234
+ The text and background change together, in perfect sync, because they're one element being revealed rather than two colors being interpolated.
235
+
236
+ ---
237
+
238
+ ## Scroll reveal
239
+
240
+ Marketing surfaces only. Don't do this to functional UI a user visits daily.
241
+
242
+ ```css
243
+ .reveal {
244
+ clip-path: inset(0 0 100% 0);
245
+ transition: clip-path 600ms var(--ease-in-out);
246
+ }
247
+
248
+ .reveal[data-visible] {
249
+ clip-path: inset(0 0 0 0);
250
+ }
251
+ ```
252
+
253
+ Trigger with `IntersectionObserver`, or Motion's `useInView` with `{ once: true, margin: "-100px" }`. Fire it once — re-animating on every scroll-by is an interface fighting its reader.
254
+
255
+ ---
256
+
257
+ ## Drag to dismiss
258
+
259
+ The gesture recipe. Springs, not durations, because the user can reverse mid-motion.
260
+
261
+ ```js
262
+ // Dismiss on a flick, not just on distance
263
+ const timeTaken = Date.now() - dragStartTime.current;
264
+ const velocity = Math.abs(swipeAmount) / timeTaken;
265
+
266
+ if (Math.abs(swipeAmount) >= SWIPE_THRESHOLD || velocity > 0.11) {
267
+ dismiss();
268
+ }
269
+ ```
270
+
271
+ ```js
272
+ // Set transform on the dragged element directly.
273
+ // Driving it through a CSS variable on the parent recalcs styles for every child.
274
+ element.style.transform = `translateY(${distance}px)`;
275
+ ```
276
+
277
+ Four details that separate a good drag from a bad one:
278
+
279
+ - **Pointer capture** once the drag starts, so it continues when the pointer leaves the element's bounds.
280
+ - **Multi-touch protection** — `if (isDragging) return` on new touch points, or switching fingers mid-drag makes the element jump.
281
+ - **Damping past boundaries** — dragging beyond a natural edge moves the element less the further it goes. Real things slow before they stop.
282
+ - **Friction, not a wall** — allow the over-drag with rising resistance rather than refusing it.
283
+
284
+ Settle with a spring so an interrupted drag keeps its velocity:
285
+
286
+ ```js
287
+ { type: "spring", duration: 0.5, bounce: 0.2 }
288
+ ```
289
+
290
+ ---
291
+
292
+ ## Masking a crossfade that won't settle
293
+
294
+ When two states overlap visibly during a transition and no amount of easing or duration tuning fixes it, blur the seam:
295
+
296
+ ```css
297
+ .content {
298
+ transition:
299
+ filter 200ms ease,
300
+ opacity 200ms ease;
301
+ }
302
+
303
+ .content.transitioning {
304
+ filter: blur(2px);
305
+ opacity: 0.7;
306
+ }
307
+ ```
308
+
309
+ Without blur the eye reads two distinct objects swapping. Blur blends them into one perceived transformation. Keep it under 20px — heavy blur is expensive, especially in Safari.
310
+
311
+ ---
312
+
313
+ ## Programmatic, without a library
314
+
315
+ When the motion needs JS control but not a dependency, WAAPI gives you CSS-grade performance:
316
+
317
+ ```js
318
+ element.animate(
319
+ [{ clipPath: 'inset(0 0 100% 0)' }, { clipPath: 'inset(0 0 0 0)' }],
320
+ { duration: 1000, fill: 'forwards', easing: 'cubic-bezier(0.77, 0, 0.175, 1)' }
321
+ );
322
+ ```
323
+
324
+ Hardware-accelerated, interruptible, no bundle cost.
@@ -0,0 +1,199 @@
1
+ ---
2
+ name: animate
3
+ description: Build an animation from scratch, making the decisions in the order that determines whether it feels right — should it animate at all, what purpose, which tool, which properties, which curve and duration, how it interrupts, how it exits. Writes the implementation. Use when asked to animate something, add motion, make a component feel alive, or build a transition. For critiquing existing motion use review-animations; for auditing a whole codebase use improve-animations.
4
+ ---
5
+
6
+ # Building Animations
7
+
8
+ A construction skill. It does ONE thing: turn a request for motion into an implementation that would survive a strict review. It does not audit a codebase (that's `improve-animations`), critique a diff (that's `review-animations`), hunt for places that could animate (that's `find-animation-opportunities`), or build for React Native (that's `animate-expo`).
9
+
10
+ ## Operating Posture
11
+
12
+ You are a senior design engineer building the animation yourself. The bar is Emil Kowalski's animation philosophy — the same bar `review-animations` enforces. Write it so it passes that review the first time.
13
+
14
+ Two failure modes, and the first is worse:
15
+
16
+ 1. **Animating something that shouldn't animate.** The gate below exists to produce zero lines of code sometimes. That's a success, not a dodge.
17
+ 2. **Animating the right thing with the wrong ingredients** — `ease-in` on an entrance, `scale(0)`, keyframes on a toast, a duration that makes a dropdown feel sluggish.
18
+
19
+ Never present motion options as a menu. Make the call, state the reasoning in one line, write the code.
20
+
21
+ ## Hard Rules
22
+
23
+ 1. **Run the sequence in order.** Steps 1 and 2 gate everything. Don't reach for a curve before you know whether it animates at all.
24
+ 2. **No approximated values.** Every curve, duration, and spring config comes from the tables below. Never invent `cubic-bezier(0.4, 0, 0.2, 1)` because it looks familiar.
25
+ 3. **Extend the codebase's tokens, don't fork them.** If `--ease-out` or a duration scale already exists, use it. Adding a parallel system is a defect.
26
+ 4. **Reduced motion and hover gating ship with the animation**, not as a follow-up.
27
+ 5. **Cheapest tool that works.** Don't install a motion library for a fade.
28
+
29
+ ## The Build Sequence
30
+
31
+ ### 1. Should this animate at all?
32
+
33
+ | Frequency | Decision |
34
+ | --- | --- |
35
+ | 100+ times/day (keyboard shortcuts, command palette toggle) | **No animation. Ever.** Stop here. |
36
+ | Tens of times/day (hover effects, list navigation) | Near-imperceptible only — fast and subtle, or nothing |
37
+ | Occasional (modals, drawers, toasts) | Standard animation |
38
+ | Rare / first-time (onboarding, success, celebration) | The delight budget lives here |
39
+
40
+ **Keyboard-initiated actions are a disqualifier, not a judgment call.** Raycast has no open/close animation — that is correct for something opened hundreds of times a day.
41
+
42
+ If the request fails this gate, say so plainly and don't write the animation. Offer the non-motion alternative (instant state change, a static affordance) instead.
43
+
44
+ ### 2. What is the purpose?
45
+
46
+ Name it in one of these words before continuing:
47
+
48
+ - **Feedback** — confirming the interface heard the user
49
+ - **Spatial consistency** — showing where something came from or went
50
+ - **State indication** — making a state change legible
51
+ - **Preventing a jarring change** — bridging content that would otherwise teleport
52
+ - **Explanation** — demonstrating how something works (marketing/onboarding only)
53
+ - **Delight** — allowed *only* at the rare/first-time tier
54
+
55
+ Can't name it? Don't build it. "It looks cool" on a frequently-seen element is a reason to stop.
56
+
57
+ Also check **function**: data the user is reading or acting on should not move for style. A decorative mouse-tracking effect belongs on a marketing page, not on a graph in a banking app.
58
+
59
+ ### 3. Pick the tool — cheapest that works
60
+
61
+ Walk down; stop at the first that fits.
62
+
63
+ | Need | Tool |
64
+ | --- | --- |
65
+ | Hover, press, color, a state toggle you control with a class or attribute | **CSS transition** |
66
+ | Entry animation on mount, no JS state | **CSS `@starting-style`** |
67
+ | Predetermined motion that must stay smooth while the page is busy loading | **CSS animation** (runs off the main thread) |
68
+ | Programmatic control with CSS performance, no library | **WAAPI** (`element.animate()`) |
69
+ | Springs, layout animations, exit animations, gesture-driven values | **Motion** (`motion.dev`) |
70
+
71
+ CSS animations beat JS under load — they run off the main thread, while `requestAnimationFrame`-based animation drops frames while the browser loads, scripts, or paints. Use CSS for predetermined motion, JS for dynamic and interruptible motion.
72
+
73
+ If the task needs a *component* rather than an animation — a toast, a drawer, a command menu, a dropdown — stop and invoke `pick-ui-library`. Hand-rolling those is how you end up with a `<div>` dropdown and no focus management.
74
+
75
+ ### 4. Pick the properties
76
+
77
+ - **`transform` and `opacity` only.** They skip layout and paint and run on the GPU. `width`/`height`/`margin`/`padding`/`top`/`left` trigger all three. (`clip-path` is the sanctioned fourth — see RECIPES.md. `height` is tolerated only for accordions, where there's no transform equivalent.)
78
+ - **Never `scale(0)`.** Start from `scale(0.9–0.97)` + `opacity: 0`. Nothing in the real world appears from nothing.
79
+ - **`transform-origin` at the trigger** for popovers, dropdowns, menus, tooltips — `var(--transform-origin)` in Base UI. **Modals are exempt**; they're not anchored to a trigger, so they stay centered.
80
+ - **Percentages in `translate()`** are relative to the element's own size — `translateY(100%)` moves by its own height whatever the content. Prefer over hardcoded pixels.
81
+ - **In Motion, use the full transform string.** `x`/`y`/`scale` shorthands are not hardware-accelerated and drop frames under load:
82
+
83
+ ```jsx
84
+ <motion.div animate={{ x: 100 }} /> // drops frames under load
85
+ <motion.div animate={{ transform: "translateX(100px)" }} /> // hardware accelerated
86
+ ```
87
+
88
+ - **Never drive a child's transform from a CSS variable on the parent** — it recalculates styles for every child. Set `transform` on the element directly.
89
+
90
+ ### 5. Easing and duration — or a spring
91
+
92
+ **Easing**, in decision order:
93
+
94
+ | Situation | Easing |
95
+ | --- | --- |
96
+ | Entering or exiting | `ease-out` |
97
+ | Moving / morphing on screen | `ease-in-out` |
98
+ | Hover / color change | `ease` |
99
+ | Constant motion (marquee, progress) | `linear` |
100
+ | Default | `ease-out` |
101
+
102
+ **Never `ease-in` on UI.** It starts slow, delaying the exact moment the user is watching. `ease-out` at 200ms *feels* faster than `ease-in` at 200ms.
103
+
104
+ Built-in CSS easings are too weak. Use these:
105
+
106
+ ```css
107
+ --ease-out: cubic-bezier(0.23, 1, 0.32, 1); /* strong ease-out for UI */
108
+ --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1); /* strong ease-in-out for on-screen movement */
109
+ --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1); /* iOS-like drawer curve (Ionic) */
110
+ ```
111
+
112
+ Need a curve that isn't here? Take it from [easing.dev](https://easing.dev/) or [easings.co](https://easings.co/). Don't hand-roll one.
113
+
114
+ **Duration:**
115
+
116
+ | Element | Duration |
117
+ | --- | --- |
118
+ | Button press feedback | 100–160ms |
119
+ | Tooltips, small popovers | 125–200ms |
120
+ | Dropdowns, selects | 150–250ms |
121
+ | Modals, drawers | 200–500ms |
122
+ | Marketing / explanatory | Can be longer |
123
+
124
+ **UI animations stay under 300ms.** A 180ms dropdown feels more responsive than a 400ms one.
125
+
126
+ **Reach for a spring instead** when the motion is drag with momentum, an element that should feel alive, a gesture the user can interrupt or reverse, or decorative mouse-tracking:
127
+
128
+ ```js
129
+ { type: "spring", duration: 0.5, bounce: 0.2 } // Apple-style — easier to reason about
130
+ { type: "spring", mass: 1, stiffness: 100, damping: 10 } // traditional physics — more control
131
+ ```
132
+
133
+ Keep bounce at 0.1–0.3, and avoid bounce in most UI — reserve it for drag-to-dismiss and playful interactions.
134
+
135
+ ### 6. Interruption and exit
136
+
137
+ - **Transitions, not keyframes, for anything triggered rapidly** — toasts, toggles, anything a user can fire twice in a second. Transitions retarget from the current value; keyframes restart from zero.
138
+ - **Springs for gestures**, because they carry velocity through an interruption.
139
+ - **Exit the way it entered.** A toast that slides in from the bottom leaves through the bottom. Symmetric paths are what make swipe-to-dismiss feel obvious.
140
+ - **Asymmetric timing where the user is deciding.** Slow on the deliberate phase (a hold-to-confirm press: 2s linear), snappy on the system response (release: 200ms ease-out).
141
+
142
+ ### 7. Reduced motion and pointer gating
143
+
144
+ Ships with the animation, every time.
145
+
146
+ ```css
147
+ @media (prefers-reduced-motion: reduce) {
148
+ .element { animation: fade 0.2s ease; } /* keep opacity/color, drop transform-based motion */
149
+ }
150
+
151
+ @media (hover: hover) and (pointer: fine) {
152
+ .element:hover { transform: scale(1.05); } /* touch fires false hovers on tap */
153
+ }
154
+ ```
155
+
156
+ ```jsx
157
+ const reduce = useReducedMotion();
158
+ const closedX = reduce ? 0 : '-100%';
159
+ ```
160
+
161
+ Reduced motion means **fewer and gentler** animations, not zero — keep transitions that aid comprehension, remove movement and position changes.
162
+
163
+ ## Recipes
164
+
165
+ For ready-to-build implementations of the common cases — button press, dropdown, tooltip, modal, drawer, toast, accordion, stagger, hold-to-confirm, tab indicator, scroll reveal, drag-to-dismiss — see [RECIPES.md](RECIPES.md). Load it whenever the request matches one of those components; start from the recipe rather than from a blank file.
166
+
167
+ ## Never Ship
168
+
169
+ Self-check before you finish. Each of these is an automatic block in `review-animations`:
170
+
171
+ | Never | Instead |
172
+ | --- | --- |
173
+ | `transition: all` | Name the exact properties |
174
+ | `transform: scale(0)` entrance | `scale(0.95)` + `opacity: 0` |
175
+ | `ease-in` on a UI element | `ease-out` or a strong custom curve |
176
+ | Built-in `ease-out` on a deliberate animation | `cubic-bezier(0.23, 1, 0.32, 1)` |
177
+ | Animation on a keyboard shortcut or 100+/day action | No animation |
178
+ | UI duration over 300ms with no reason | 150–250ms |
179
+ | `transform-origin: center` on a trigger-anchored popover | `var(--transform-origin)` (modals exempt) |
180
+ | Keyframes on toasts, toggles, rapidly-triggered elements | CSS transitions |
181
+ | Animating `width`/`height`/`margin`/`padding`/`top`/`left` | `transform` / `opacity` |
182
+ | Motion `x`/`y`/`scale` props under load | Full `transform` string |
183
+ | Ungated `:hover` motion | `@media (hover: hover) and (pointer: fine)` |
184
+ | Missing `prefers-reduced-motion` | Gentler variant, not zero |
185
+ | Everything entering at once | 30–80ms stagger |
186
+
187
+ ## Output
188
+
189
+ Write the code. Then, in at most a few lines:
190
+
191
+ - **The gate result** — frequency tier and the named purpose. If something in the request was rejected, say which and why.
192
+ - **The ingredients** — tool, properties, curve, duration or spring config, in one line each.
193
+ - **What to feel-check** — if the result depends on feel you can't judge from code (a crossfade, a spring's bounce, the opacity/height balance in an entering list), say so and point at the check: play it at 2–5× duration or in the DevTools animation inspector, step it frame by frame, test gestures on a real device, and look again the next day with fresh eyes.
194
+
195
+ Don't pad this into a report. The code is the deliverable.
196
+
197
+ ## Tone
198
+
199
+ Opinionated and brief. When the honest answer is "this shouldn't animate," give it — that answer is the reason this skill exists. When feel genuinely can't be settled from code, say so instead of guessing at a value.
@@ -0,0 +1,9 @@
1
+ # Upstream provenance
2
+
3
+ Copied without modification from [`emilkowalski/skills`](https://github.com/emilkowalski/skills/tree/e879241fab3cdb22e8d95587cdbf40b57a88d7da/skills/animate) at commit:
4
+
5
+ ```text
6
+ e879241fab3cdb22e8d95587cdbf40b57a88d7da
7
+ ```
8
+
9
+ The adjacent `LICENSE` is the byte-identical upstream MIT license retained for this skill.
@@ -0,0 +1,109 @@
1
+ ---
2
+ name: improve-mobile-frontend
3
+ description: Improve mobile-web frontend behavior across touch interactions, viewport sizing, safe areas, gesture ownership, browser chrome, and real-device validation. Use when building or reviewing phone-focused web UI, fixing behavior that works in desktop emulation but fails on a phone, or auditing hover, tap, input zoom, pull-to-refresh, carousel, notch, or theme-color defects.
4
+ ---
5
+
6
+ # Improve Mobile Frontend
7
+
8
+ Treat mobile behavior as an interaction contract, not a smaller desktop layout. Inspect the existing viewport metadata, global CSS, interactive controls, and gesture surfaces before changing code. Apply the narrowest rule that fixes the observed behavior and preserves keyboard focus, text selection, scrolling, zoom, and assistive technology.
9
+
10
+ ## Improvement loop
11
+
12
+ 1. Reproduce each defect on its actual interaction path: touch, scroll, focus, rotation, installed-app mode, or browser chrome transition. Record which browser and device state exposes it.
13
+ 2. Map the defect to the rules below. Check existing global and component rules first so the fix extends the current system.
14
+ 3. Implement the smallest scoped change. Global viewport or overscroll rules require a product-level reason; component behavior stays with the component.
15
+ 4. Verify keyboard focus, visible focus indicators, text selection where users need to copy or edit, pinch zoom, screen-reader semantics, vertical scrolling, and reduced-motion behavior remain intact.
16
+ 5. Test the affected path on real iOS and Android hardware when available. Emulation is useful preflight, never final proof. Report the exact devices and browsers tested; name missing hardware proof as a validation gap.
17
+
18
+ Completion means every observed defect has a scoped rule, its accessibility counterchecks pass, and real-device evidence or an explicit evidence gap is recorded.
19
+
20
+ ## Interaction rules
21
+
22
+ ### Hover belongs to hover-capable pointers
23
+
24
+ Touch browsers can synthesize `:hover` after a tap and leave the visual state stuck. Gate hover-only decoration and motion:
25
+
26
+ ```css
27
+ @media (hover: hover) and (pointer: fine) {
28
+ .control:hover {
29
+ /* hover-only feedback */
30
+ }
31
+ }
32
+ ```
33
+
34
+ Keep focus and active feedback outside that query. A keyboard user still needs `:focus-visible`; a touch user still needs immediate pressed feedback.
35
+
36
+ ### Tap feedback should be deliberate
37
+
38
+ Provide feedback on pointer down through `:active`, component state, or an equivalent immediate response. `touch-action: manipulation` suits ordinary buttons and links when double-tap gesture handling is unnecessary:
39
+
40
+ ```css
41
+ .control {
42
+ touch-action: manipulation;
43
+ }
44
+ ```
45
+
46
+ Remove `-webkit-tap-highlight-color` only when the component supplies an equally visible pressed state. Prefer a scoped transparent highlight on those controls; a blanket reset can erase the only tap acknowledgement.
47
+
48
+ ### Viewport height expresses intent
49
+
50
+ Use `100dvh` for app shells that must track the currently visible viewport as browser chrome expands and collapses. Use `100svh` for hero or landing sections that must fit without being hidden when browser chrome is fully visible. Prefer `min-height` over fixed `height` when content may grow, and retain a compatible fallback when the supported browser matrix requires it.
51
+
52
+ ### Inputs remain readable
53
+
54
+ Text inputs, textareas, and selects use a computed font size of at least `16px` on small screens to prevent focus zoom in iOS Safari. Do not disable user zoom to hide this symptom. Preserve labels, focus visibility, error association, and adequate touch targets.
55
+
56
+ ### Scroll ownership is explicit
57
+
58
+ Choose pull-to-refresh and scroll chaining behavior per surface. `overscroll-behavior: none` on `html, body` is appropriate only for an app-like experience that deliberately owns the root gesture and provides any needed refresh affordance. Prefer `contain` or a scoped scroll container when only a modal, sheet, map, or feed must stop chaining. Content sites normally retain native page scrolling and refresh.
59
+
60
+ For a horizontal carousel or swipe surface, declare vertical-page ownership explicitly:
61
+
62
+ ```css
63
+ .carousel-gesture-surface {
64
+ touch-action: pan-y;
65
+ }
66
+ ```
67
+
68
+ The gesture implementation then owns horizontal movement while the browser keeps vertical scrolling. Apply the rule only to the actual gesture surface, and keep controls inside it operable by keyboard and assistive technology.
69
+
70
+ ### Selection stays available where meaningful
71
+
72
+ `user-select: none` may prevent accidental long-press selection on button-like controls or drag handles. Scope it to those controls. Text, editable content, code, identifiers, and other copyable information retain selection; native semantic controls are preferred over making arbitrary text behave like a button.
73
+
74
+ ## Device integration
75
+
76
+ ### Safe areas
77
+
78
+ Use `viewport-fit=cover` only with safe-area compensation. Apply `env(safe-area-inset-top)`, `-right`, `-bottom`, and `-left` to the edge-owning shell or fixed chrome, usually in addition to its normal spacing:
79
+
80
+ ```css
81
+ .app-shell {
82
+ padding-bottom: calc(var(--space-4) + env(safe-area-inset-bottom));
83
+ }
84
+ ```
85
+
86
+ Do not add safe-area padding indiscriminately to every nested container. Verify portrait, landscape, keyboard-open, and installed-app states so content neither collides with a cutout nor receives doubled spacing.
87
+
88
+ ### Browser chrome color
89
+
90
+ Provide `theme-color` for each supported color scheme so browser chrome matches the page:
91
+
92
+ ```html
93
+ <meta name="theme-color" content="#ffffff" media="(prefers-color-scheme: light)">
94
+ <meta name="theme-color" content="#0b0b0b" media="(prefers-color-scheme: dark)">
95
+ ```
96
+
97
+ Keep these values aligned with the actual surface colors and any framework metadata API. Verify browsers that ignore `media` still receive a sensible default.
98
+
99
+ ## Delivery evidence
100
+
101
+ Report:
102
+
103
+ - defects fixed and the scope chosen for each rule;
104
+ - preserved focus, zoom, selection, and scroll behavior;
105
+ - viewport, orientation, and browser-chrome states exercised;
106
+ - real device, OS, and browser versions tested;
107
+ - remaining device or browser coverage gaps.
108
+
109
+ See [UPSTREAM.md](UPSTREAM.md) for source attribution.
@@ -0,0 +1,5 @@
1
+ # Source attribution
2
+
3
+ This skill is an original, implementation-focused adaptation of mobile-web guidance attributed to Emil Kowalski in an image supplied by the user on 2026-08-19. The supplied image pairs common phone-browser defects with remedies covering hover capability queries, tap highlighting, dynamic and small viewport units, input font sizing, touch feedback, overscroll, safe areas, selection, carousel gesture ownership, theme colors, and real-hardware testing.
4
+
5
+ No canonical publication URL or source repository was supplied. The guidance was rewritten, expanded with accessibility and scoping constraints, and is not represented as a byte-identical upstream work.