citec-motion-system

Implements scroll animations and reveal motion with GSAP, ScrollTrigger, and Lenis in Astro and React.

Updated Jun 9, 2026
One-click install
npx skills add https://github.com/TOBIASpuchito/Citec --skill citec-motion-system-tobiaspuchito
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: citec-motion-system
Source: https://github.com/TOBIASpuchito/Citec/tree/main/citec-frontend/.codex/skills/citec-motion-system
Command: npx skills add https://github.com/TOBIASpuchito/Citec --skill citec-motion-system-tobiaspuchito

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Frontend motion work often produces inconsistent GSAP imports, duplicate Lenis instances, missing reduced-motion fallbacks, and scroll jank. This Skill enforces a single motion architecture for the CITEC frontend so animations stay performant, accessible, and maintainable. ## Core Features & Use Cases - Centralized GSAP Setup: Enforces importing gsap and ScrollTrigger only from src/lib/gsap and keeping Lenis ownership in src/lib/lenis.ts. - Standard Reveal Motion: Reuses data-reveal and data-reveal-delay attributes for consistent entrance animations across pages. - Accessibility & Performance Rules: Requires prefers-reduced-motion fallbacks, transform/opacity-only animation, and proper cleanup in React islands via timeline.kill() and ctx.revert(). - Use Case: When adding a scroll-triggered reveal to a new Astro section or debugging a React island animation that leaks ScrollTriggers, apply this Skill to follow the project's motion conventions. ## Quick Start Use the citec-motion-system skill to add a reduced-motion-safe scroll reveal animation to this Astro component.

Frequently Asked Questions about citec-motion-system

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add scroll-triggered reveal animations with GSAP and ScrollTrigger?▼

Import gsap and ScrollTrigger only from the shared src/lib/gsap module, then apply data-reveal and data-reveal-delay attributes for standard entrance motion. Register triggers centrally and call ScrollTrigger.refresh() only after adding reveals or layout-affecting async content.

How to integrate Lenis smooth scrolling with ScrollTrigger?▼

Keep Lenis ownership in a single src/lib/lenis.ts module and never create a second global Lenis instance. ScrollTrigger reads the scroll position that Lenis drives, so one shared instance keeps scroll-linked animations synchronized.

How do I clean up GSAP animations in React components?▼

Create timelines inside effects with selectors scoped to local refs, then clean up with timeline.kill(), ctx.revert(), or scoped ScrollTrigger cleanup on unmount. Avoid ScrollTrigger.getAll() for broad cleanup unless the scope is intentionally global.

Does GSAP animation support prefers-reduced-motion?▼

Yes, but it must be implemented explicitly. Reduced-motion users must see content immediately, so never animate required content from invisible to visible without a reduced-motion fallback that renders it visible by default.

Why does scroll animation cause jank on mobile?▼

Jank usually comes from animating layout properties instead of transform and opacity, creating refresh loops, or running heavy decorative canvases. Animate only transform and opacity, limit ScrollTrigger.refresh() calls, and validate with desktop and mobile QA.