@skilly-hand/skilly-hand 0.26.0 → 0.26.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.
package/CHANGELOG.md CHANGED
@@ -16,6 +16,23 @@ All notable changes to this project are documented in this file.
16
16
  ### Removed
17
17
  - _None._
18
18
 
19
+ ## [0.26.1] - 2026-05-03
20
+ [View on npm](https://www.npmjs.com/package/@skilly-hand/skilly-hand/v/0.26.1)
21
+
22
+ ### Added
23
+ - Added portable `gsap-animation` skill with official-source GSAP guidance for timelines, ScrollTrigger, React `useGSAP`, plugin selection, performance, cleanup, and reduced-motion patterns.
24
+ - Added GSAP project detection so installs recommend `gsap-animation` when `gsap` or `@gsap/react` is present.
25
+
26
+ ### Changed
27
+ - Updated `frontend-design` to route advanced motion work through `gsap-animation` and include the new critique workflow in catalog metadata.
28
+ - Updated selected skill installation to include portable skill dependencies automatically.
29
+
30
+ ### Fixed
31
+ - _None._
32
+
33
+ ### Removed
34
+ - _None._
35
+
19
36
  ## [0.26.0] - 2026-05-01
20
37
  [View on npm](https://www.npmjs.com/package/@skilly-hand/skilly-hand/v/0.26.0)
21
38
 
package/catalog/README.md CHANGED
@@ -8,7 +8,8 @@ Published portable skills consumed by the `skilly-hand` CLI.
8
8
  | `agents-root-orchestrator` | Author root AGENTS.md as a Where/What/When orchestrator that routes tasks and skill invocation clearly. | core, workflow, orchestration | all |
9
9
  | `angular-guidelines` | Guide Angular code generation, review, and performance tuning using latest stable Angular verification, official Angular skill guidance, and modern framework best practices. Trigger: generating, reviewing, refactoring, or optimizing Angular code artifacts in Angular projects. | angular, frontend, workflow, best-practices | all |
10
10
  | `figma-mcp-0to1` | Guide users from Figma MCP installation and authentication through first canvas creation, with function-level tool coverage and operational recovery patterns. | figma, mcp, workflow, design | all |
11
- | `frontend-design` | Project-aware frontend design skill that detects the existing tech stack, UI libraries, CSS variables, and design tokens before proposing any UI work. Supports greenfield projects via DESIGN.md context setup, and includes post-generation motion and visual refinement phases. | frontend, design, workflow, ui, motion, greenfield | all |
11
+ | `frontend-design` | Project-aware frontend design skill that detects the existing tech stack, UI libraries, CSS variables, and design tokens before proposing any UI work. Supports greenfield projects via DESIGN.md context setup, post-generation critique, visual refinement, and GSAP-aware motion polish. | frontend, design, workflow, ui, motion, greenfield | all |
12
+ | `gsap-animation` | Guide GSAP animation implementation using only official GSAP documentation and the official greensock/gsap-skills source material. Trigger: implementing, reviewing, or choosing GSAP for frontend motion, timelines, ScrollTrigger, React useGSAP, JavaScript animation libraries, or advanced UI animation. | frontend, animation, motion, gsap, workflow | all |
12
13
  | `output-optimizer` | Optimize output token consumption through compact interpreter modes with controlled expansion when complexity, ambiguity, or risk requires more detail. Trigger: minimizing response verbosity while preserving clarity and correctness. | core, workflow, efficiency, communication | all |
13
14
  | `project-security` | Scan project configuration and release surfaces for leak and security risks, and enforce security gates on commit, push, and publish workflows across GitHub, GitLab, npm, pnpm, yarn, and generic CI. Trigger: validating repository security posture, preventing secret leaks, or hardening delivery pipelines. | security, workflow, quality, core | all |
14
15
  | `project-teacher` | Scan the active project and teach any concept, code path, or decision using verified information, interactive questions, and simple explanations. Trigger: user asks to explain, understand, clarify, or learn about anything in the project or codebase. | core, workflow, education | all |
@@ -4,6 +4,7 @@
4
4
  "angular-guidelines",
5
5
  "figma-mcp-0to1",
6
6
  "frontend-design",
7
+ "gsap-animation",
7
8
  "output-optimizer",
8
9
  "project-security",
9
10
  "project-teacher",
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  name: "frontend-design"
3
- description: "Project-aware frontend design skill that detects the existing tech stack, UI libraries, CSS variables, and design tokens before proposing any UI work. Supports greenfield projects via DESIGN.md context setup, and includes post-generation motion and visual refinement phases."
3
+ description: "Project-aware frontend design skill that detects the existing tech stack, UI libraries, CSS variables, and design tokens before proposing any UI work. Supports greenfield projects via DESIGN.md context setup, post-generation critique, visual refinement, and GSAP-aware motion polish."
4
4
  skillMetadata:
5
5
  author: "skilly-hand"
6
- last-edit: "2026-04-05"
6
+ last-edit: "2026-05-03"
7
7
  license: "Apache-2.0"
8
- version: "1.1.0"
9
- changelog: "v1.1.0: Added design-context-setter agent for greenfield/DESIGN.md workflow; added visual-refiner agent for post-generation quality evaluation; added motion-designer agent for stack-aware micro-interactions; added aesthetic-archetypes reference asset; expanded SKILL.md routing map with optional motion and refinement phases; upgraded component-designer with interaction states checklist and aesthetic principles"
10
- auto-invoke: "Designing or generating UI components, pages, or layouts in a web or mobile project; setting up visual direction for a greenfield project; adding motion or micro-interactions to existing UI; refining or polishing generated UI output"
8
+ version: "1.3.0"
9
+ changelog: "Added GSAP-aware motion routing through gsap-animation while preserving critique workflow; improves advanced frontend animation handoffs with official-source GSAP guidance; affects frontend-design motion sequencing, metadata, and catalog dependencies"
10
+ auto-invoke: "Designing or generating UI components, pages, or layouts in a web or mobile project; setting up visual direction for a greenfield project; critiquing generated UI for AI slop; adding motion or micro-interactions to existing UI; refining or polishing generated UI output"
11
11
  allowed-tools:
12
12
  - "Read"
13
13
  - "Grep"
@@ -15,6 +15,8 @@ skillMetadata:
15
15
  - "Bash"
16
16
  - "Edit"
17
17
  - "Write"
18
+ - "Task"
19
+ - "SubAgent"
18
20
  ---
19
21
  # Frontend Design Guide
20
22
 
@@ -45,8 +47,9 @@ Always run stack detection first. Never skip to design.
45
47
  | 0 (always first) | Detect framework, UI library, CSS approach, tokens, and existing patterns | [agents/stack-detector.md](agents/stack-detector.md) |
46
48
  | 0b (if no DESIGN.md and no existing components) | Gather design intent and create DESIGN.md | [agents/design-context-setter.md](agents/design-context-setter.md) |
47
49
  | 1 (only after confirmation) | Design and implement components using confirmed stack | [agents/component-designer.md](agents/component-designer.md) |
48
- | 2 (optional) | Add motion and micro-interactions | [agents/motion-designer.md](agents/motion-designer.md) |
49
- | 3 (optional) | Evaluate quality and refine the output | [agents/visual-refiner.md](agents/visual-refiner.md) |
50
+ | 2 (mandatory after generation) | Challenge the output for AI slop, weak hierarchy, heuristic failures, and unclear product fit | [agents/critique.md](agents/critique.md) |
51
+ | 3 (after critique) | Apply visual quality refinements routed by critique | [agents/visual-refiner.md](agents/visual-refiner.md) |
52
+ | 4 (optional) | Add motion and micro-interactions, preferring GSAP handoff for advanced motion | [agents/motion-designer.md](agents/motion-designer.md) |
50
53
 
51
54
  ---
52
55
 
@@ -58,8 +61,9 @@ Always run stack detection first. Never skip to design.
58
61
  4. **If anything is unclear or ambiguous, ask** — do not proceed with partial or uncertain information.
59
62
  5. **Scan existing tokens and components** — read what already exists before proposing anything.
60
63
  6. **Design with confirmed context only** — hand off to `component-designer` only after steps 2–4 are complete.
61
- 7. **Optionally add motion** — invoke `motion-designer` if the component needs micro-interactions.
62
- 8. **Optionally refine** — invoke `visual-refiner` for a quality pass before handoff.
64
+ 7. **Critique after generation** — invoke `critique` for a frontend-only challenge pass before polish.
65
+ 8. **Refine from critique** — invoke `visual-refiner` for visual fixes routed by critique.
66
+ 9. **Optionally add motion** — invoke `motion-designer` if critique, refinement, or the user identifies a motion need. For timelines, scroll reveals, richer micro-interactions, lifecycle-safe framework animation, or plugin decisions, route through `gsap-animation`.
63
67
 
64
68
  ---
65
69
 
@@ -190,8 +194,12 @@ Ready to implement?
190
194
  YES -> Hand off to component-designer with full confirmed context
191
195
 
192
196
  After generation:
197
+ -> Invoke critique to challenge design quality and route fixes
198
+ -> Invoke visual-refiner for critique-routed visual fixes
193
199
  -> Does the component need motion? -> Invoke motion-designer
194
- -> Does the output need a quality pass? -> Invoke visual-refiner
200
+ -> Does motion need timelines, ScrollTrigger, framework cleanup, or plugins?
201
+ YES -> Use gsap-animation for official-source GSAP guidance
202
+ NO -> Use confirmed stack primitives
195
203
  ```
196
204
 
197
205
  ---
@@ -275,7 +283,8 @@ find src/components -maxdepth 2 -name "*.tsx" -o -name "*.vue" | head -10
275
283
  - Stack detection procedure: [agents/stack-detector.md](agents/stack-detector.md)
276
284
  - Design context setup (greenfield): [agents/design-context-setter.md](agents/design-context-setter.md)
277
285
  - Component design rules: [agents/component-designer.md](agents/component-designer.md)
278
- - Motion and micro-interactions: [agents/motion-designer.md](agents/motion-designer.md)
286
+ - Frontend design critique: [agents/critique.md](agents/critique.md)
279
287
  - Visual quality refinement: [agents/visual-refiner.md](agents/visual-refiner.md)
288
+ - Motion and micro-interactions: [agents/motion-designer.md](agents/motion-designer.md)
280
289
  - Full scan checklist: [assets/stack-scan-checklist.md](assets/stack-scan-checklist.md)
281
290
  - Aesthetic archetypes reference: [assets/aesthetic-archetypes.md](assets/aesthetic-archetypes.md)
@@ -0,0 +1,190 @@
1
+ # Critique
2
+
3
+ ## Precondition
4
+
5
+ **Run only after `component-designer` has produced or proposed a concrete UI.**
6
+
7
+ This agent is the frontend-design challenge gate. It acts like a frontend-only roaster: direct, skeptical, and useful. Its job is to decide whether the design feels intentional or like generic AI output before `visual-refiner` applies polish.
8
+
9
+ Before critiquing:
10
+
11
+ 1. Confirm stack detection has completed and the user accepted the stack summary.
12
+ 2. Read `DESIGN.md` if it exists.
13
+ 3. Inspect the generated/proposed UI source and, when available, the rendered page.
14
+ 4. Compare against sampled project components, tokens, and interaction patterns.
15
+
16
+ Do not use this agent when:
17
+
18
+ - No concrete UI exists yet.
19
+ - The request is only stack discovery or design brief creation.
20
+ - The user explicitly asks to skip critique.
21
+
22
+ ---
23
+
24
+ ## Critique Principles
25
+
26
+ - Challenge the design, not the user.
27
+ - Name the strongest weakness first.
28
+ - Prefer evidence from the codebase, `DESIGN.md`, or rendered UI over taste alone.
29
+ - Keep the roast constructive: a sharp sentence that exposes the gap, followed by a fix path.
30
+ - Do not apply changes in this agent. Route fixes to the right follow-up agent or skill.
31
+
32
+ ---
33
+
34
+ ## Evaluation Protocol
35
+
36
+ Run all six passes. Do not skip a pass because the UI "mostly works."
37
+
38
+ ### Pass 1 - Anti-Slop Detection
39
+
40
+ Flag visible tells of generic AI design. Use project evidence to decide whether a pattern is intentional or sloppy.
41
+
42
+ | Area | Patterns to Challenge |
43
+ | --- | --- |
44
+ | Visual details | Glassmorphism everywhere, generic rounded rectangles with shadows, thick side accent borders, decorative tiny charts, unexplained glow effects |
45
+ | Typography | Flat type hierarchy, overused default fonts, single font for every role, monospace as "technical" shorthand, all-caps body text |
46
+ | Color and contrast | Purple/violet gradients by reflex, neon-on-dark by reflex, gradient text, pure black or pure white, gray text on colored backgrounds, low contrast |
47
+ | Layout and space | Everything centered, hero metric blocks by default, identical card grids, monotonous spacing, nested cards, wrapping every section in cards, long line length |
48
+ | Motion | Bounce/elastic easing, motion without state meaning, animated layout properties |
49
+ | Interaction | Every button styled as primary, hidden actions, redundant labels, missing focus/disabled/loading states |
50
+ | Responsive | Critical features hidden on mobile, touch targets too small, desktop layout merely squeezed |
51
+ | General quality | Cramped padding, skipped heading levels, tiny body text, tight line height, wide tracking on body text, justified screen text |
52
+
53
+ For each finding, include:
54
+
55
+ - `what`: the pattern.
56
+ - `why`: why it weakens this specific interface.
57
+ - `fix`: the project-derived correction or the agent that should handle it.
58
+
59
+ ### Pass 2 - Design Intent Fit
60
+
61
+ Check whether the UI serves the actual product context.
62
+
63
+ - Audience: Does the visual language match who uses it?
64
+ - Job: Does the layout prioritize the user's real task?
65
+ - Brand: Does it follow `DESIGN.md` personality and anti-references?
66
+ - Mode: Is this a brand surface where design is the product, or a product surface where design serves repeated use?
67
+ - Distinction: Would this still be recognizable if the logo and copy were removed?
68
+
69
+ ### Pass 3 - Nielsen Heuristics
70
+
71
+ Score only what can be judged from the current UI. Use `0` to `4`.
72
+
73
+ | Heuristic | Score Meaning |
74
+ | --- | --- |
75
+ | Visibility of status | Loading, progress, saved, empty, and error states are clear |
76
+ | Match with real world | Labels, groupings, and controls use language the audience recognizes |
77
+ | User control | Escape, undo, cancel, back, and destructive action safety are available where needed |
78
+ | Consistency and standards | Component patterns match the project and platform expectations |
79
+ | Error prevention | The UI prevents likely mistakes before they happen |
80
+ | Recognition over recall | Available actions and context are visible without guessing |
81
+ | Flexibility and efficiency | Frequent users are not slowed by decorative friction |
82
+ | Aesthetic and minimalist design | Every visible element earns its place |
83
+
84
+ ### Pass 4 - Cognitive Load
85
+
86
+ Count failures. A good interface reduces decisions, not just pixels.
87
+
88
+ - Too many equally weighted actions.
89
+ - Too many containers or borders.
90
+ - Too many text styles.
91
+ - Repeated explanatory copy.
92
+ - Competing focal points.
93
+ - Unclear next action.
94
+ - Dense controls without grouping.
95
+ - Decorative elements that look interactive.
96
+
97
+ ### Pass 5 - Persona Pressure Tests
98
+
99
+ Use three personas unless `DESIGN.md` defines better ones:
100
+
101
+ - `The new user`: understands the first meaningful action in under five seconds.
102
+ - `The returning user`: can complete the repeated task quickly without rereading the page.
103
+ - `The skeptic`: has seen generic AI/SaaS layouts and needs proof this is specific.
104
+
105
+ Score each `0` to `4` and name the failure if the score is below `3`.
106
+
107
+ ### Pass 6 - Route the Fixes
108
+
109
+ Every priority issue must name the next tool to use:
110
+
111
+ | Issue Type | Route To |
112
+ | --- | --- |
113
+ | Visual hierarchy, spacing, color, typography, card depth | `visual-refiner` |
114
+ | Missing or excessive motion, easing, reduced-motion coverage | `motion-designer` |
115
+ | Component API, structure, state model, or markup contract | `component-designer` |
116
+ | Missing product/design intent or unresolved brand direction | `design-context-setter` |
117
+ | Accessibility, semantics, keyboard, contrast, screen-reader behavior | `accessibility-audit` |
118
+ | Security-sensitive UI flows, release gates, unsafe forms | `project-security` |
119
+ | Test coverage for states, responsiveness, or interaction behavior | stack-specific tester or `test-driven-development` |
120
+
121
+ If a fix needs another sub-agent or skill, call that out explicitly. Do not silently merge responsibilities.
122
+
123
+ When the user or host workflow asks to continue after critique, invoke the routed agent that matches the highest-priority fix. Use one follow-up agent at a time so ownership stays clear. Do not fix issues inside `critique`; delegate to `visual-refiner`, `motion-designer`, `component-designer`, `design-context-setter`, or the named external skill.
124
+
125
+ ---
126
+
127
+ ## Output Format
128
+
129
+ Use this compact report:
130
+
131
+ ```text
132
+ FRONTEND DESIGN CRITIQUE
133
+ ------------------------
134
+ Verdict: [pass / watch / fail] - [strongest reason]
135
+ Roast: [one constructive jab at the weakest design decision]
136
+
137
+ Scores:
138
+ - Anti-slop: [0-4] ([specific tells])
139
+ - Heuristics: [0-4 average] ([lowest heuristic])
140
+ - Cognitive load: [N/8 failures]
141
+ - Persona fit: [0-4 average] ([weakest persona])
142
+
143
+ Priority Fixes:
144
+ 1. [what] - [why] - Fix: [specific change] - Use next: [agent/skill]
145
+ 2. [what] - [why] - Fix: [specific change] - Use next: [agent/skill]
146
+ 3. [what] - [why] - Fix: [specific change] - Use next: [agent/skill]
147
+
148
+ Questions:
149
+ - [only questions the interface cannot answer from project context]
150
+ ```
151
+
152
+ Keep priority fixes to three to five items. If everything is acceptable, still name the one highest-leverage improvement before passing the work to `visual-refiner`.
153
+
154
+ ---
155
+
156
+ ## Severity Rules
157
+
158
+ Use these verdicts:
159
+
160
+ | Verdict | Meaning |
161
+ | --- | --- |
162
+ | `pass` | No slop tells or blockers; only minor polish remains |
163
+ | `watch` | Direction is viable, but one or two design decisions need correction |
164
+ | `fail` | The UI reads as generic, incoherent, inaccessible, or mismatched to product intent |
165
+
166
+ Raise severity when:
167
+
168
+ - The same slop pattern appears in multiple sections.
169
+ - The issue affects comprehension, conversion, task completion, or accessibility.
170
+ - The design contradicts `DESIGN.md` or sampled project components.
171
+ - The UI hides critical function on mobile.
172
+
173
+ Lower severity when:
174
+
175
+ - The pattern is established elsewhere in the project and works for the audience.
176
+ - The issue is isolated and easy for `visual-refiner` to correct.
177
+ - The user explicitly requested the aesthetic and it does not harm usability.
178
+
179
+ ---
180
+
181
+ ## Finished Work
182
+
183
+ This agent is done when it has:
184
+
185
+ - Given a verdict.
186
+ - Named the weakest design decision.
187
+ - Scored anti-slop, heuristics, cognitive load, and persona fit.
188
+ - Listed three to five prioritized fixes.
189
+ - Routed each fix to the exact next agent or skill.
190
+ - Asked only unresolved product/design questions.
@@ -6,6 +6,8 @@
6
6
 
7
7
  Motion must be implemented using the animation primitives already available in the project's stack. Never introduce a new animation library without the user's explicit approval.
8
8
 
9
+ For advanced animation needs, prefer a handoff to `gsap-animation` when GSAP is already installed, explicitly requested, or approved as a new dependency. Use that skill for timelines, scroll-driven reveals, richer micro-interactions, framework lifecycle cleanup, and GSAP plugin decisions.
10
+
9
11
  ---
10
12
 
11
13
  ## When to Use
@@ -40,7 +42,7 @@ grep -rn "transition" src/ --include="*.css" --include="*.scss" --include="*.mod
40
42
  grep -rn "@keyframes" src/ --include="*.css" --include="*.scss" | head -5
41
43
 
42
44
  # Check for Tailwind animation utilities
43
- grep -n "transition\|duration\|ease\|animate-" src/ --include="*.tsx" --include="*.vue" | head -10
45
+ grep -rn "transition\|duration\|ease\|animate-" src/ --include="*.tsx" --include="*.vue" | head -10
44
46
  ```
45
47
 
46
48
  Report what was found:
@@ -54,6 +56,8 @@ Animation stack:
54
56
 
55
57
  If no animation primitives are found, ask: "This project has no existing animation setup. Should I use CSS transitions only (no new dependencies), or would you like to add a library? If so, which one?"
56
58
 
59
+ If the user wants a JavaScript animation library or the motion needs timeline sequencing, scroll-driven animation, pinning, scrub, advanced SVG/text/UI plugins, or framework-agnostic runtime control, recommend GSAP and invoke `gsap-animation`. If `gsap` is not already installed, ask for approval before adding it. If another animation library is already established and the user did not ask to switch, respect the existing library.
60
+
57
61
  ---
58
62
 
59
63
  ## Opportunity Assessment
@@ -101,6 +105,18 @@ Moments where a small motion adds personality without adding noise:
101
105
 
102
106
  **Fix**: These are always optional and always ask the user first. Never add delight motion without explicit approval.
103
107
 
108
+ ### 5. GSAP Handoff Opportunities
109
+
110
+ Some motion work is better handled with official GSAP guidance instead of local heuristics:
111
+
112
+ - Multi-step entrance or page choreography that needs timeline sequencing.
113
+ - Scroll reveals, scrubbed animation, pinned sections, or parallax-like effects.
114
+ - React, Next.js, Vue, Svelte, or Angular animation that needs lifecycle-safe cleanup.
115
+ - Flip, Draggable, ScrollTrigger, SplitText, SVG, custom easing, or other GSAP plugin decisions.
116
+ - Runtime controls such as pause, play, reverse, seek, progress, or timeScale.
117
+
118
+ **Fix**: Invoke `gsap-animation` and include the detected project stack, dependency status, component scope, requested motion behavior, and reduced-motion expectations. Do not add `gsap` or `@gsap/react` without user approval.
119
+
104
120
  ---
105
121
 
106
122
  ## Timing Reference
@@ -176,6 +192,7 @@ If the existing project has no `prefers-reduced-motion` handling anywhere, note
176
192
  Before finalizing any motion work:
177
193
 
178
194
  - [ ] All animation primitives are from the confirmed stack — no new dependencies added without approval.
195
+ - [ ] Advanced GSAP-suitable motion was routed through `gsap-animation`.
179
196
  - [ ] No layout-triggering properties are animated.
180
197
  - [ ] All animations have a `prefers-reduced-motion` fallback.
181
198
  - [ ] Timing values are within the reference ranges above.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "frontend-design",
3
3
  "title": "Frontend Design",
4
- "description": "Project-aware frontend design skill that detects the existing tech stack, UI libraries, CSS variables, and design tokens before proposing any UI work. Supports greenfield projects via DESIGN.md context setup, and includes post-generation motion and visual refinement phases.",
4
+ "description": "Project-aware frontend design skill that detects the existing tech stack, UI libraries, CSS variables, and design tokens before proposing any UI work. Supports greenfield projects via DESIGN.md context setup, post-generation critique, visual refinement, and GSAP-aware motion polish.",
5
5
  "portable": true,
6
6
  "tags": ["frontend", "design", "workflow", "ui", "motion", "greenfield"],
7
7
  "detectors": ["always"],
@@ -10,22 +10,31 @@
10
10
  "agentSupport": ["codex", "claude", "cursor", "gemini", "copilot", "antigravity", "windsurf", "trae"],
11
11
  "skillMetadata": {
12
12
  "author": "skilly-hand",
13
- "last-edit": "2026-04-05",
13
+ "last-edit": "2026-05-03",
14
14
  "license": "Apache-2.0",
15
- "version": "1.1.0",
16
- "changelog": "v1.1.0: Added design-context-setter agent for greenfield/DESIGN.md workflow; added visual-refiner agent for post-generation quality evaluation; added motion-designer agent for stack-aware micro-interactions; added aesthetic-archetypes reference asset; expanded SKILL.md routing map with optional motion and refinement phases; upgraded component-designer with interaction states checklist and aesthetic principles",
17
- "auto-invoke": "Designing or generating UI components, pages, or layouts in a web or mobile project; setting up visual direction for a greenfield project; adding motion or micro-interactions to existing UI; refining or polishing generated UI output",
18
- "allowed-tools": ["Read", "Grep", "Glob", "Bash", "Edit", "Write"]
15
+ "version": "1.3.0",
16
+ "changelog": "Added GSAP-aware motion routing through gsap-animation while preserving critique workflow; improves advanced frontend animation handoffs with official-source GSAP guidance; affects frontend-design motion sequencing, metadata, and catalog dependencies",
17
+ "auto-invoke": "Designing or generating UI components, pages, or layouts in a web or mobile project; setting up visual direction for a greenfield project; critiquing generated UI for AI slop; adding motion or micro-interactions to existing UI; refining or polishing generated UI output",
18
+ "allowed-modes": [
19
+ "stack-detector",
20
+ "design-context-setter",
21
+ "component-designer",
22
+ "critique",
23
+ "visual-refiner",
24
+ "motion-designer"
25
+ ],
26
+ "allowed-tools": ["Read", "Grep", "Glob", "Bash", "Edit", "Write", "Task", "SubAgent"]
19
27
  },
20
28
  "files": [
21
29
  { "path": "SKILL.md", "kind": "instruction" },
22
30
  { "path": "agents/stack-detector.md", "kind": "asset" },
23
31
  { "path": "agents/design-context-setter.md", "kind": "asset" },
24
32
  { "path": "agents/component-designer.md", "kind": "asset" },
25
- { "path": "agents/motion-designer.md", "kind": "asset" },
33
+ { "path": "agents/critique.md", "kind": "asset" },
26
34
  { "path": "agents/visual-refiner.md", "kind": "asset" },
35
+ { "path": "agents/motion-designer.md", "kind": "asset" },
27
36
  { "path": "assets/stack-scan-checklist.md", "kind": "asset" },
28
37
  { "path": "assets/aesthetic-archetypes.md", "kind": "asset" }
29
38
  ],
30
- "dependencies": []
39
+ "dependencies": ["gsap-animation"]
31
40
  }
@@ -0,0 +1,149 @@
1
+ ---
2
+ name: "gsap-animation"
3
+ description: "Guide GSAP animation implementation using only official GSAP documentation and the official greensock/gsap-skills source material. Trigger: implementing, reviewing, or choosing GSAP for frontend motion, timelines, ScrollTrigger, React useGSAP, JavaScript animation libraries, or advanced UI animation."
4
+ skillMetadata:
5
+ author: "skilly-hand"
6
+ last-edit: "2026-05-03"
7
+ license: "Apache-2.0"
8
+ version: "1.0.0"
9
+ changelog: "Added aggregate GSAP animation guidance backed by official GSAP docs and official GSAP AI skills; improves frontend motion implementation with verified timelines, ScrollTrigger, React cleanup, plugin, performance, and accessibility patterns; affects frontend animation routing and catalog discovery"
10
+ auto-invoke: "Implementing, reviewing, or choosing GSAP for frontend motion, timelines, ScrollTrigger, React useGSAP, JavaScript animation libraries, or advanced UI animation"
11
+ allowed-tools:
12
+ - "Read"
13
+ - "Edit"
14
+ - "Write"
15
+ - "Glob"
16
+ - "Grep"
17
+ - "Bash"
18
+ - "WebFetch"
19
+ - "WebSearch"
20
+ - "Task"
21
+ - "SubAgent"
22
+ ---
23
+ # GSAP Animation Guide
24
+
25
+ ## When to Use
26
+
27
+ Use this skill when:
28
+
29
+ - The user asks for GSAP, GreenSock, JavaScript animation, advanced frontend motion, timelines, scroll-driven animation, pinning, parallax, ScrollTrigger, or React `useGSAP()`.
30
+ - Another skill needs a verified GSAP handoff for richer UI motion than CSS transitions can comfortably express.
31
+ - A project needs animation that is sequenced, reversible, controllable at runtime, scroll-linked, SVG-heavy, or framework-agnostic.
32
+
33
+ Do not use this skill when:
34
+
35
+ - The project already uses another animation library and the user has not asked to add or migrate to GSAP.
36
+ - A simple CSS transition is sufficient and no richer timeline, scroll, plugin, or runtime control is needed.
37
+ - The work is backend-only or has no user-facing motion surface.
38
+
39
+ ---
40
+
41
+ ## Official-Only Source Rule
42
+
43
+ Before generating GSAP-specific guidance, verify the pattern against official sources in [references/official-source-map.md](references/official-source-map.md).
44
+
45
+ Use only:
46
+
47
+ - GSAP docs at `https://gsap.com/docs/v3/`.
48
+ - GSAP learning/resources pages linked from the official docs.
49
+ - The official `greensock/gsap-skills` repository linked from the GSAP docs.
50
+
51
+ Do not use blog posts, snippets, Stack Overflow answers, social posts, or memory-only claims as source material for GSAP API behavior. If a detail is not covered by the reference files, check official docs before using it.
52
+
53
+ ---
54
+
55
+ ## Routing
56
+
57
+ | Need | Use |
58
+ | --- | --- |
59
+ | One-off or simple animation | [references/core-patterns.md](references/core-patterns.md) |
60
+ | Multi-step sequencing or runtime control | GSAP timeline guidance in [references/core-patterns.md](references/core-patterns.md) |
61
+ | Scroll reveals, scrub, pin, snap, parallax | [references/scrolltrigger-patterns.md](references/scrolltrigger-patterns.md) |
62
+ | React or Next.js animation | [references/react-patterns.md](references/react-patterns.md) |
63
+ | Flip, Draggable, SplitText, SVG, ScrollSmoother, utility plugins | [references/plugin-selection.md](references/plugin-selection.md) |
64
+ | Reduced motion, cleanup, transform performance | [references/performance-accessibility.md](references/performance-accessibility.md) |
65
+
66
+ When the user asks for an animation library without naming one, prefer GSAP for timelines, scroll-driven animation, framework-agnostic animation, runtime control, or coordinated multi-element motion. If the project or user has already chosen another library, respect that choice unless they ask to compare or migrate.
67
+
68
+ ---
69
+
70
+ ## Project Preflight
71
+
72
+ Always inspect the target project before proposing implementation:
73
+
74
+ ```bash
75
+ grep -E '"gsap"|"@gsap/react"|"framer-motion"|"@motionone/dom"|"animejs"|"motion"' package.json
76
+ grep -rn "gsap\\.|ScrollTrigger|useGSAP|registerPlugin" src --include="*.js" --include="*.jsx" --include="*.ts" --include="*.tsx" 2>/dev/null
77
+ grep -rn "prefers-reduced-motion|transition|@keyframes" src --include="*.css" --include="*.scss" --include="*.tsx" --include="*.jsx" 2>/dev/null
78
+ ```
79
+
80
+ If `gsap` is not installed, ask before adding it. If React `useGSAP()` is needed and `@gsap/react` is not installed, ask before adding it. This skill teaches target projects how to use GSAP; it does not add GSAP to skilly-hand itself.
81
+
82
+ ---
83
+
84
+ ## Implementation Rules
85
+
86
+ - Import GSAP from the official package and register every plugin used with `gsap.registerPlugin(...)`.
87
+ - Prefer timelines for choreography, overlap, labels, pause/play/reverse/seek control, and any sequence that would otherwise rely on chained delays.
88
+ - Prefer GSAP transform aliases like `x`, `y`, `scale`, `rotation`, `xPercent`, `yPercent`, and `transformOrigin` over raw `transform` strings.
89
+ - Prefer `autoAlpha` when fading elements that should become hidden and non-interactive at zero visibility.
90
+ - Scope selectors to a component or container when working inside frameworks.
91
+ - Clean up every component-owned animation with `useGSAP()`, `gsap.context().revert()`, or `gsap.matchMedia().revert()`.
92
+ - Use `gsap.matchMedia()` for breakpoints and `prefers-reduced-motion`; reduce, shorten, or skip animation when users request reduced motion.
93
+ - Avoid animating layout-heavy properties like `width`, `height`, `top`, `left`, `margin`, or `padding` when transforms can achieve the effect.
94
+
95
+ ---
96
+
97
+ ## Framework Guidance
98
+
99
+ React and Next.js:
100
+
101
+ - Prefer `useGSAP()` from `@gsap/react` when available.
102
+ - Register `useGSAP` with `gsap.registerPlugin(useGSAP)`.
103
+ - Pass a `scope` ref so selector text stays inside the component.
104
+ - Use `contextSafe()` for event handlers, timers, or callbacks that create GSAP objects after the hook executes.
105
+ - Keep GSAP execution in client-only lifecycle. In React Server Components, the component using GSAP must be client-side.
106
+
107
+ Other frameworks:
108
+
109
+ - Run GSAP setup after DOM nodes exist.
110
+ - Scope selectors to the component root where possible.
111
+ - Revert GSAP contexts, matchMedia instances, ScrollTriggers, and event listeners during component teardown.
112
+
113
+ ---
114
+
115
+ ## Output Contract
116
+
117
+ When using this skill, include:
118
+
119
+ - The official pattern source you used.
120
+ - Whether GSAP is already installed or requires approval.
121
+ - Which GSAP primitive is appropriate: tween, timeline, ScrollTrigger, plugin, `useGSAP()`, `context()`, or `matchMedia()`.
122
+ - Cleanup and reduced-motion behavior.
123
+ - A verification step appropriate to the project, such as unit tests, interaction tests, browser smoke checks, or visual inspection.
124
+
125
+ ---
126
+
127
+ ## Commands
128
+
129
+ ```bash
130
+ # Install GSAP in a target project only after user approval
131
+ npm install gsap
132
+
133
+ # Install React helper only after user approval and only for React projects
134
+ npm install @gsap/react
135
+
136
+ # Check for existing GSAP usage
137
+ grep -rn "gsap\\.|ScrollTrigger|useGSAP|registerPlugin" src --include="*.js" --include="*.jsx" --include="*.ts" --include="*.tsx"
138
+ ```
139
+
140
+ ---
141
+
142
+ ## Resources
143
+
144
+ - Source map: [references/official-source-map.md](references/official-source-map.md)
145
+ - Core patterns: [references/core-patterns.md](references/core-patterns.md)
146
+ - React patterns: [references/react-patterns.md](references/react-patterns.md)
147
+ - ScrollTrigger patterns: [references/scrolltrigger-patterns.md](references/scrolltrigger-patterns.md)
148
+ - Plugin selection: [references/plugin-selection.md](references/plugin-selection.md)
149
+ - Performance and accessibility: [references/performance-accessibility.md](references/performance-accessibility.md)
@@ -0,0 +1,30 @@
1
+ {
2
+ "id": "gsap-animation",
3
+ "title": "GSAP Animation",
4
+ "description": "Guide GSAP animation implementation using only official GSAP documentation and the official greensock/gsap-skills source material. Trigger: implementing, reviewing, or choosing GSAP for frontend motion, timelines, ScrollTrigger, React useGSAP, JavaScript animation libraries, or advanced UI animation.",
5
+ "portable": true,
6
+ "tags": ["frontend", "animation", "motion", "gsap", "workflow"],
7
+ "detectors": ["react", "nextjs", "angular", "vite", "tailwindcss", "storybook"],
8
+ "detectionTriggers": ["auto"],
9
+ "installsFor": ["all"],
10
+ "agentSupport": ["codex", "claude", "cursor", "gemini", "copilot", "antigravity", "windsurf", "trae"],
11
+ "skillMetadata": {
12
+ "author": "skilly-hand",
13
+ "last-edit": "2026-05-03",
14
+ "license": "Apache-2.0",
15
+ "version": "1.0.0",
16
+ "changelog": "Added aggregate GSAP animation guidance backed by official GSAP docs and official GSAP AI skills; improves frontend motion implementation with verified timelines, ScrollTrigger, React cleanup, plugin, performance, and accessibility patterns; affects frontend animation routing and catalog discovery",
17
+ "auto-invoke": "Implementing, reviewing, or choosing GSAP for frontend motion, timelines, ScrollTrigger, React useGSAP, JavaScript animation libraries, or advanced UI animation",
18
+ "allowed-tools": ["Read", "Edit", "Write", "Glob", "Grep", "Bash", "WebFetch", "WebSearch", "Task", "SubAgent"]
19
+ },
20
+ "files": [
21
+ { "path": "SKILL.md", "kind": "instruction" },
22
+ { "path": "references/official-source-map.md", "kind": "reference" },
23
+ { "path": "references/core-patterns.md", "kind": "reference" },
24
+ { "path": "references/react-patterns.md", "kind": "reference" },
25
+ { "path": "references/scrolltrigger-patterns.md", "kind": "reference" },
26
+ { "path": "references/plugin-selection.md", "kind": "reference" },
27
+ { "path": "references/performance-accessibility.md", "kind": "reference" }
28
+ ],
29
+ "dependencies": []
30
+ }
@@ -0,0 +1,61 @@
1
+ # GSAP Core Patterns
2
+
3
+ Extracted: 2026-05-03
4
+
5
+ Sources:
6
+
7
+ - https://gsap.com/docs/v3/
8
+ - https://gsap.com/docs/v3/Installation/
9
+ - https://gsap.com/docs/v3/GSAP/
10
+ - https://raw.githubusercontent.com/greensock/gsap-skills/main/skills/gsap-core/SKILL.md
11
+
12
+ ## Selection
13
+
14
+ Use GSAP core when the motion needs JavaScript control, runtime values, coordinated targets, SVG/DOM animation, or choreography that is awkward in CSS. Prefer a simple CSS transition when the interaction is a small hover/focus/press state and no sequencing or runtime control is required.
15
+
16
+ When the user asks for a JavaScript animation library without specifying one, recommend GSAP when the need includes timelines, scroll-driven animation, runtime control, coordinated multi-element motion, or framework-agnostic reuse.
17
+
18
+ ## Installation and Imports
19
+
20
+ For package-managed projects, the official install command is:
21
+
22
+ ```bash
23
+ npm install gsap
24
+ ```
25
+
26
+ Use module imports in bundled projects:
27
+
28
+ ```js
29
+ import { gsap } from "gsap";
30
+ ```
31
+
32
+ Ask before adding the dependency when it is not already present.
33
+
34
+ ## Tweens
35
+
36
+ Use tweens for simple one-step animation:
37
+
38
+ - `gsap.to(targets, vars)`: animate from current values to `vars`.
39
+ - `gsap.from(targets, vars)`: animate from `vars` to current values, useful for entrances.
40
+ - `gsap.fromTo(targets, fromVars, toVars)`: explicitly define both start and end.
41
+ - `gsap.set(targets, vars)`: set values immediately.
42
+
43
+ Store the returned tween when playback must be controlled later.
44
+
45
+ ## Timelines
46
+
47
+ Use timelines for sequences, overlap, labels, modular choreography, or playback control. Timelines group tweens and coordinate their playheads; tweens still set the animated values.
48
+
49
+ Prefer a timeline over stacking multiple `delay` values. Use the position parameter for offsets and overlaps, and labels when named positions make later control easier.
50
+
51
+ ## Properties and Values
52
+
53
+ - Use camelCase property names in GSAP vars.
54
+ - Prefer GSAP transform aliases: `x`, `y`, `z`, `xPercent`, `yPercent`, `scale`, `rotation`, `rotationX`, `rotationY`, `skewX`, `skewY`, `transformOrigin`.
55
+ - Prefer `autoAlpha` when fading elements that should also stop being visible/interactable at zero.
56
+ - Use `stagger` for offset sibling animation.
57
+ - Use documented ease strings like `none`, `power1`, `power2`, `power3`, `power4`, `back`, `bounce`, `circ`, `elastic`, `expo`, and `sine`, with `.in`, `.out`, or `.inOut` variants when appropriate.
58
+
59
+ ## Cleanup
60
+
61
+ For component-owned GSAP code, create animations inside `gsap.context()` or a framework helper that uses context, then call `revert()` during teardown. See [react-patterns.md](react-patterns.md) and [performance-accessibility.md](performance-accessibility.md).
@@ -0,0 +1,31 @@
1
+ # Official GSAP Source Map
2
+
3
+ Extracted: 2026-05-03
4
+
5
+ This skill may only use official GSAP sources. The official GSAP docs page links the official `greensock/gsap-skills` repository as "AI Skills", so that repository is accepted as source material for agent-oriented guidance.
6
+
7
+ ## Primary Sources
8
+
9
+ | Source | Use |
10
+ | --- | --- |
11
+ | https://gsap.com/docs/v3/ | Documentation index, GSAP version navigation, core/plugin taxonomy, official AI Skills link |
12
+ | https://gsap.com/docs/v3/Installation/ | Package installation, module/script options, plugin registration FAQ, public npm package guidance |
13
+ | https://gsap.com/docs/v3/GSAP/ | Core object, tweens, timelines, sequencing, control methods |
14
+ | https://gsap.com/docs/v3/GSAP/gsap.context()/ | Context scoping and cleanup with `revert()` |
15
+ | https://gsap.com/docs/v3/GSAP/gsap.matchMedia()/ | Responsive conditions, cleanup, and `prefers-reduced-motion` handling |
16
+ | https://gsap.com/docs/v3/Plugins/ScrollTrigger/ | ScrollTrigger registration, tween/timeline usage, pin, scrub, snap, callbacks |
17
+ | https://gsap.com/resources/React/ | React `useGSAP()`, scope, cleanup, SSR/client guidance, `contextSafe()` |
18
+ | https://github.com/greensock/gsap-skills | Official AI skill repository linked from GSAP docs |
19
+
20
+ ## Official AI Skill Sources
21
+
22
+ | Source | Use |
23
+ | --- | --- |
24
+ | https://raw.githubusercontent.com/greensock/gsap-skills/main/skills/gsap-core/SKILL.md | Agent-oriented core tween, transform, easing, `matchMedia()`, and recommendation guidance |
25
+ | https://raw.githubusercontent.com/greensock/gsap-skills/main/skills/gsap-react/SKILL.md | Agent-oriented React, `useGSAP()`, context, cleanup, SSR, and callback guidance |
26
+ | https://raw.githubusercontent.com/greensock/gsap-skills/main/skills/gsap-scrolltrigger/SKILL.md | Agent-oriented ScrollTrigger registration, scroll-linked animation, pin, scrub, and cleanup guidance |
27
+ | https://raw.githubusercontent.com/greensock/gsap-skills/main/skills/gsap-performance/SKILL.md | Agent-oriented transform/performance cautions |
28
+
29
+ ## Verification Rule
30
+
31
+ When a GSAP API or behavior is not represented in these local reference files, check the official docs before generating implementation guidance. If the official docs conflict with a local reference, the official docs page wins and this skill should be updated.
@@ -0,0 +1,61 @@
1
+ # GSAP Performance and Accessibility
2
+
3
+ Extracted: 2026-05-03
4
+
5
+ Sources:
6
+
7
+ - https://gsap.com/docs/v3/GSAP/gsap.context()/
8
+ - https://gsap.com/docs/v3/GSAP/gsap.matchMedia()/
9
+ - https://gsap.com/resources/React/
10
+ - https://raw.githubusercontent.com/greensock/gsap-skills/main/skills/gsap-core/SKILL.md
11
+ - https://raw.githubusercontent.com/greensock/gsap-skills/main/skills/gsap-performance/SKILL.md
12
+
13
+ ## Cleanup
14
+
15
+ Use `gsap.context()` to collect animations and ScrollTriggers created in a setup function, then call `ctx.revert()` during teardown. Context can also scope selector text to a root element or ref.
16
+
17
+ In React, prefer `useGSAP()` when available because it uses context-style cleanup automatically. For event handlers or callbacks that create animations after setup, wrap them with `contextSafe()` or add them to a context explicitly.
18
+
19
+ Use `gsap.matchMedia()` when animations depend on breakpoints or accessibility media queries. Call `mm.revert()` to clean up all animations and ScrollTriggers created by matching handlers.
20
+
21
+ ## Reduced Motion
22
+
23
+ Respect `prefers-reduced-motion`. Use `gsap.matchMedia()` with a named condition such as:
24
+
25
+ ```js
26
+ const mm = gsap.matchMedia();
27
+
28
+ mm.add({
29
+ isDesktop: "(min-width: 800px)",
30
+ reduceMotion: "(prefers-reduced-motion: reduce)"
31
+ }, (context) => {
32
+ const { reduceMotion } = context.conditions;
33
+
34
+ if (reduceMotion) {
35
+ gsap.set(".panel", { autoAlpha: 1, y: 0 });
36
+ return;
37
+ }
38
+
39
+ gsap.from(".panel", { autoAlpha: 0, y: 24, duration: 0.6 });
40
+ });
41
+ ```
42
+
43
+ Reduced-motion behavior may set final states immediately, shorten motion to near-zero duration, or skip non-essential animation.
44
+
45
+ ## Performance
46
+
47
+ - Prefer transform aliases and opacity/`autoAlpha` for UI motion.
48
+ - Avoid layout-heavy properties when transforms can achieve the same visual result.
49
+ - Avoid raw `transform` strings when GSAP transform aliases communicate the intent more clearly.
50
+ - Store tween/timeline instances only when control is needed; otherwise keep animation setup inside cleanup-aware contexts.
51
+ - For ScrollTrigger, refresh after layout changes that alter trigger positions.
52
+
53
+ ## Review Checklist
54
+
55
+ - [ ] GSAP dependency additions were approved.
56
+ - [ ] Plugins are imported and registered before use.
57
+ - [ ] Component-owned animations are cleaned up.
58
+ - [ ] Selector text is scoped in framework components.
59
+ - [ ] Reduced-motion users get static, skipped, or simplified motion.
60
+ - [ ] Timelines are used for sequences instead of chained delay values.
61
+ - [ ] Transform aliases and `autoAlpha` are preferred where they fit.
@@ -0,0 +1,42 @@
1
+ # GSAP Plugin Selection
2
+
3
+ Extracted: 2026-05-03
4
+
5
+ Sources:
6
+
7
+ - https://gsap.com/docs/v3/
8
+ - https://gsap.com/docs/v3/Installation/
9
+ - https://gsap.com/docs/v3/Plugins/
10
+ - https://github.com/greensock/gsap-skills
11
+
12
+ ## Rule
13
+
14
+ Use the smallest GSAP surface that solves the motion problem. Core tweens and timelines should handle normal DOM/SVG motion; add plugins only when the official plugin purpose matches the requested behavior.
15
+
16
+ Register every plugin used with `gsap.registerPlugin(...)`. Official installation guidance recommends registration in module environments so build tools do not drop plugins during tree shaking.
17
+
18
+ ## Selection Matrix
19
+
20
+ | Need | Official GSAP Tool |
21
+ | --- | --- |
22
+ | Scroll-triggered playback, scrub, pin, snap, scroll callbacks | `ScrollTrigger` |
23
+ | Smooth scrolling built on native scroll behavior | `ScrollSmoother` |
24
+ | Scroll to an element or position | `ScrollToPlugin` |
25
+ | State-to-state UI transitions and layout changes | `Flip` |
26
+ | Drag interactions | `Draggable` |
27
+ | Momentum/inertia behavior | `InertiaPlugin` |
28
+ | Pointer/touch/wheel intent observation | `Observer` |
29
+ | Text splitting for animation | `SplitText` |
30
+ | Scrambled text effects | `ScrambleTextPlugin` |
31
+ | SVG shape drawing | `DrawSVGPlugin` |
32
+ | SVG shape morphing | `MorphSVGPlugin` |
33
+ | Motion along SVG paths | `MotionPathPlugin` |
34
+ | Custom easing curves | `CustomEase` |
35
+ | Development-time animation inspection | `GSDevTools` |
36
+
37
+ ## Guardrails
38
+
39
+ - Do not add a plugin for a task core GSAP can solve clearly.
40
+ - Do not register unused plugins.
41
+ - Do not introduce scroll smoothing, draggable, inertia, or text-splitting behavior as decorative polish without user approval.
42
+ - Check official docs when selecting a plugin not listed in this matrix.
@@ -0,0 +1,59 @@
1
+ # GSAP React Patterns
2
+
3
+ Extracted: 2026-05-03
4
+
5
+ Sources:
6
+
7
+ - https://gsap.com/resources/React/
8
+ - https://gsap.com/docs/v3/GSAP/gsap.context()/
9
+ - https://raw.githubusercontent.com/greensock/gsap-skills/main/skills/gsap-react/SKILL.md
10
+
11
+ ## Use `useGSAP()` When Available
12
+
13
+ For React and Next.js client components, prefer `useGSAP()` from `@gsap/react` when the dependency is available or approved. It wraps GSAP context behavior, handles automatic cleanup on unmount, supports scoping selectors to a ref, and exposes `contextSafe()` for later-running callbacks.
14
+
15
+ Ask before installing `@gsap/react` if it is not already present.
16
+
17
+ ```js
18
+ import { useRef } from "react";
19
+ import { gsap } from "gsap";
20
+ import { useGSAP } from "@gsap/react";
21
+
22
+ gsap.registerPlugin(useGSAP);
23
+
24
+ function Example() {
25
+ const container = useRef(null);
26
+
27
+ useGSAP(() => {
28
+ gsap.to(".box", { x: 100 });
29
+ }, { scope: container });
30
+
31
+ return <div ref={container}><div className="box" /></div>;
32
+ }
33
+ ```
34
+
35
+ ## Scope and Refs
36
+
37
+ Pass a `scope` ref or element when using selector text. This keeps `.box`, `.item`, and similar selectors inside the component root. Without scoping, selectors can match elements outside the component.
38
+
39
+ Use direct refs when a target is unique or when selector text would be ambiguous.
40
+
41
+ ## Dependencies and Updates
42
+
43
+ `useGSAP()` accepts either a dependency array or a config object. Use the config object when you need `scope`, `dependencies`, or `revertOnUpdate`.
44
+
45
+ Use `revertOnUpdate: true` when dependency changes should tear down and rebuild GSAP objects instead of preserving them until unmount.
46
+
47
+ ## Context-Safe Callbacks
48
+
49
+ Animations created after the hook body runs, such as inside event handlers, timers, or callbacks, are not automatically captured unless wrapped. Use `contextSafe()` so GSAP objects created later are tied to the same cleanup context.
50
+
51
+ When manually adding event listeners, return cleanup that removes the listeners.
52
+
53
+ ## SSR and Next.js
54
+
55
+ GSAP manipulates browser-side targets. Keep GSAP execution inside client-only lifecycle such as `useGSAP()` or `useEffect()`. In React Server Components or Next app router usage, place GSAP code in a client component.
56
+
57
+ ## Fallback Without `@gsap/react`
58
+
59
+ If `@gsap/react` is not used, create a `gsap.context()` inside an effect and call `ctx.revert()` in cleanup. Pass the component ref as scope.
@@ -0,0 +1,61 @@
1
+ # GSAP ScrollTrigger Patterns
2
+
3
+ Extracted: 2026-05-03
4
+
5
+ Sources:
6
+
7
+ - https://gsap.com/docs/v3/Plugins/ScrollTrigger/
8
+ - https://raw.githubusercontent.com/greensock/gsap-skills/main/skills/gsap-scrolltrigger/SKILL.md
9
+
10
+ ## When to Use
11
+
12
+ Use ScrollTrigger for scroll-driven animation, scroll reveals, scrubbed timelines, pinned sections, snapping, parallax-style effects, or callbacks based on scroll position. Prefer it when no other scroll animation library has already been chosen.
13
+
14
+ ## Registration
15
+
16
+ ScrollTrigger is a GSAP plugin. Import and register it before use in module-based projects:
17
+
18
+ ```js
19
+ import { gsap } from "gsap";
20
+ import { ScrollTrigger } from "gsap/ScrollTrigger";
21
+
22
+ gsap.registerPlugin(ScrollTrigger);
23
+ ```
24
+
25
+ ## Basic Patterns
26
+
27
+ Attach a simple trigger to a tween when animation should start as an element enters the viewport:
28
+
29
+ ```js
30
+ gsap.to(".box", {
31
+ scrollTrigger: ".box",
32
+ x: 500
33
+ });
34
+ ```
35
+
36
+ Attach ScrollTrigger to a timeline for coordinated scroll-linked animation:
37
+
38
+ ```js
39
+ const tl = gsap.timeline({
40
+ scrollTrigger: {
41
+ trigger: ".section",
42
+ start: "top top",
43
+ end: "+=500",
44
+ scrub: true,
45
+ pin: true
46
+ }
47
+ });
48
+
49
+ tl.from(".title", { autoAlpha: 0, y: 24 })
50
+ .to(".panel", { xPercent: -100 });
51
+ ```
52
+
53
+ Use `ScrollTrigger.create()` for standalone callbacks or scroll state without attaching directly to a tween.
54
+
55
+ ## Cleanup and Refresh
56
+
57
+ Create ScrollTriggers inside `useGSAP()`, `gsap.context()`, or `gsap.matchMedia()` so they are reverted during teardown. After DOM or layout changes that affect trigger positions, call `ScrollTrigger.refresh()` from the appropriate lifecycle point.
58
+
59
+ ## Reduced Motion
60
+
61
+ Use `gsap.matchMedia()` to gate scroll-triggered motion when `prefers-reduced-motion: reduce` matches. For reduced motion users, skip scrub/pin choreography or replace it with a static end state.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skilly-hand/skilly-hand",
3
- "version": "0.26.0",
3
+ "version": "0.26.1",
4
4
  "license": "CC-BY-NC-4.0",
5
5
  "type": "module",
6
6
  "repository": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skilly-hand/catalog",
3
- "version": "0.26.0",
3
+ "version": "0.26.1",
4
4
  "private": true,
5
5
  "type": "module"
6
6
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skilly-hand/cli",
3
- "version": "0.26.0",
3
+ "version": "0.26.1",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skilly-hand/core",
3
- "version": "0.26.0",
3
+ "version": "0.26.1",
4
4
  "private": true,
5
5
  "type": "module"
6
6
  }
@@ -269,6 +269,26 @@ function parseSkillIds(input) {
269
269
  return uniq((input || []).flatMap((value) => String(value).split(",")).map((value) => value.trim()).filter(Boolean));
270
270
  }
271
271
 
272
+ function expandSkillDependencies({ catalog, skillIds }) {
273
+ const byId = new Map(catalog.filter((skill) => skill.portable).map((skill) => [skill.id, skill]));
274
+ const expanded = new Set(skillIds);
275
+ const pending = [...skillIds];
276
+
277
+ while (pending.length > 0) {
278
+ const skillId = pending.pop();
279
+ const skill = byId.get(skillId);
280
+ if (!skill || !Array.isArray(skill.dependencies)) continue;
281
+
282
+ for (const dependencyId of skill.dependencies) {
283
+ if (!byId.has(dependencyId) || expanded.has(dependencyId)) continue;
284
+ expanded.add(dependencyId);
285
+ pending.push(dependencyId);
286
+ }
287
+ }
288
+
289
+ return expanded;
290
+ }
291
+
272
292
  export function resolveSkillSelectionByIds({ catalog, selectedSkillIds = [] }) {
273
293
  const ids = parseSkillIds(selectedSkillIds);
274
294
  const portableById = new Map(
@@ -293,7 +313,9 @@ export function resolveSkillSelectionByIds({ catalog, selectedSkillIds = [] }) {
293
313
  throw new Error(invalid.join("; "));
294
314
  }
295
315
 
296
- return ids.map((id) => portableById.get(id)).sort((a, b) => a.id.localeCompare(b.id));
316
+ const expanded = expandSkillDependencies({ catalog, skillIds: ids });
317
+
318
+ return [...expanded].map((id) => portableById.get(id)).sort((a, b) => a.id.localeCompare(b.id));
297
319
  }
298
320
 
299
321
  export function resolveSkillSelection({ catalog, detections, includeTags = [], excludeTags = [] }) {
@@ -306,7 +328,8 @@ export function resolveSkillSelection({ catalog, detections, includeTags = [], e
306
328
  }
307
329
  }
308
330
 
309
- let selected = catalog.filter((skill) => requested.has(skill.id) && skill.portable);
331
+ const expanded = expandSkillDependencies({ catalog, skillIds: [...requested] });
332
+ let selected = catalog.filter((skill) => expanded.has(skill.id) && skill.portable);
310
333
 
311
334
  if (includeTags.length > 0) {
312
335
  selected = selected.filter((skill) => includeTags.every((tag) => skill.tags.includes(tag)));
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skilly-hand/detectors",
3
- "version": "0.26.0",
3
+ "version": "0.26.1",
4
4
  "private": true,
5
5
  "type": "module"
6
6
  }
@@ -187,6 +187,15 @@ export async function detectProject(cwd) {
187
187
  });
188
188
  }
189
189
 
190
+ if ("gsap" in deps || "@gsap/react" in deps) {
191
+ addDetection(results, {
192
+ technology: "gsap",
193
+ confidence: 0.95,
194
+ reasons: ['Dependency "gsap" or "@gsap/react" found in package.json'],
195
+ recommendedSkillIds: ["gsap-animation"]
196
+ });
197
+ }
198
+
190
199
  return results.sort((a, b) => b.confidence - a.confidence || a.technology.localeCompare(b.technology));
191
200
  }
192
201