BjornMelin/dev-skills / plugins/web-motion/skills/gsap-utils
gsap-utils
VerifiedOfficial GSAP skill for gsap.utils — clamp, mapRange, normalize, interpolate, random, snap, toArray, wrap, pipe. Use when the user asks about gsap.utils, clamp, mapRange, random, snap, toArray, wrap, or helper utilities in GSAP.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 14.8 KB |
| agents/openai.yaml | config | 336 B |
| assets/examples/gsap-utils-starter.js | script | 245 B |
| assets/templates/gsap-utils-audit-report.md | markdown | 627 B |
| assets/templates/gsap-utils-review-checklist.md | markdown | 1.3 KB |
| evals/evals.json | config | 4.0 KB |
| evals/trigger-queries.json | config | 4.0 KB |
| references/function-composition-recipes.md | markdown | 2.3 KB |
| references/index.md | markdown | 548 B |
| references/numeric-mapping.md | markdown | 1.5 KB |
| references/official-source.md | markdown | 1.5 KB |
| references/provenance.json | config | 1.9 KB |
| references/random-determinism-testing.md | markdown | 2.3 KB |
| references/selectors-and-units.md | markdown | 1.5 KB |
| references/source-ledger.md | markdown | 1.6 KB |
| scripts/audit.mjsexecutable | script | 18.8 KB |
references/function-composition-recipes.md
View on GitHub# gsap.utils function composition recipes
Skill: gsap-utils
Checked at: 2026-06-04
## When To Load
- Read when clamp, mapRange, normalize, interpolate, snap, pipe, unitize, wrap, or selector utilities feed animation values.
## Source Anchors
- https://gsap.com/docs/v3/GSAP/UtilityMethods/
- https://gsap.com/docs/v3/GSAP/gsap.to()
## Reference Notes
- Prefer reusable composed functions for pointer, scroll, drag, and progress mappings so boundaries are explicit and testable.
- Keep unit conversion at the edge. Numeric helpers should not silently accept CSS unit strings unless `unitize` or a specific parser owns that boundary.
- Use scoped selector helpers in component systems to avoid cross-component targeting.
## Focused Checks
- Test min, max, below-range, above-range, and NaN inputs for mapping helpers.
- Check whether helper functions allocate work inside frame loops.
## Failure Modes
- Mapping unit strings with numeric helpers.
- Creating new helper functions on every frame or render when a stable function would work.
## Operating Guidance
gsap.utils helpers such as clamp, mapRange, normalize, interpolate, random, snap, toArray, selector, wrap, pipe, unitize, and function-based value review.
### Decision Boundaries
- Use plain JavaScript helpers when GSAP is not already part of the animation stack.
- Use gsap-core when helper values feed tweens.
- Use gsap-scrolltrigger when helpers map scroll progress.
### Workflow Details
1. Identify whether the helper should return a reusable function or immediate value.
2. Keep unit handling explicit.
3. Scope selector helpers in component code.
4. Test boundary inputs and cyclic values.
### Gotchas
- mapRange and normalize operate on numbers, not unit strings.
- Omitting the final value returns a reusable function; this is often the intended pattern.
- selector(scope) prevents cross-component targeting mistakes.
## Validation Notes
- Inspect installed package versions and local architecture before applying examples.
- Prefer the bundled `scripts/audit.mjs doctor --root <repo> --format json` command when setup is unclear.
- Use `scripts/audit.mjs scan --root <repo> --format markdown` for repeatable static findings, then manually verify every finding against current code.
- Close with repo-specific checks and user-visible runtime proof when this skill affects a rendered surface.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 471k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |