MCPInstall

shaders-cursor-ripples

Add cursor-following fluid WebGPU distortion over an existing image with the Shaders library's ImageTexture and CursorRipples components. Use when a hero, gallery, or media panel needs a water-ripple mouse effect; when replacing a drifting CSS spotlight or flashlight reveal; or when a prompt says to borrow only the shader interaction from a Shaders.com reference while preserving the current brand, image, copy, and layout.

Installs
1.4K
Last 24h
+13
Trending rank
#7649
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/mengto/skills --skill shaders-cursor-ripples
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads shaders-cursor-ripples automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Shaders Cursor Ripples

Core Contract

  1. Preserve the existing page, content, and semantic image.
  2. Install shaders and import from the active framework subpath.
  3. Render the source image through one Shader canvas.
  4. Place CursorRipples after ImageTexture so it post-processes that image.
  5. Keep toneMapping="aces" on the root.
  6. Let Shaders track the cursor. Remove custom spotlight coordinates, radial masks, duplicated reveal images, and pointer animation loops.
  7. Keep one real image beneath the canvas as the accessible loading and WebGPU fallback.
  8. Disable the shader for reduced motion and unsupported WebGPU.
  9. Lazy-load the shader code so the library does not inflate the initial page bundle.

When the user asks for only the shader effect, do not copy a reference's ribbon, blob, glow, typography, layout, copy, colors, or identity. Do not substitute the Shaders Water component: CursorRipples is the interactive image-displacement effect.

Inspect Before Editing

  • Find the real media wrapper, image URL, crop, overlays, z-index, and existing motion.
  • Confirm the wrapper has a non-zero rendered width and height.
  • Search for old reveal code such as data-reveal-hover, mask-image: radial-gradient, duplicated images, requestAnimationFrame, and manual pointer listeners.
  • Preserve unrelated parallax or entrance motion unless it conflicts with the shader canvas.
  • Check the installed shaders version and current framework API when the package may have changed.

Install

npm install shaders

Import from shaders/react, shaders/vue, shaders/svelte, or shaders/solid. For Vite projects, never add shaders to optimizeDeps.exclude; its CommonJS dependencies need Vite pre-bundling. No optimizeDeps entry is normally required.

Before a commercial release, verify the current Shaders license terms.

Required Composition

Keep the component order and values below:

<Shader toneMapping="aces">
  <ImageTexture url={imageUrl} objectFit="cover" />
  <CursorRipples decay={7.3} radius={0.6} />
</Shader>

Use this as the baseline before tuning intensity, chromaticSplit, or edges. Do not add SolidColor, Blob, Form3D, GaborNoise, Glow, or another generator unless the user explicitly requests the reference's generated artwork.

For React, copy and adapt assets/react/cursor-ripple-shader.tsx and assets/react/cursor-ripple-media.css.

Client and Fallback Pattern

Mount the shader only after the browser confirms WebGPU and motion is allowed:

const CursorRippleShader = lazy(() => import("./cursor-ripple-shader"));

const [shaderEnabled, setShaderEnabled] = useState(false);
const [shaderReady, setShaderReady] = useState(false);

useEffect(() => {
  const reduceMotion = window.matchMedia("(prefers-reduced-motion: reduce)");

  const sync = () => {
    const enabled = "gpu" in navigator && !reduceMotion.matches;
    setShaderEnabled(enabled);
    if (!enabled) setShaderReady(false);
  };

  sync();
  reduceMotion.addEventListener("change", sync);
  return () => reduceMotion.removeEventListener("change", sync);
}, []);

Keep the semantic image in the wrapper, then overlay the lazy shader:

<figure className="cursor-ripple-media">
  <img
    className="cursor-ripple-media__fallback"
    src={imageUrl}
    alt={meaningfulAlt}
    width={width}
    height={height}
  />

  {shaderEnabled ? (
    <Suspense fallback={null}>
      <CursorRippleShader
        imageUrl={imageUrl}
        ready={shaderReady}
        onReady={() => setShaderReady(true)}
      />
    </Suspense>
  ) : null}
</figure>

For Next.js, an ssr: false dynamic import is also valid. Do not hide the fallback until the shader calls onReady; a failed WebGPU initialization must leave the page legible and complete.

Layering Rules

  • Give the media wrapper position: relative, a definite size, overflow: hidden, and isolation: isolate.
  • Keep the fallback at z-index 0 and the canvas at z-index 1.
  • Fill the wrapper with position: absolute; inset: 0; width: 100%; height: 100%.
  • Set the shader layer to pointer-events: none; Shaders listens globally and converts pointer coordinates using the canvas bounds.
  • Mark the shader wrapper aria-hidden="true"; the fallback image owns the accessible name.
  • Place copy, links, and controls above the canvas so the effect never intercepts interaction.
  • Preserve the same crop between the fallback and ImageTexture. Use objectFit="cover" for full-bleed media.

Remove the Failed Spotlight Pattern

Delete the old implementation rather than leaving it hidden:

  • second reveal image;
  • radial mask-image and custom reveal variables;
  • smoke or blur overlays tied to pointer position;
  • component-local requestAnimationFrame pointer easing;
  • pointerenter, pointermove, pointerleave, and resize bookkeeping created only for the flashlight;
  • coarse-pointer rules that reference the retired reveal layers.

Keeping both systems causes coordinate drift, extra GPU work, and confusing fallbacks.

Performance and Motion

  • Lazy-load the shader module behind the WebGPU check.
  • Keep exactly one shader canvas for the media panel.
  • Use the library's onReady callback for a short opacity handoff.
  • Use disableTelemetry when telemetry is not required.
  • Do not animate the canvas size; animate a stable parent if parallax is needed.
  • Disable or unmount the shader under prefers-reduced-motion: reduce.
  • Keep touch layouts usable with the static image; never put essential information inside the effect.

Verification

Run the project's lint, production build, rendered tests, and git diff --check. Then verify in a real browser:

  1. Confirm exactly one canvas[data-renderer="shaders"] exists.
  2. Confirm the shader reaches its ready class and the fallback image remains present.
  3. Sweep the pointer across several points in the media. The distortion must follow that path without a detached circle.
  4. Confirm links and controls remain clickable.
  5. Confirm no console errors or warnings occur.
  6. Confirm the static image remains when WebGPU is unavailable or reduced motion is enabled.
  7. Confirm the old data-reveal-hover or radial-mask layer is absent.
  8. Check mobile and desktop crops after the canvas initializes.

Failure Diagnosis

  • Canvas exists but is blank: verify the wrapper has non-zero dimensions and the image URL is same-origin or CORS-readable.
  • Image renders but does not ripple: keep CursorRipples after ImageTexture; it requires a child/input surface.
  • Ripple is offset: remove manual pointer transforms and check whether a transformed ancestor changes the canvas bounds.
  • Page crashes during SSR: move the shader into a client-only, lazy-loaded component.
  • Image flashes on load: retain the fallback and fade the shader in only from onReady.
  • Initial bundle becomes large: confirm the Shaders import lives only inside the lazy module.
  • Effect blocks buttons: keep the canvas pointer-transparent and controls in a higher stacking layer.

Handoff

Report the affected media, Shaders package version, fallback behavior, reduced-motion behavior, build/test results, and live interaction verification. Distinguish a locally ready effect from a published deployment.

FAQ

What does the shaders-cursor-ripples skill do?

Add cursor-following fluid WebGPU distortion over an existing image with the Shaders library's ImageTexture and CursorRipples components. Use when a hero, gallery, or media panel needs a water-ripple mouse effect; when replacing a drifting CSS spotlight or flashlight reveal; or when a prompt says to borrow only the shader interaction from a Shaders.com reference while preserving the current brand, image, copy, and layout.

How do I install shaders-cursor-ripples?

Run npx skills add https://github.com/mengto/skills --skill shaders-cursor-ripples in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/shaders-cursor-ripples/ (personal) or .claude/skills/shaders-cursor-ripples/ (project).

Which AI agents can use shaders-cursor-ripples?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is shaders-cursor-ripples safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains shaders-cursor-ripples?

It is published by mengto in mengto/skills. It has 1,369 recorded installs.

More from mengto/skills

View all →

Art-direct and implement distinctive, motion-rich marketing, editorial, portfolio, and landing websites with original reference-inspired imagery, standout heroes, GSAP choreography, one smooth-scroll engine, optional Three.js shaders, honest icon and logo sourcing, photo avatars, accessibility, and performance safeguards. Use when a user asks for an Awwwards-quality, premium, cinematic, interactive, high-concept, or motion-led website, or explicitly requests this visual and motion system.

Media & Creative3.2K installs

Create premium cinematic web motion systems with GSAP, ScrollTrigger, and Lenis. Use for luxury editorial websites, creative studio portfolios, Awwwards-style interactions, smooth scroll reveals, staggered text, parallax, pinned sections, magnetic hover states, custom cursors, and mouse-reactive layered movement.

Media & Creative2.5K installs

beautiful-shadows

mengto/skills

Apply exact Tailwind arbitrary shadow utilities for polished, layered neutral elevation. Use when compact cards, controls, panels, popovers, hero media, feature callouts, or modal-like containers need refined shadows without default Tailwind shadow scales or colored tinting.

Frontend & Design2.2K installs

Create cinematic scroll-driven landing pages with Lenis smooth scrolling, GSAP ScrollTrigger, scroll-linked progression, staggered text reveals, sticky card stacks, parallax backgrounds, scroll-scrubbed transitions, footer reveals, and immersive preloaders. Use when analyzing or building premium editorial scroll experiences, sticky project stacks, kinetic typography, or section-by-section storytelling.

Frontend & Design2.1K installs

animation-on-scroll

mengto/skills

Create an on-scroll animation trigger using IntersectionObserver with Tailwind-friendly animation classes and keyframes. Use when asked for scroll-reveal, animate-on-scroll, or sequencing element animations when they enter the viewport.

landing-page

mengto/skills

Use when designing or rewriting a high-converting landing page (single-offer page) for SaaS/apps/services. Covers structure, layout patterns, conversion strategies, copywriting, SEO/AEO, and common pitfalls.

Popular frontend & design skills

View category →

setup-matt-pocock-skills

mattpocock/skills

Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.

Frontend & Design1.1M installs

frontend-design

anthropics/skills

Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.

OfficialFrontend & Design1M installs

hyperframes-animation

heygen-com/hyperframes

All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.

prototype

mattpocock/skills

Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.

Frontend & Design999.2K installs

hyperframes-core

heygen-com/hyperframes

The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.

Frontend & Design930.5K installs

vercel-react-best-practices

vercel-labs/agent-skills

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

OfficialFrontend & Design843.1K installs