Skip to main content
skill CX Codex

implement_lenis_scroll — Claude Code skill

A skill that walks the agent through wiring Lenis into a React or Next.js app: package install, a wrapper component, layout integration. Useful when you want smooth scrolling without writing the hook yourself.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add jerrar670/surf-website --skill implement_lenis_scroll -a claude-code
Open on GitHub

What implement_lenis_scroll does

The agent works in three passes. First it installs lenis. Then it writes SmoothScroll.tsx marked 'use client', where a useEffect builds the Lenis instance with a duration, easing and wheel settings, and requestAnimationFrame keeps calling lenis.raf. Cleanup runs destroy() on unmount.

Finally the wrapper goes into layout.tsx around children. It is a client component, so in the App Router it needs the 'use client' line; skip that and the page scrolls exactly as before. For GSAP ScrollTrigger the skill suggests listening to Lenis scroll events and driving the ticker with gsap.ticker.

You need a React or Next.js project to start. The skill also lists @studio-freight/lenis as the older package name if your setup still uses it.

What it helps with

  • add Lenis scrolling to a Next.js App Router layout
  • extract smooth scrolling into a reusable client component
  • destroy the Lenis instance when the component unmounts
  • keep GSAP ScrollTrigger in sync with Lenis
  • pick between the lenis and @studio-freight/lenis packages

Example prompts for the agent

  • Add Lenis smooth scrolling to this Next.js app.
  • Create SmoothScroll and wrap children with it in layout.tsx.
  • Hook Lenis up to ScrollTrigger so the animations keep pace.

How to install implement_lenis_scroll

1Skills CLI (Vercel)

npx skills add jerrar670/surf-website --skill implement_lenis_scroll -a claude-code

2Manually: put the files in place

~/.claude/skills/implement_lenis_scroll/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/implement_lenis_scroll/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about implement_lenis_scroll

How do I install implement_lenis_scroll in Claude Code?

Run npx skills add jerrar670/surf-website --skill implement_lenis_scroll -a claude-code; the skill file lands at ~/.claude/skills/implement_lenis_scroll/SKILL.md.

What does implement_lenis_scroll do?

It tells the agent how to set up Lenis in React or Next.js: install the package, write a component that drives lenis.raf from requestAnimationFrame, then wrap the layout with it.

Does it require GSAP?

No. ScrollTrigger gets a short note for projects that already use it: refresh the trigger on Lenis scroll and feed Lenis through gsap.ticker.

Similar skills

All skills for Frontend and UI →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor