locomotive-scroll

locomotive-scroll is a skill for Claude Code, Codex from Kevin-Liu-01/Agent-Machines. It costs 101 tokens per session (2,956 once invoked), scanned A, a copy of locomotive-scroll, MIT.

A guide to Locomotive Scroll, a JavaScript library for smooth scrolling, parallax movement, viewport detection, and scroll-triggered animations.

In plain words
What is it for?
Use it to build immersive landing pages, narrative scrolling experiences, parallax effects, sticky elements, and animations linked to scroll position.
Why use it?
It helps coordinate scrolling effects while calling out accessibility, mobile behavior, performance, and fixed-positioning concerns.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to build immersive landing pages, narrative scrolling experiences, parallax effects, sticky elements, and animations linked to scroll position.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kevin-liu-01/agent-machines/locomotive-scroll
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.

Any agent
npx skills add Kevin-Liu-01/Agent-Machines --skill locomotive-scroll
Clone the repo
git clone --depth 1 https://github.com/Kevin-Liu-01/Agent-Machines

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for locomotive-scroll

README.md
[![agentmods](https://agentmods.dev/badge/skills/kevin-liu-01/agent-machines/locomotive-scroll/github.svg)](https://agentmods.dev/skills/kevin-liu-01/agent-machines/locomotive-scroll)
Your own site
<a href="https://agentmods.dev/skills/kevin-liu-01/agent-machines/locomotive-scroll"><img src="https://agentmods.dev/badge/skills/kevin-liu-01/agent-machines/locomotive-scroll/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for locomotive-scroll

Your own site · 80×15
<a href="https://agentmods.dev/skills/kevin-liu-01/agent-machines/locomotive-scroll"><img src="https://agentmods.dev/badge/skills/kevin-liu-01/agent-machines/locomotive-scroll.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 101 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,956 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00101 $0.02956
Opus 5 $0.00051 $0.01478
Sonnet 5 $0.00020 $0.00591
Haiku 4.5 $0.00010 $0.00296

Measured 9d ago against content hash cfb107ae328e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

locomotive-scroll 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 9d 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 locomotive-scroll — 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.

knowledge/skills/locomotive-scroll/SKILL.md · 481 lines

How it starts

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

Locomotive Scroll

Comprehensive guide for implementing smooth scrolling, parallax effects, and scroll-driven animations using Locomotive Scroll.

Overview

Locomotive Scroll is a JavaScript library that provides:

  • Smooth scrolling: Hardware-accelerated smooth scroll with customizable easing
  • Parallax effects: Element-level speed control for depth
  • Viewport detection: Track when elements enter/exit viewport
  • Scroll events: Monitor scroll progress for animation synchronization
  • Sticky elements: Pin elements within defined boundaries
  • Horizontal scrolling: Support for horizontal scroll layouts

When to use Locomotive Scroll:

  • Building immersive landing pages with parallax
  • Creating smooth, Apple-style scroll experiences
  • Implementing scroll-triggered animations
  • Developing narrative/storytelling websites
  • Adding depth and motion to long-form content

Trade-offs:

  • Scroll-hijacking can impact accessibility (provide disable option)
  • Performance overhead on low-end devices (detect and disable)
  • Mobile touch scrolling feels different (test extensively)
  • Fixed positioning requires workarounds

Installation

npm install locomotive-scroll
// ES6
import LocomotiveScroll from 'locomotive-scroll';
import 'locomotive-scroll/dist/locomotive-scroll.css';

// Or via CDN
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/locomotive-scroll/dist/locomotive-scroll.min.css">
<script src="https://cdn.jsdelivr.net/npm/locomotive-scroll/dist/locomotive-scroll.min.js"></script>

Core Concepts

1. HTML Structure

Every Locomotive Scroll implementation requires specific data attributes:

<!-- Scroll container (required) -->
<div data-scroll-container>

  <!-- Scroll sections (optional, improves performance) -->
  <div data-scroll-section>

    <!-- Tracked elements -->
    <h1 data-scroll>Basic detection</h1>

    <!-- Parallax element -->
    <div data-scroll data-scroll-speed="2">
      Moves faster than scroll
    </div>

    <!-- Sticky element -->
    <div data-scroll data-scroll-sticky>
      Sticks within section
    </div>

    <!-- Element with ID for tracking -->
    <div data-scroll data-scroll-id="hero">
      Accessible via JavaScript
    </div>

    <!-- Call event trigger -->
    <div data-scroll data-scroll-call="fadeIn">
      Triggers custom event
    </div>

  </div>
</div>

Read the full file on GitHub · 481 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. 9d ago First seen · 481 lines · 101 tokens per session scan A cfb107ae328e

Subscribe to this mod's changes

locomotive-scroll is a skill published in the GitHub repository Kevin-Liu-01/Agent-Machines (29 stars, last pushed today), licensed MIT. It adds 101 tokens to every session and 2,956 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. It is 100% identical to locomotive-scroll, differing in 0 lines, and is treated as a copy.

Related

Other skills, from other repositories

21st-ui

Find, install, and generate UI with 21st.dev. Use when the user asks for a UI component (pricing table, hero, navbar, dashboard, form, etc.), wants design inspiration, needs a brand logo as an SVG component, or wants to generate new UI from a prompt.

21st-dev/magic-mcp · 63 tokens

service-portal-pages

The container side of Service Portal — the spportal → sppage → sprow → spcolumn → spinstance hierarchy, why widget options belong on the instance and not the widget, cloning pages, and what is theme (sptheme, spbrand, spcss) rather than page.

serac-labs/serac · 63 tokens

cross-browser-typography-qa

Use this skill when web text looks clipped, flattened, wrapped incorrectly, misaligned, or materially different between Chromium and WebKit/Safari. Treat text rendering as both a geometry problem and a visual paint problem: passing DOM bounds does not prove that every glyph is intact.

AtlasOmnia/donna-starter · 56 tokens

skill-export-page

Skill "skill-export-page" from theYahia/WWmcp, covering /skill-export-page, algorithm and examples.

theYahia/WWmcp · 9 tokens

theme

Apply brand and visual direction in a Mantle application using its repo-owned theme and UI contracts.

aotter/mantle · 21 tokens

design-taste-frontend

Anti-slop frontend skill for landing pages, portfolios, and redesigns. The agent reads the brief, infers the right design direction, and ships interfaces that do not look templated. Real design systems when applicable, audit-first on redesigns, strict pre-flight check.

dmae97/omk · 61 tokens