gsap-utils

A guide to GSAP utility functions for clamping, mapping, normalizing, interpolating, randomizing, snapping, and handling arrays in JavaScript animations.

In plain words
What is it for?
Use it when writing or reviewing GSAP animations, scroll interactions, mouse handlers, or other code that transforms values.
Why use it?
It explains how to use these small helpers without repeatedly working out the underlying math or collection handling.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/isaacsight/kernel/gsap-utils
Any agent
npx skills add isaacsight/kernel --skill gsap-utils
Clone the repo
git clone --depth 1 https://github.com/isaacsight/kernel

Made for: Claude Code, Codex.

Per session 64 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,525 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 100% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00064 $0.03525
Opus 5 $0.00032 $0.01762
Sonnet 5 $0.00013 $0.00705
Haiku 4.5 $0.00006 $0.00352

Measured 2d ago against content hash 1927bcc4ea95, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

gsap-utils scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to gsap-utils — 0 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.agents/skills/gsap-utils/SKILL.md · 285 lines

How it starts

The opening of the file, as written. The whole thing — 285 lines — stays where its author put it; the contents beside it link to each section on GitHub.

gsap.utils

When to Use This Skill

Apply when writing or reviewing code that uses gsap.utils for math, array/collection handling, unit parsing, or value mapping in animations (e.g. mapping scroll to a value, randomizing, snapping to a grid, or normalizing inputs).

Related skills: Use with gsap-core, gsap-timeline, and gsap-scrolltrigger when building animations; CustomEase and other easing utilities are in gsap-plugins.

Overview

gsap.utils provides pure helpers; no need to register. Use in tween vars (e.g. function-based values), in ScrollTrigger or Observer callbacks, or in any JS that drives GSAP. All are on gsap.utils (e.g. gsap.utils.clamp()).

Omitting the value: function form. Many utils accept the value to transform as the last argument. If you omit that argument, the util returns a function that accepts the value later. Use the function form when you need to clamp, map, normalize, or snap many values with the same config (e.g. in a mousemove handler or tween callback). Exception: random() — pass true as the last argument to get a reusable function (do not omit the value); see random().

// With value: returns the result
gsap.utils.clamp(0, 100, 150); // 100

// Without value: returns a function you call with the value later
let c = gsap.utils.clamp(0, 100);
c(150);  // 100
c(-10);  // 0

Clamping and Ranges

clamp(min, max, value?)

Constrains a value between min and max. Omit value to get a function: clamp(min, max)(value).

gsap.utils.clamp(0, 100, 150); // 100
gsap.utils.clamp(0, 100, -10); // 0

let clampFn = gsap.utils.clamp(0, 100);
clampFn(150); // 100

mapRange(inMin, inMax, outMin, outMax, value?)

Maps a value from one range to another. Use when converting scroll position, progress (0–1), or input range to an animation range. Omit value to get a function: mapRange(inMin, inMax, outMin, outMax)(value).

Read the full file on GitHub · 285 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 285 lines · 64 tokens per session scan A 1927bcc4ea95

Subscribe to this mod's changes

gsap-utils is a skill published in the GitHub repository isaacsight/kernel (16 stars, last pushed 3d ago), licensed MIT. It adds 64 tokens to every session and 3,525 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to gsap-utils, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

image-gen

Generate images from text prompts via DashScope/Qwen. Use when creating, drawing, or illustrating images.

alibaba/anolisa · 24 tokens

aov-mingyu-api

通过 aov.cc 公开 API 调用命理、占卜和一站式提示词能力。用于需要八字排盘、紫微斗数排盘、六爻、梅花易数、奇门遁甲、大六壬、小六壬、塔罗、三山国王灵签、黄历择日、雷诺曼、星盘,或直接返回可交给 AI 解读的完整提示词的任务。.

tradecatlabs/fatecat · 105 tokens

tarot

Use when the user asks for tarot/塔罗/占卜/抽牌/牌阵/每日一牌/运势/感情、事业、决策指引. Provide Chinese tarot readings with scripted random draws, upright/reversed cards, agency-first advice, and safety boundaries.

tradecatlabs/fatecat · 63 tokens

meihua-yishu

Meihua Yishu (梅花易數) Plum Blossom I Ching divination skill. Use when users request divination, fortune telling, hexagram casting, or character analysis (測字). Triggers on: 占卜, 算卦, 問卦, 起卦, 解卦, 測字, 拆字, meihua, plum blossom, I Ching divination, 梅花易數.

tradecatlabs/fatecat · 101 tokens

mediagen

Generate images and video from text prompts via the mediagen CLI, across Gemini, OpenAI and Kie AI. Use when asked to create, generate, render, or edit an image or a video — a logo, an illustration, a mockup, a photo, a banner, a clip — or to mark existing media as AI-generated. Also covers choosing a provider or…

Cripacx/mediagen · 84 tokens

aimeat-video

How AIMEAT videos are made from live captures and existing recordings with the three tools in aimeat/scripts/demo-video/ (a scripted performer, a passive camera, and a stills-plus-cards cutter), including the capture rules, the card style, the honesty captions and the YouTube hand-off. Use whenever a task is to make…

miikkij/aimeat-protocol · 94 tokens